/* =====================================================================
   People Stage — identidade visual (data-tema="ps"), modo claro e escuro.
   ---------------------------------------------------------------------
   Paleta da marca:
     Rich Black #00072D · Dark #051650 · Bangladesh #0A2472 · Caribbean #123499
     Midnight Blue: #02060E → #0356C5 (degradê do menu) · azul vivo #1C46C6
   As telas usam variáveis --ps-* com a cor antiga como reserva
   (ex.: background: var(--ps-card, #fff)). Aqui elas recebem os valores
   da marca em cada modo; fora do sistema (PDF, página pública) vale a reserva.
   ===================================================================== */
/* A fonte Inter é carregada pelo tema.js (link inserido por script não bloqueia a primeira pintura). */

html[data-tema="ps"] {
  --ps-font: var(--font-texto, "Inter", system-ui, Arial, sans-serif);
  --ps-font-titulo: var(--font-titulo, "Questrial", "Inter", system-ui, sans-serif);   /* títulos em Questrial, texto em Inter (tipografia.css) */
  --ps-marca-0: #00072d; --ps-marca-1: #051650; --ps-marca-2: #0a2472; --ps-marca-3: #123499; --ps-marca-4: #0356c5; --ps-marca-5: #1c46c6;
  --ps-menu: linear-gradient(180deg, #02060e 0%, #051650 48%, #0356c5 100%);
  --ps-primaria: #0356c5; --ps-primaria-forte: #123499; --ps-primaria-texto: #fff;
  --ps-r: 12px;
}

/* ------------------------------ modo claro ------------------------------ */
html[data-tema="ps"][data-modo="claro"], html[data-tema="ps"]:not([data-modo]) {
  --ps-bg: #eef1f8;
  --ps-card: #ffffff;
  --ps-soft: #f6f8fc;
  --ps-chip: #e8edfb;
  --ps-border: #dfe4f1;
  --ps-text: #00072d;
  --ps-text-2: #2a3558;
  --ps-muted: #5a6689;
  --ps-link: #123499;
  --ps-ok-bg: #e7f6ec; --ps-ok-tx: #13703a; --ps-ok-bd: #bfe6cc;
  --ps-erro-bg: #fdeceb; --ps-erro-tx: #b3261e; --ps-erro-bd: #f3c2bd;
  --ps-aviso-bg: #fff4dc; --ps-aviso-tx: #8a5300; --ps-aviso-bd: #f3d9a4;
  --ps-sombra: 0 1px 2px rgba(0, 7, 45, .05), 0 4px 16px rgba(0, 7, 45, .05);
  --ps-navy-bg: #051650;
  /* tokens que as telas já usam */
  --bg: var(--ps-bg); --card: var(--ps-card); --text: var(--ps-text); --muted: var(--ps-muted); --border: var(--ps-border);
  --navy: #051650; --navy-dark: #00072d; --navy-light: #0a2472; --accent: #0356c5; --blue: #0356c5; --blue2: #123499; --paper: var(--ps-bg);
}

/* ------------------------------ modo escuro ----------------------------- */
html[data-tema="ps"][data-modo="escuro"] {
  /* camadas com contraste suficiente: fundo < cartão < campo/realce (antes eram quase iguais e a tela ficava "chapada") */
  --ps-bg: #060a16;
  --ps-card: #0c1327;
  --ps-soft: #111a33;
  --ps-chip: #17244b;
  --ps-border: #1f2b4f;
  /* menu lateral escuro em azul-marinho profundo (o degradê azul vivo do modo claro brilhava demais no escuro) */
  --ps-menu: linear-gradient(180deg, #04081a 0%, #081232 55%, #0c1a48 100%);
  --ps-text: #e5eaf3;
  --ps-text-2: #c3cbe0;
  --ps-muted: #8e9bc2;
  --ps-link: #7fa6ff;
  --ps-ok-bg: rgba(34, 197, 94, .13); --ps-ok-tx: #6ee7a0; --ps-ok-bd: rgba(34, 197, 94, .35);
  --ps-erro-bg: rgba(239, 68, 68, .14); --ps-erro-tx: #fca5a5; --ps-erro-bd: rgba(239, 68, 68, .38);
  --ps-aviso-bg: rgba(245, 158, 11, .14); --ps-aviso-tx: #fcd34d; --ps-aviso-bd: rgba(245, 158, 11, .38);
  --ps-sombra: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  --ps-navy-bg: #123499;
  --bg: var(--ps-bg); --card: var(--ps-card); --text: var(--ps-text); --muted: var(--ps-muted); --border: var(--ps-border);
  /* "navy" é usado como cor de título: no escuro vira texto claro; fundos de botão usam --ps-primaria */
  --navy: #dfe6f7; --navy-dark: #00072d; --navy-light: #0a2472; --accent: #3a78e6; --blue: #3a78e6; --blue2: #5b8def; --paper: var(--ps-bg);
  --ps-primaria: #0f5fd6;
  color-scheme: dark;
}

/* documentos (contrato, prévias de PDF) são papel: sempre claros */
html[data-tema="ps"] #preview, html[data-tema="ps"] .papel, html[data-tema="ps"] .ps-papel {
  --ps-card: #fff; --ps-soft: #f7f9fd; --ps-chip: #eef1fb; --ps-border: #e3e7f0; --ps-text: #1a1f2e; --ps-text-2: #33405a; --ps-muted: #5b6478; --ps-link: #0b3fa0;
  --ps-ok-bg: #eaf7ee; --ps-ok-tx: #1c7a3d; --ps-erro-bg: #fdecea; --ps-erro-tx: #b3261e; --ps-aviso-bg: #fff4dc; --ps-aviso-tx: #9a5b00;
  --card: #fff; --text: #1a1f2e; --muted: #5b6478; --border: #e3e7f0; --navy: #16255a;
  color-scheme: light;
}

/* ------------------------------ base ------------------------------------ */
html[data-tema="ps"] body { font-family: var(--ps-font); background: var(--ps-bg); color: var(--ps-text); -webkit-font-smoothing: antialiased; }
html[data-tema="ps"] button, html[data-tema="ps"] input, html[data-tema="ps"] select, html[data-tema="ps"] textarea, html[data-tema="ps"] label, html[data-tema="ps"] .sidebar, html[data-tema="ps"] .ps-workspace { font-family: var(--ps-font); }
html[data-tema="ps"] h1, html[data-tema="ps"] h2, html[data-tema="ps"] h3, html[data-tema="ps"] h4, html[data-tema="ps"] .topo h1 { font-family: var(--ps-font-titulo); font-weight: 400; letter-spacing: -.01em; font-synthesis-weight: none; }
html[data-tema="ps"] a { color: var(--ps-link); }
html[data-tema="ps"] .app { background: var(--ps-bg); }
html[data-tema="ps"] .moldura { display: none !important; }
html[data-tema="ps"] ::selection { background: rgba(3, 86, 197, .28); }

/* ------------------------------ menu lateral (degradê Midnight Blue) ---- */
html[data-tema="ps"] .sidebar { background: var(--ps-menu); box-shadow: inset -1px 0 0 rgba(255, 255, 255, .06); }
html[data-tema="ps"] .sidebar .marca { border-bottom-color: rgba(255, 255, 255, .08); }
html[data-tema="ps"] .nav-sec { color: rgba(223, 230, 247, .5); }
html[data-tema="ps"] .nav-item { color: #c6d0ec; border-radius: 10px; }
html[data-tema="ps"] .nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; }
html[data-tema="ps"] .nav-item.ativa, html[data-tema="ps"] .nav-item.sub.ativa { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 3px 0 0 #5b9bff; font-weight: 600; }
html[data-tema="ps"] .nav-item .contador { background: #1c46c6; color: #fff; }
html[data-tema="ps"] .sidebar .conta { background: rgba(0, 7, 45, .35); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; margin: 0 10px 8px; }

/* ------------------------------ superfícies ----------------------------- */
html[data-tema="ps"] .card, html[data-tema="ps"] .fin-bloco, html[data-tema="ps"] .graf, html[data-tema="ps"] .kpi, html[data-tema="ps"] .sla,
html[data-tema="ps"] .secao-vaga, html[data-tema="ps"] .vaga-card, html[data-tema="ps"] .cartao, html[data-tema="ps"] .acao-hoje {
  background: var(--ps-card); border-color: var(--ps-border);
}
html[data-tema="ps"] .card { box-shadow: var(--ps-sombra); }
html[data-tema="ps"] .tile { background: var(--ps-card); border-color: var(--ps-border); }
html[data-tema="ps"] .tile.destaque { background: linear-gradient(160deg, #051650, #0356c5); border-color: transparent; }
html[data-tema="ps"] .coluna { background: var(--ps-soft); }
html[data-tema="ps"][data-modo="escuro"] .coluna.sobre { background: var(--ps-chip); }

/* campos */
html[data-tema="ps"] input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), html[data-tema="ps"] select, html[data-tema="ps"] textarea {
  background-color: var(--ps-card); color: var(--ps-text); border-color: var(--ps-border);
}
html[data-tema="ps"] input::placeholder, html[data-tema="ps"] textarea::placeholder { color: var(--ps-muted); opacity: .8; }
html[data-tema="ps"] input:focus, html[data-tema="ps"] select:focus, html[data-tema="ps"] textarea:focus { border-color: var(--ps-primaria) !important; box-shadow: 0 0 0 3px rgba(3, 86, 197, .18) !important; outline: none; }

/* botões */
html[data-tema="ps"] .btn-primary, html[data-tema="ps"] .btn-p, html[data-tema="ps"] .btn.primario, html[data-tema="ps"] .login-btn { background: var(--ps-primaria); border-color: var(--ps-primaria); color: #fff; }
html[data-tema="ps"] .btn-primary:hover, html[data-tema="ps"] .btn-p:hover, html[data-tema="ps"] .btn.primario:hover { background: #123499; }
html[data-tema="ps"] .btn-secondary, html[data-tema="ps"] .btn-s, html[data-tema="ps"] .btn:not(.primario):not(.perigo) { background: var(--ps-card); color: var(--ps-text); border: 1px solid var(--ps-border); }
html[data-tema="ps"] .btn-secondary:hover, html[data-tema="ps"] .btn-s:hover, html[data-tema="ps"] .btn:not(.primario):not(.perigo):hover { background: var(--ps-soft); }

/* tabelas */
html[data-tema="ps"] table th { color: var(--ps-muted); border-color: var(--ps-border); }
html[data-tema="ps"] table td { border-color: var(--ps-border); }
html[data-tema="ps"][data-modo="escuro"] table th { background: var(--ps-soft); }

/* diálogos */
html[data-tema="ps"] dialog, html[data-tema="ps"] .dlg, html[data-tema="ps"] .modal { background: var(--ps-card); color: var(--ps-text); border-color: var(--ps-border); }
html[data-tema="ps"] dialog::backdrop { background: rgba(0, 7, 45, .55); backdrop-filter: blur(2px); }

/* topo das páginas */
html[data-tema="ps"] .topo h1 { color: var(--ps-text); }
html[data-tema="ps"] .topo p { color: var(--ps-muted); }

/* barras de rolagem discretas no escuro */
html[data-tema="ps"][data-modo="escuro"] ::-webkit-scrollbar { width: 10px; height: 10px; }
html[data-tema="ps"][data-modo="escuro"] ::-webkit-scrollbar-thumb { background: #16234f; border-radius: 10px; border: 2px solid var(--ps-bg); }
html[data-tema="ps"][data-modo="escuro"] ::-webkit-scrollbar-track { background: transparent; }

/* telas embutidas herdam o fundo */
html[data-tema="ps"] iframe { color-scheme: normal; }
html[data-tema="ps"][data-modo="escuro"] iframe { background: var(--ps-bg) !important; border-color: var(--ps-border) !important; }

/* login do sistema no escuro */
html[data-tema="ps"][data-modo="escuro"] .login-card { background: var(--ps-card); border-color: var(--ps-border); }

/* ------------------------------ celular e toque ------------------------------- */
/* Letra de 16px nos campos: abaixo disso o iPhone dá zoom sozinho ao tocar (e o zoom fica na tela seguinte). */
@media (max-width: 900px), (pointer: coarse) {
  html[data-tema="ps"] input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]),
  html[data-tema="ps"] select, html[data-tema="ps"] textarea { font-size: 16px !important; }
}
html[data-tema="ps"] button, html[data-tema="ps"] a, html[data-tema="ps"] input, html[data-tema="ps"] select, html[data-tema="ps"] textarea, html[data-tema="ps"] label { touch-action: manipulation; }
/* Nada empurra a página para o lado: o que for mais largo que a tela rola dentro do próprio bloco. */
@media (max-width: 900px) {
  /* clip (não hidden): "hidden" no html e no body faz o body virar uma caixa de rolagem própria e, no iPhone,
     a barra fixa de baixo deixa de grudar no rodapé da tela (aparecia no meio da página) */
  html[data-tema="ps"], html[data-tema="ps"] body { overflow-x: hidden; max-width: 100%; }
  @supports (overflow-x: clip) { html[data-tema="ps"], html[data-tema="ps"] body { overflow-x: clip; } }
  html[data-tema="ps"] .layout, html[data-tema="ps"] .layout > *, html[data-tema="ps"] .main, html[data-tema="ps"] main, html[data-tema="ps"] .card, html[data-tema="ps"] .fin-bloco, html[data-tema="ps"] .wrap { min-width: 0; max-width: 100%; }
  html[data-tema="ps"] .card, html[data-tema="ps"] .fin-bloco, html[data-tema="ps"] .env-lista, html[data-tema="ps"] .preview-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  html[data-tema="ps"] img, html[data-tema="ps"] svg, html[data-tema="ps"] video, html[data-tema="ps"] iframe { max-width: 100%; }
  html[data-tema="ps"] dialog { width: min(640px, calc(100vw - 20px)); max-height: calc(100vh - 20px); overflow: auto; }
  html[data-tema="ps"] .dlg { padding: 16px; }
}

/* ------------------------------ celular: densidade e toque ------------------------------ */
@media (max-width: 760px) {
  /* indicadores em duas colunas em vez de uma pilha longa */
  html[data-tema="ps"] .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; }
  html[data-tema="ps"] .tile { padding: 12px 12px; border-radius: 12px; }
  html[data-tema="ps"] .tile b { font-size: 10px; letter-spacing: .4px; margin-bottom: 4px; }
  html[data-tema="ps"] .tile .v { font-size: 19px; }
  html[data-tema="ps"] .tile small, html[data-tema="ps"] .tile div:not(.v) { font-size: 11.5px; }
  html[data-tema="ps"] .tile.destaque, html[data-tema="ps"] .tile.clicavel:first-child { grid-column: 1 / -1; }
  /* botões com área de toque de 44px */
  html[data-tema="ps"] .btn-primary, html[data-tema="ps"] .btn-secondary, html[data-tema="ps"] .btn, html[data-tema="ps"] .ps-primary { min-height: 44px; }
  html[data-tema="ps"] .btn-mini { min-height: 36px; padding-left: 12px; padding-right: 12px; }
  html[data-tema="ps"] .actions { gap: 8px; }
  /* diálogos viram folha que sobe do rodapé, com rolagem própria */
  html[data-tema="ps"] dialog { width: 100vw !important; max-width: 100vw !important; margin: auto 0 0 !important; border-radius: 18px 18px 0 0 !important; max-height: 92vh !important; overflow: auto; box-shadow: 0 -20px 60px rgba(0, 7, 45, .35); }
  html[data-tema="ps"] dialog::backdrop { background: rgba(0, 7, 45, .5); }
  html[data-tema="ps"] .dlg { padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
  html[data-tema="ps"] .dlg .actions { position: sticky; bottom: 0; background: var(--ps-card); padding-top: 10px; margin-top: 10px; border-top: 1px solid var(--ps-border); }
  html[data-tema="ps"] .dlg .actions button { flex: 1 1 auto; }
  /* kanbans rolam de lado com "encaixe" por coluna */
  html[data-tema="ps"] .kanban, html[data-tema="ps"] .kanban-cand, html[data-tema="ps"] .pipe-quadro { scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scroll-padding-left: 8px; }
  html[data-tema="ps"] .kanban { grid-template-columns: repeat(4, 84vw) !important; }
  html[data-tema="ps"] .kanban-cand { grid-auto-columns: 84vw !important; }
  html[data-tema="ps"] .pipe-quadro { grid-template-columns: repeat(5, 84vw) !important; }
  html[data-tema="ps"] .coluna, html[data-tema="ps"] .pipe-col { scroll-snap-align: start; }
  /* fases da vaga não cortam o nome: rolam de lado */
  html[data-tema="ps"] .fase-path { overflow-x: auto; padding-bottom: 4px; }
  html[data-tema="ps"] .fase-path .fp { flex: 0 0 auto; min-width: 110px; white-space: nowrap; }
  /* barras de ferramentas: campos ocupam a linha toda */
  html[data-tema="ps"] .barra-ferr { gap: 8px; }
  html[data-tema="ps"] .barra-ferr > input, html[data-tema="ps"] .barra-ferr > select { flex: 1 1 100%; min-width: 0 !important; width: auto !important; }
  html[data-tema="ps"] .barra-ferr > button, html[data-tema="ps"] .barra-ferr > a { flex: 1 1 calc(50% - 4px); justify-content: center; text-align: center; }
  /* cabeçalho do cartão da página: título e ações em linhas separadas */
  html[data-tema="ps"] .env-topo { flex-direction: column; align-items: stretch; }
  html[data-tema="ps"] .env-topo > div { display: flex; flex-wrap: wrap; gap: 8px; }
  html[data-tema="ps"] .env-topo > div > button, html[data-tema="ps"] .env-topo > div > a { flex: 1 1 calc(50% - 4px); }
  html[data-tema="ps"] .fin-mes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  html[data-tema="ps"] .fin-mes > button:not(.btn-primary):not(.btn-secondary) { flex: 0 0 40px; min-height: 40px; }
  html[data-tema="ps"] .fin-mes > b { flex: 1; text-align: center; }
  html[data-tema="ps"] .tile .v { font-size: 17px; white-space: nowrap; }
  html[data-tema="ps"] .vg-resumo { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; }
  html[data-tema="ps"] .vg-resumo > * { padding: 10px 12px !important; }
  /* tabelas largas rolam dentro do cartão com uma sombra indicando que há mais à direita */
  html[data-tema="ps"] .card table:not(.crm-tab), html[data-tema="ps"] .fin-bloco table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  html[data-tema="ps"] .card table:not(.crm-tab) thead, html[data-tema="ps"] .card table:not(.crm-tab) tbody, html[data-tema="ps"] .fin-bloco table thead, html[data-tema="ps"] .fin-bloco table tbody { display: table; width: 100%; min-width: 560px; }
}

/* ------------------------------ acabamento de produto (consistência) ------------------------------ */
/* Títulos de cartão em caixa normal, peso 600, sem caixa alta gritante */
html[data-tema="ps"] .card h2, html[data-tema="ps"] .fin-bloco h3, html[data-tema="ps"] .graf h3, html[data-tema="ps"] .pedido h3, html[data-tema="ps"] .env-topo h2 { text-transform: none; letter-spacing: -.01em; font-weight: 600; font-size: 15px; color: var(--ps-text); }
html[data-tema="ps"] .card h2 { margin-bottom: 14px; }
html[data-tema="ps"] .fd-h, html[data-tema="ps"] .sla-bloco h4, html[data-tema="ps"] .tile b, html[data-tema="ps"] .fd-kpi small, html[data-tema="ps"] .fd-ag small { font-size: 11px; letter-spacing: .6px; font-weight: 600; color: var(--ps-muted); }
/* Indicadores (tiles) iguais em todas as telas */
html[data-tema="ps"] .tile { background: var(--ps-card); border: 1px solid var(--ps-border); border-radius: 14px; padding: 16px 18px; box-shadow: var(--ps-sombra); transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
html[data-tema="ps"] .tile .v { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; color: var(--ps-text); }
html[data-tema="ps"] .tile.clicavel:hover { transform: translateY(-1px); border-color: var(--ps-primaria); box-shadow: 0 8px 20px rgba(0, 7, 45, .08); }
html[data-tema="ps"] .tile.destaque .v, html[data-tema="ps"] .tile.destaque b, html[data-tema="ps"] .tile.destaque div { color: #fff; }
/* Botões: mesma altura, mesmo raio, mesmo peso */
html[data-tema="ps"] .btn-primary, html[data-tema="ps"] .btn-secondary, html[data-tema="ps"] .btn-p, html[data-tema="ps"] .btn-s, html[data-tema="ps"] .ps-primary { min-height: 38px; border-radius: 10px; font-weight: 600; font-size: 13px; padding: 8px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .12s ease, border-color .12s ease, box-shadow .12s ease, transform .06s ease; }
html[data-tema="ps"] .btn-primary:active, html[data-tema="ps"] .btn-secondary:active { transform: translateY(1px); }
html[data-tema="ps"] .btn-primary { box-shadow: 0 1px 2px rgba(3, 86, 197, .25); }
html[data-tema="ps"] .btn-mini { border-radius: 8px; font-weight: 600; }
/* Campos: mesma altura e o mesmo foco em toda parte */
html[data-tema="ps"] .field label, html[data-tema="ps"] label.rot { font-size: 12px; font-weight: 600; color: var(--ps-text-2); letter-spacing: 0; text-transform: none; }
html[data-tema="ps"] input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]), html[data-tema="ps"] select, html[data-tema="ps"] textarea { border-radius: 10px; transition: border-color .12s ease, box-shadow .12s ease; }
/* Tabelas: cabeçalho discreto, linhas com respiro, hover suave */
html[data-tema="ps"] table th { font-size: 11px; letter-spacing: .5px; text-transform: uppercase; font-weight: 600; color: var(--ps-muted); }
html[data-tema="ps"] table tbody tr:hover td { background: var(--ps-soft); }
/* Etiquetas (pills) com o mesmo desenho */
html[data-tema="ps"] .pill, html[data-tema="ps"] .chip, html[data-tema="ps"] .ps-badge { border-radius: 999px; font-weight: 600; letter-spacing: 0; }
/* Cartões */
html[data-tema="ps"] .card, html[data-tema="ps"] .fin-bloco, html[data-tema="ps"] .fd-bloco, html[data-tema="ps"] .ps-card { border-radius: 14px; }
/* Foco visível e uniforme (teclado) */
html[data-tema="ps"] :is(button, a, [tabindex]):focus-visible { outline: 2px solid var(--ps-primaria); outline-offset: 2px; border-radius: 8px; }
/* Estados vazios com o mesmo tom em todas as telas */
html[data-tema="ps"] .env-vazio, html[data-tema="ps"] .vazio, html[data-tema="ps"] .vazio-mini, html[data-tema="ps"] .ps-empty { color: var(--ps-muted); font-size: 13px; }
html[data-tema="ps"] .env-vazio, html[data-tema="ps"] .vazio { border: 1px dashed var(--ps-border); border-radius: 12px; padding: 22px 16px; text-align: center; background: var(--ps-soft); }
/* Esqueleto de carregamento para listas (use class="ps-skel") */
html[data-tema="ps"] .ps-skel { display: block; height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--ps-soft) 25%, var(--ps-chip) 50%, var(--ps-soft) 75%); background-size: 200% 100%; animation: ps-skel 1.2s ease-in-out infinite; }
@keyframes ps-skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { html[data-tema="ps"] .ps-skel { animation: none; } }
/* Sidebar: rótulos de grupo e itens com o mesmo ritmo */
html[data-tema="ps"] .nav-sec { font-size: 10.5px; letter-spacing: 1.2px; font-weight: 700; margin: 18px 12px 6px; }
html[data-tema="ps"] .nav-item { font-size: 13.5px; padding-top: 9px; padding-bottom: 9px; transition: background .12s ease, color .12s ease; }
/* Barra do topo: título com hierarquia clara */
html[data-tema="ps"] #topoTitulo { font-weight: 600; letter-spacing: -.01em; }
html[data-tema="ps"] #topoSub { color: var(--ps-muted); }
/* ícones das ações rápidas do cartão de candidato */
html[data-tema="ps"] .cand-acoes svg { width: 16px; height: 16px; }
html[data-tema="ps"][data-modo="escuro"] .btn-mini { background: var(--ps-chip, #1c2740); color: var(--ps-text, #e6ecf7); border-color: var(--ps-border, #2b3a5c); }

/* ------------------------------ indicadores (tiles): uma linha por informação, tudo alinhado ------------------------------ */
/* Rótulo, número e frase ficam cada um em uma linha; o número encolhe com a largura do cartão para nunca quebrar,
   e a frase de apoio fica sempre no pé do cartão, alinhada entre os vizinhos. O texto inteiro aparece ao passar o mouse. */
:is(html[data-tema="ps"], html) .tile { container-type: inline-size; display: flex; flex-direction: column; min-width: 0; }
:is(html[data-tema="ps"], html) .tile > b, :is(html[data-tema="ps"], html) .tile .v, :is(html[data-tema="ps"], html) .tile small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:is(html[data-tema="ps"], html) .tile .v { font-size: clamp(16px, 13cqi, 24px); font-variant-numeric: tabular-nums; }
:is(html[data-tema="ps"], html) .tile small { margin-top: auto; padding-top: 4px; }
/* sem cartão sobrando sozinho numa linha: as colunas seguem a quantidade de indicadores (6 → 3+3, 5 → 3+2, 4 → 4 ou 2+2) */
@media (min-width: 761px) {
  :is(html[data-tema="ps"], html) .tiles:has(> .tile:nth-child(6)):not(:has(> .tile:nth-child(7))) { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  :is(html[data-tema="ps"], html) .tiles:has(> .tile:nth-child(5)):not(:has(> .tile:nth-child(6))) { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
  :is(html[data-tema="ps"], html) .tiles:has(> .tile:nth-child(5)):not(:has(> .tile:nth-child(6))) > .tile { grid-column: span 2; }
  :is(html[data-tema="ps"], html) .tiles:has(> .tile:nth-child(5)):not(:has(> .tile:nth-child(6))) > .tile:nth-child(n+4) { grid-column: span 3; }
  :is(html[data-tema="ps"], html) .tiles:has(> .tile:nth-child(4)):not(:has(> .tile:nth-child(5))) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  :is(html[data-tema="ps"], html) .tiles:has(> .tile:nth-child(3)):not(:has(> .tile:nth-child(4))) { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (min-width: 1000px) {
  :is(html[data-tema="ps"], html) .tiles:has(> .tile:nth-child(4)):not(:has(> .tile:nth-child(5))) { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
@media (min-width: 1360px) {
  :is(html[data-tema="ps"], html) .tiles:has(> .tile:nth-child(5)):not(:has(> .tile:nth-child(6))) { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
  :is(html[data-tema="ps"], html) .tiles:has(> .tile:nth-child(5)):not(:has(> .tile:nth-child(6))) > .tile, :is(html[data-tema="ps"], html) .tiles:has(> .tile:nth-child(5)):not(:has(> .tile:nth-child(6))) > .tile:nth-child(n+4) { grid-column: auto; }
}
@media (min-width: 1600px) {
  :is(html[data-tema="ps"], html) .tiles:has(> .tile:nth-child(6)):not(:has(> .tile:nth-child(7))) { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
}
/* no celular (duas colunas, o primeiro em destaque ocupa a linha toda): o último que ficaria sozinho ocupa a linha inteira */
@media (max-width: 760px) {
  :is(html[data-tema="ps"], html) .tiles:has(> .tile:first-child:is(.destaque, .clicavel)) > .tile:last-child:nth-child(even),
  :is(html[data-tema="ps"], html) .tiles:not(:has(> .tile:first-child:is(.destaque, .clicavel))) > .tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
  /* meia largura não cabe um rótulo longo: rótulo e frase podem usar até duas linhas (sem mouse para ver o texto inteiro) */
  :is(html[data-tema="ps"], html) .tile > b, :is(html[data-tema="ps"], html) .tile small { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.3; }
}

/* setas de mês: desenho no lugar do caractere ‹ › (o caractere fica abaixo do centro, conforme a fonte) */
.seta-mes{ display:inline-flex !important; align-items:center; justify-content:center; font-size:0 !important; min-width:34px; min-height:34px; padding:0 !important; }
.seta-mes::before{ content:''; width:7px; height:7px; border:solid currentColor; border-width:0 2px 2px 0; }
.seta-mes.ant::before{ transform:rotate(135deg); margin-left:3px; }
.seta-mes.prox::before{ transform:rotate(-45deg); margin-right:3px; }
