/* ── Portal RH — componentes de conteúdo ───────────────────────────────── */
/* Layout shell + rail: training-rail.css | tokens: tokens.css               */

/* ── Container ── */
.container { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }

/* ── Login ── */
.login-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  background: radial-gradient(ellipse at 60% 30%, #5a0d12 0%, #1e0305 70%);
}
.login-wrap { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 380px; padding: 24px 16px; }
.login-header { display: flex; flex-direction: column; align-items: center; margin-bottom: 36px; }
.login-logo { width: 210px; display: block; mix-blend-mode: screen; margin-bottom: 20px; }
.login-slogan { color: #fff; font-size: 1.25rem; font-weight: 800; margin: 0; letter-spacing: .01em; }
.login-box { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(8px); border-radius: 14px; padding: 32px; width: 100%; }
.login-box h2 { display: none; }
.login-box .logo { width: 160px; display: block; margin: 0 auto 24px; }
.login-box label { color: rgba(255,255,255,.7); }
.login-box input[type=text], .login-box input[type=email], .login-box input[type=password] {
  background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff;
}
.login-box input::placeholder { color: rgba(255,255,255,.35); }
.login-box input:focus { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.15); }
.login-box .btn-primary { width: 100%; margin-top: 20px; padding: 12px; font-size: .95rem; background: #cc1c1c; }
.login-box .btn-primary:hover { background: #a01515; }

/* ── Forms ── */
label { display: block; font-size: 13px; font-weight: 600; color: var(--color-muted); margin-bottom: 4px; margin-top: 16px; }
input[type=text], input[type=email], input[type=password], input[type=tel], select, textarea {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--color-border); border-radius: 8px;
  font-size: 14px; font-family: var(--font-sans); background: #fff; color: var(--color-text);
  transition: border-color .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--color-primary); }
input[type=checkbox] { width: auto !important; height: auto !important; padding: 0 !important; border: none !important; border-radius: 0 !important; background: transparent !important; appearance: checkbox; -webkit-appearance: checkbox; cursor: pointer; accent-color: #cc1c1c; }
.form-hint { font-size: 12px; color: var(--color-muted); margin-top: 8px; line-height: 1.5; }

/* ── Buttons ── */
.btn-primary { background: var(--color-primary); color: #fff; border: none; border-radius: 8px; padding: 10px 20px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; transition: background .2s; }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-secondary { background: #fff; color: var(--color-text); border: 1.5px solid var(--color-border); border-radius: 8px; padding: 8px 16px; font-size: 14px; font-weight: 500; cursor: pointer; transition: border-color .2s; }
.btn-secondary:hover { border-color: var(--color-primary); }
.btn-ghost { background: transparent; color: var(--color-muted); border: 1px solid var(--color-border); border-radius: 6px; padding: 6px 12px; font-size: 13px; cursor: pointer; text-decoration: none; transition: color .2s, border-color .2s; }
.btn-ghost:hover { color: var(--color-primary); border-color: var(--color-primary); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-link { color: var(--color-primary); text-decoration: none; font-size: 13px; font-weight: 600; }
.btn-link:hover { text-decoration: underline; }

/* ── Cards ── */
.card { background: var(--color-surface); border-radius: 12px; border: 1px solid var(--color-border); padding: 24px; margin-bottom: 20px; }
.card h3 { font-size: 15px; margin-bottom: 16px; }
.card h4 { font-size: 14px; margin-bottom: 12px; color: var(--color-muted); }

/* ── Stats grid ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--color-surface); border-radius: 12px; border: 1px solid var(--color-border); padding: 20px; text-align: center; box-shadow: var(--shadow-md); }
.stat-num { font-size: 36px; font-weight: 700; color: var(--color-text); }
.stat-label { font-size: 13px; color: var(--color-muted); margin-top: 4px; }
.stat-verde .stat-num   { color: var(--green); }
.stat-amarelo .stat-num { color: var(--yellow); }
.stat-vermelho .stat-num { color: var(--red); }
.stat-cinza .stat-num   { color: var(--gray); }

/* ── Filtros ── */
.filtros { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; align-items: flex-end; }
.filtros input, .filtros select { flex: 1; min-width: 160px; margin: 0; }

/* ── Tabela ── */
.table-wrap { background: var(--color-surface); border-radius: 12px; border: 1px solid var(--color-border);
              overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; box-shadow: var(--shadow-md); }
table { width: 100%; border-collapse: collapse; }
thead { background: #f8fafc; }
th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 600; color: var(--color-muted); text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--color-border); }
td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr.row-aprovado:hover td   { background: #f0fdf4; }
tr.row-reprovado:hover td  { background: #fff1f2; }
tr.row-em_avaliacao:hover td { background: #fffbeb; }
tr:hover td { background: #f8fafc; }
.cand-nome { font-weight: 600; }
.cand-email { font-size: 12px; color: var(--color-muted); }

/* ── Badges ── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-verde    { background: #dcfce7; color: #15803d; }
.badge-vermelho { background: #fee2e2; color: #b91c1c; }
.badge-amarelo  { background: #fef3c7; color: #92400e; }
.badge-cinza    { background: #f1f5f9; color: #475569; }
.badge-laranja  { background: #fff7ed; color: #c2410c; }

/* ── Alertas ── */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-sucesso { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.alert-erro    { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }

/* ── Candidato header ── */
.cand-header { display: flex; gap: 20px; align-items: flex-start; background: var(--color-surface); border-radius: 12px; border: 1px solid var(--color-border); padding: 24px; margin-bottom: 20px; }
.cand-avatar { width: 64px; height: 64px; background: var(--color-primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; color: #fff; flex-shrink: 0; }
.cand-header h1 { font-size: 22px; margin-bottom: 6px; }
.cand-meta { font-size: 13px; color: var(--color-muted); margin-bottom: 2px; }
.cand-nota { margin-left: auto; text-align: center; flex-shrink: 0; }
.nota-num { font-size: 48px; font-weight: 700; line-height: 1; }
.nota-label { font-size: 14px; font-weight: 600; margin-top: 4px; }

/* ── Laudo ── */
.laudo-text { font-size: 15px; line-height: 1.7; color: var(--color-text); }
.pontos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.pontos-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.pontos-title.verde { color: var(--green); }
.pontos-title.amarelo { color: var(--yellow); }
.pontos-grid ul { padding-left: 18px; }
.pontos-grid li { font-size: 14px; margin-bottom: 4px; }

/* ── Transcrição ── */
.transcricao { display: flex; flex-direction: column; gap: 20px; }
.qa-pergunta { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; color: var(--color-muted); font-size: 14px; margin-bottom: 6px; }
.qa-num { background: var(--color-primary); color: #fff; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.qa-resposta { font-size: 14px; line-height: 1.6; background: #f8fafc; padding: 12px 16px; border-radius: 8px; margin-left: 32px; }

/* ── Link box ── */
.link-box { display: flex; gap: 10px; align-items: center; background: #f8fafc; border: 1px solid var(--color-border); border-radius: 8px; padding: 10px 14px; }
.link-box code { font-size: 12px; color: var(--color-muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Empty state ── */
.empty-state { padding: 40px; text-align: center; color: var(--color-muted); font-size: 15px; }

/* ── Page header (topbar) ── */
.page-header { font-size: 1.1rem; font-weight: 700; color: var(--color-text); }
.topbar-badge { font-size: 12px; font-weight: 600; background: var(--color-background); color: var(--color-muted); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--color-border); }

/* ── Responsive ───────────────────────────────────────────────────────── */

/* Colunas de tabela dispensaveis no celular: marque o <th> e o <td> com
   .hide-sm e a tabela cabe na tela sem virar uma tira ilegivel. */
/* so aparece no celular (usado p/ trazer dados de colunas ocultas p/ dentro da 1a celula) */
.only-sm { display: none; }

@media (max-width: 768px) {
  .hide-sm { display: none !important; }
  .only-sm { display: block; }

  /* iOS da zoom sozinho em campo com fonte < 16px — principal causa do
     "layout que se desmonta" ao tocar num input. */
  input[type=text], input[type=email], input[type=password], input[type=tel],
  input[type=number], input[type=date], input[type=search], select, textarea {
    font-size: 16px;
  }

  th { padding: 10px 10px; font-size: 11px; }
  td { padding: 12px 10px; font-size: 13.5px; }
  /* coluna de selecao/checkbox nao precisa de 44px + padding no celular */
  th:first-child, td:first-child { padding-left: 6px; padding-right: 2px; }

  .card { padding: 16px; border-radius: 12px; }
  .link-box { flex-wrap: wrap; }
  .link-box code { flex: 1 1 100%; }
}

@media (max-width: 640px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
  .stat-card { padding: 14px 10px; }
  .stat-num { font-size: 26px; }
  .stat-label { font-size: 11.5px; margin-top: 2px; }
  /* card sobrando sozinho na ultima linha ocupa a largura toda */
  .stats-grid > .stat-card:last-child:nth-child(odd) { grid-column: span 2; }

  .filtros { flex-direction: column; align-items: stretch; gap: 8px; }
  .filtros input, .filtros select { min-width: 0; width: 100%; }
  .filtros .btn-secondary, .filtros .btn-ghost, .filtros button, .filtros > a {
    width: 100%; text-align: center; padding: 11px 14px; min-height: 44px;
  }

  .pontos-grid { grid-template-columns: 1fr; }
  .cand-header { flex-wrap: wrap; gap: 14px; padding: 18px; }
  .cand-avatar { width: 52px; height: 52px; font-size: 22px; }
  .cand-header h1 { font-size: 19px; }
  .cand-nota { margin-left: 0; }
  .nota-num { font-size: 38px; }
  .qa-resposta { margin-left: 0; }
  .content { padding: 16px 12px; }

  /* alvos de toque: 44px minimo */
  .btn-primary, .btn-secondary { min-height: 44px; display: inline-flex;
    align-items: center; justify-content: center; }
}
