/* ===================== TREINAMENTOS — PENTE-FINO VISUAL FINAL ===================== */

/* 1) Quando houver só 1 card, usar melhor o espaço horizontal */
@media (min-width: 980px){
  #treinamentos .train-grid:has(.train-card:only-child){
    grid-template-columns: minmax(680px, 820px);
    justify-content: start;
    max-width: 860px;
  }

  #treinamentos .train-grid:has(.train-card:only-child) .train-card{
    max-width: 820px;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    grid-template-areas:
      "media body"
      "media actions";
    align-items: stretch;
  }

  #treinamentos .train-grid:has(.train-card:only-child) .train-media{
    grid-area: media;
    height: 100%;
    min-height: 190px;
    border-right: 1px solid rgba(226,232,240,.85);
  }

  #treinamentos .train-grid:has(.train-card:only-child) .train-thumb{
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  #treinamentos .train-grid:has(.train-card:only-child) .train-body{
    grid-area: body;
    padding: 18px 18px 10px;
    gap: 10px;
    justify-content: center;
  }

  #treinamentos .train-grid:has(.train-card:only-child) .train-actions{
    grid-area: actions;
    padding: 0 18px 18px;
    align-items: center;
  }
}

/* 2) Botão "Criar sala" com mais presença premium */
#treinamentos .train-actions .btnAbrirSala{
  min-width: 132px;
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  border: 1px solid rgba(37,99,235,.10);
  box-shadow:
    0 12px 24px rgba(37,99,235,.18),
    inset 0 1px 0 rgba(255,255,255,.18);
  font-weight: 800;
  letter-spacing: -0.01em;
}

#treinamentos .train-actions .btnAbrirSala:hover{
  transform: translateY(-1px);
  box-shadow:
    0 16px 28px rgba(37,99,235,.24),
    inset 0 1px 0 rgba(255,255,255,.18);
  filter: brightness(1.02);
}

#treinamentos .train-actions .btnAbrirSala:active{
  transform: translateY(0);
  box-shadow:
    0 10px 18px rgba(37,99,235,.18),
    inset 0 1px 0 rgba(255,255,255,.12);
}

/* botão Configurar acompanha melhor o nível visual */
#treinamentos .train-actions .btnConfig{
  height: 40px;
  border-radius: 12px;
  border: 1px solid #dbe4ef;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  color: #0f172a;
  box-shadow: 0 8px 18px rgba(15,23,42,.04);
}

#treinamentos .train-actions .btnConfig:hover{
  background: #ffffff;
  border-color: #c9d6e4;
  box-shadow: 0 12px 22px rgba(15,23,42,.06);
}

/* 3) Botão Abrir PDF menos pesado e mais elegante */
#treinamentos .btnCertTreina{
  height: 40px;
  min-width: 124px;
  padding: 0 14px;
  border-radius: 11px;
  background: linear-gradient(135deg, #19b67f, #0f9f6e);
  border: 1px solid rgba(5,150,105,.10);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  box-shadow:
    0 10px 20px rgba(5,150,105,.14),
    inset 0 1px 0 rgba(255,255,255,.16);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease, opacity .16s ease;
}

#treinamentos .btnCertTreina:hover{
  transform: translateY(-1px);
  box-shadow:
    0 14px 24px rgba(5,150,105,.18),
    inset 0 1px 0 rgba(255,255,255,.16);
  filter: brightness(1.015);
}

#treinamentos .btnCertTreina:active{
  transform: translateY(0);
  box-shadow:
    0 8px 16px rgba(5,150,105,.14),
    inset 0 1px 0 rgba(255,255,255,.12);
}

/* tabela ganha um pouco mais de respiro para combinar com o restante */
#treinamentosConcluidosWrap .table-wrap{
  border-radius: 20px;
  box-shadow: 0 16px 32px rgba(15,23,42,.045);
}

#treinamentosConcluidosWrap .table-epi tbody td{
  padding-top: 16px;
  padding-bottom: 16px;
}

/* no mobile, volta para card vertical normal */
@media (max-width: 979px){
  #treinamentos .train-grid{
    max-width: none;
  }

  #treinamentos .train-card{
    max-width: 380px;
  }
}

@media (max-width: 760px){
  #treinamentos .train-card{
    max-width: none;
  }

  #treinamentos .btnCertTreina{
    width: 100%;
  }
}


/* ===================== TREINAMENTOS — ALINHAMENTO FINO DA TABELA ===================== */

/* mantém Colaborador e CPF à esquerda */
#treinamentosConcluidosWrap .table-epi thead th:nth-child(1),
#treinamentosConcluidosWrap .table-epi tbody td:nth-child(1),
#treinamentosConcluidosWrap .table-epi thead th:nth-child(2),
#treinamentosConcluidosWrap .table-epi tbody td:nth-child(2){
  text-align: left;
}

/* centraliza Treinamento */
#treinamentosConcluidosWrap .table-epi thead th:nth-child(3),
#treinamentosConcluidosWrap .table-epi tbody td:nth-child(3){
  text-align: center;
}

/* centraliza Data + status */
#treinamentosConcluidosWrap .table-epi thead th:nth-child(4),
#treinamentosConcluidosWrap .table-epi tbody td:nth-child(4){
  text-align: center;
}

#treinamentosConcluidosWrap .table-epi tbody td:nth-child(4){
  white-space: nowrap;
}

/* garante que data + badge fiquem centralizados juntos */
#treinamentosConcluidosWrap .table-epi tbody td.date-cell{
  justify-content: center;
  text-align: center;
}

/* centraliza Certificado */
#treinamentosConcluidosWrap .table-epi thead th:nth-child(5),
#treinamentosConcluidosWrap .table-epi tbody td:nth-child(5){
  text-align: center;
}

/* deixa o botão do certificado centralizado dentro da célula */
#treinamentosConcluidosWrap .table-epi tbody td:nth-child(5){
  vertical-align: middle;
}

/* ===== Treinamentos (cards + quiz) ===== */
/* Header — estilo SaaS */
.train-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
  padding:12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(250,250,252,0.6));
  border: 1px solid rgba(226,232,240,0.6);
  border-radius:12px;
  box-shadow: 0 10px 30px rgba(15,23,42,0.04);
}
.train-header-left{ display:flex; flex-direction:column; gap:6px; }
.train-header-left h3{ margin:0; font-size:1.125rem; font-weight:800; color:#0f1724; }
.train-header-left .train-subtitle{ margin:0; color:#475569; font-size:0.95rem; }
.train-header-right{ display:flex; gap:10px; align-items:center; }
.train-search{ padding:10px 12px; border-radius:10px; border:1px solid #e6e9ef; min-width:260px; background:#fff; }

/* Grid responsivo que 'enche' a tela mesmo com poucos itens */
.train-grid{
  display:grid;
  gap:18px;
  /* auto-fit + minmax permite 2–4 cards por linha conforme largura, e 'enche' a tela */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items:start;
  width:100%;
}

/* Card mais executivo */
.train-card{
  display:flex;
  flex-direction:column;
  background:#fff;
  border:1px solid #e7edf7;
  border-radius:14px;
  overflow:hidden;
  box-shadow: 0 12px 30px rgba(15,23,42,0.06);
  min-height: 180px;
}
.train-media{
  position: relative;
  /* altura reduzida por padrão para dar mais espaço ao conteúdo */
  height:100px;
  background:linear-gradient(180deg,#f8fafc,#ffffff);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.train-thumb{ width:100%; height:100%; object-fit:cover; display:block; }
.train-media .no-thumb{ font-weight:700; color:#64748b; font-size:14px; }
.train-body{ padding:14px; display:flex; flex-direction:column; gap:8px; flex:1; }
.train-title{ font-size:15px; font-weight:800; color:#0b1220; line-height:1.15; }
.train-meta{ font-size:13px; color:#6b7280; }
.train-actions{ display:flex; gap:8px; align-items:center; padding:12px 14px; border-top:1px solid #f1f5f9; justify-content:flex-end; }
.train-actions .btnConfig{ background:#fff; color:#0f1724; border:1px solid #e6e9ef; padding:8px 12px; border-radius:10px; }
/* btnAbrirSala: estilo único, antigo .btnIniciar removido (legado) */
.train-actions .btnAbrirSala{ background: linear-gradient(90deg,#0ea5e9,#2563eb); color:#fff; border:none; padding:8px 14px; border-radius:10px; font-weight:700; }

/* Delete button (floating) */
#treinamentos .train-card{ position: relative; }
#treinamentos .train-card .btnDelTpl{ position:absolute; top:10px; right:10px; width:32px; height:32px; padding:0; border-radius:999px; border:1px solid rgba(248,113,113,0.25); background:#fff; color:#b91c1c; display:inline-flex; align-items:center; justify-content:center; box-shadow:0 8px 18px rgba(15,23,42,0.08); }

/* Melhor comportamento de botões dentro dos cards (override do global) */
#treinamentos .train-card button:not(.btnDelTpl){ min-width:120px; }

@media (max-width:760px){
  .train-header{ flex-direction:column; align-items:stretch; }
  .train-header-right{ justify-content:space-between; }
  .train-search{ width:100%; min-width:0; }
  .train-media{ height:100px; }
}

@media (max-width:420px){
  .train-grid{ gap:12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .train-actions .btnIniciar, .train-actions .btnConfig{ padding:8px 10px; font-size:13px; }
}

/* Badges inside card */
.train-title-row{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.train-badges{ display:flex; gap:6px; align-items:center; }
.badge{ font-size:12px; padding:4px 8px; border-radius:999px; font-weight:700; display:inline-block; }
.badge-mod{ background:#eef2ff; color:#2563eb; border:1px solid #dbeafe; }
.badge-warn{ background:#fff7ed; color:#b45309; border:1px solid #fde4c7; }
.badge-atten{ background:#fffbeb; color:#92400e; border:1px solid #fef3c7; }

/* Overlay sutil na imagem para reduzir dominância da ilustração */
.train-media::after{
  content: "";
  position: absolute;
  inset: 0;
  /* overlay sutil para reduzir dominância da imagem */
  background: linear-gradient(180deg, rgba(0,0,0,0.00), rgba(0,0,0,0.08));
  pointer-events: none;
}

/* Compactar card quando for apenas 1 item na grid */
.train-grid > .train-card:only-child{ min-height:110px; }
.train-grid > .train-card:only-child .train-media{ height:70px; }

/* Chips de meta (carga/validade) */
.chip{ display:inline-flex; align-items:center; gap:6px; background:#f8fafc; color:#0f1724; border-radius:999px; padding:6px 10px; font-weight:700; font-size:13px; border:1px solid #eef2ff; }
.chip-time{ background:#eef2ff; color:#1d4ed8; border-color:#dbeafe; }
.chip-exp{ background:#fff7ed; color:#92400e; border-color:#fef3c7; }

/* Resumo / filtros acima da tabela de treinamentos concluídos */
.treina-summary{ display:inline-flex; gap:6px; align-items:center; margin:6px 0 12px 0; background:transparent; border-radius:10px; }
.summary-filter{ background:transparent; border:1px solid transparent; padding:6px 10px; border-radius:8px; cursor:pointer; font-weight:700; color:#2563eb; height:34px; display:inline-flex; align-items:center; justify-content:center; font-size:13px; transition: all .18s ease; }
.summary-filter:hover{ transform:translateY(-2px); box-shadow:0 6px 18px rgba(37,99,235,0.06); }
.summary-filter.active{ background:#2563eb; color:#fff; border-color: #2563eb; box-shadow:0 10px 30px rgba(37,99,235,0.12); }
.summary-filter{ position:relative; }
.summary-filter.active::after{ content: ""; position:absolute; left:8px; right:8px; height:3px; bottom:-6px; background:#1d4ed8; border-radius:3px; }

/* Give segmented look: small separator between buttons when not active */
.summary-filter + .summary-filter{ margin-left:4px; }

/* Table wrap visual feedback when filters change */
.table-wrap{ transition: border-color .22s ease, box-shadow .22s ease, transform .18s ease; }
.table-wrap.filter-valid{ border-color: #10b981; box-shadow: 0 12px 32px rgba(16,185,129,0.06); }
.table-wrap.filter-near{ border-color: #f59e0b; box-shadow: 0 12px 32px rgba(245,158,11,0.06); }
.table-wrap.filter-expired{ border-color: #ef4444; box-shadow: 0 12px 32px rgba(239,68,68,0.06); }
.table-wrap.filter-all{ border-color: #e6e9ef; }
.table-wrap.filter-anim{ transform: translateY(-4px); }

/* Subtle row coloring for status */
.table-epi tbody tr.status-near{ background: linear-gradient(90deg, rgba(255,247,237,0.35), rgba(255,255,255,0)); transition: background .25s ease; }
.table-epi tbody tr.status-expired{ background: linear-gradient(90deg, rgba(255,241,242,0.35), rgba(255,255,255,0)); transition: background .25s ease; }
.table-epi tbody tr.status-valid{ background: transparent; transition: background .25s ease; }

/* Status badges: visual refinements to be inline and subtle
  - use a centered interpunct '•' separator via ::before
  - show status as compact inline label (no heavy background)
  - color the text per status; for expired rows we keep the subtle red
*/
.status-badge{ display:inline-flex; align-items:center; gap:6px; margin-left:8px; padding:0; border-radius:4px; font-weight:700; font-size:13px; line-height:1; color:var(--status-fg, #059669); background:transparent; border:0; }
.status-badge::before{ content: "•"; display:inline-block; color:#9ca3af; font-size:14px; margin-right:6px; }
.status-badge.valid{ color:#059669; }
.status-badge.near{ color:#92400e; }
.status-badge.expired{ color:#b91c1c; }

/* Ajuste do botão Certificado para aparência mais 'soft' */
#treinamentos .btnCertTreina{ padding:6px 10px; border-radius:8px; font-size:13px; }

/* Espaçamento para a área de treinamentos concluídos (anteriormente inline) */
#treinamentos #treinamentosConcluidosWrap,
.treinamentos-concluidos-wrap{
  margin-top: 20px;
}

/* Estilo moderno para a tabela de treinamentos concluídos (dentro de #treinamentos) */
#treinamentos .table-wrap{
  background:#fff;
  border:1px solid #e6e9ef;
  border-radius:12px;
  padding:12px;
  box-shadow:0 10px 30px rgba(15,23,42,0.04);
}
#treinamentos .table-epi{
  width:100%;
  border-collapse: collapse;
  font-size:14px;
}
#treinamentos .table-epi thead th{
  text-align:left;
  padding:10px 12px;
  font-weight:700;
  color:#0f1724;
  border-bottom:1px solid #eef2f6;
}
#treinamentos .table-epi tbody td{
  padding:10px 12px;
  color:#374151;
  border-bottom:1px solid #f2f4f7;
}
#treinamentos .table-epi tbody tr:hover{ background:#fbfdff; }

/* Botão Certificado — destaque visual */
#treinamentos .btnCertTreina{
  background: linear-gradient(90deg,#10b981,#059669);
  color:#fff;
  border:none;
  padding:8px 12px;
  border-radius:8px;
  font-weight:700;
  cursor:pointer;
}
/* Data concluída — integrar status na própria célula (data + badge discreto)
   .mono continuará sendo usado pelo CPF (muted); .date-cell é para data+badge */
#treinamentos .table-epi tbody td.mono{
  color:#6b7280; /* CPF menos proeminente */
  font-size:13px; /* tornar o CPF mais discreto */
  font-weight:500;
}
#treinamentos .table-epi tbody td.date-cell{
  display:table-cell;
  vertical-align:middle;
  white-space:nowrap;
  color:#374151; /* cor principal para a data */
}

/* Ajustes específicos sugeridos para a aba Treinamentos */
/* Botão Novo Treinamento - estilo 'pill' azul (igual #btnAbrirCadastroEPI) */
#btnNovoTreina {
  width: auto;
  padding: 10px 22px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(37,99,235,0.35);
  cursor: pointer;
}
#btnNovoTreina:hover{
  transform: translateY(-1px);
  filter: brightness(1.05);
}

/* Corrige comportamento global de `button { width:100% }` apenas dentro dos cards
   e evita estilizar o botão de exclusão (.btnDelTpl) */
/* Botões principais dos cards de treinamento (Iniciar / Configurar) */
#treinamentos .train-card button:not(.btnDelTpl),
.train-grid .train-card button:not(.btnDelTpl){
  width: auto;
  min-width: 140px;
  border-radius: 999px;
  font-weight: 600;
}

/* Botões primário / secundário nos cards */
#treinamentos .train-card button:first-child,
.train-grid .train-card button:first-child{
  background: #1d4ed8;
  color: #fff;
  border: none;
}

#treinamentos .train-card button:last-child,
.train-grid .train-card button:last-child{
  background: #fff;
  color: #1f2937;
  border: 1px solid #d1d5db;
  margin-left: 8px;
}

/* Placeholder 'Sem capa' mais amigável */
.train-media{
  background: #f3f6fb;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #64748b;
  font-size: 13px;
}
/* Garante que o card sirva de referência para posicionamento absoluto do botão */
#treinamentos .train-card{
  position: relative;
}

/* Botão de exclusão do treinamento (ícone flutuando no canto) */
#treinamentos .train-card .btnDelTpl{
  position: absolute;
  top: 10px;
  right: 10px;

  width: 28px;
  height: 28px;
  padding: 0;

  border-radius: 999px;
  border: 1px solid rgba(248,113,113,0.45);
  background: #ffffff;
  color: #b91c1c;

  font-size: 16px;
  line-height: 1;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15,23,42,0.18);
  transition:
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.12s ease;
}

#treinamentos .train-card .btnDelTpl:hover{
  background: #fee2e2;
  color: #991b1b;
  box-shadow: 0 10px 22px rgba(248,113,113,0.32);
  transform: translateY(-1px);
}

#treinamentos .train-card .btnDelTpl:active{
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(15,23,42,0.20);
}
.train-media .no-thumb::before{
  content: "🧑‍🏫";
  font-size: 26px;
  margin-bottom: 4px;
}

/* Tipografia dentro do card */
.train-title{
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}
.train-meta{
  font-size: 12px;
  color:#64748b;
}

/* Espaçamento entre grid de cards e bloco de concluídos */
#trainGrid, .train-grid {
  margin-bottom: 18px;
}

#treinamentosConcluidosWrap {
  margin-top: 0;
}

/* Tabela de Concluídos: CPF em monospace, Certificado central e em verde */
#treinamentosConcluidosWrap .table-epi th:nth-child(2),
#treinamentosConcluidosWrap .table-epi td:nth-child(2){
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

#treinamentosConcluidosWrap .table-epi th:nth-child(4),
#treinamentosConcluidosWrap .table-epi td:nth-child(4){
  text-align: center;
}

#treinamentosConcluidosWrap .table-epi td:nth-child(4){
  font-weight: 600;
  color: #16a34a;
}

.quiz-block{
  margin-top: 10px;
  border: none;
  padding: 0;
  background: transparent;
}

.quiz-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}

.quiz-title{
  font-weight:700;
  font-size:16px;
  color:#0f172a;
}

/* Suavização do cartão da questão (visual mais plano) */
.quiz-item{
  border:1px solid #e2e8f0;
  border-radius:14px;
  padding:18px 22px 16px;
  background:#ffffff;
  margin-top:14px;
  box-shadow:0 6px 16px rgba(15,23,42,0.06);
  max-width:100%;          /* garante que nunca fique menor do que o bloco */
  box-sizing:border-box;
}

/* Deixa espaço entre as questões */
.quiz-item + .quiz-item{
  margin-top:14px;
}

/* Enunciado da pergunta (onde aparece “1) …”) */
.q-enunciado{
  font-weight:600;
  font-size:15px;
  color:#0f172a;
  margin-bottom:10px;
  line-height:1.6;
}


/* Cada alternativa em uma linha “pill” flexível */
.q-alt-row{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin-top:8px;
  padding:10px 14px;
  border-radius:16px;              /* mais arredondado */
  border:1px solid #e5e7eb;
  background:#ffffff;
  cursor:pointer;
  transition:
    background-color .15s ease,
    border-color .15s ease,
    box-shadow .15s ease,
    transform .08s ease;
}

/* Espaço entre alternativas */
.q-alt-row + .q-alt-row{
  margin-top:8px;
}

/* Hover suave */
.q-alt-row:hover{
  background:#eff6ff;
  border-color:#93c5fd;
  box-shadow:0 3px 10px rgba(148,163,184,0.30);
  transform:translateY(-1px);
}

/* Radio pequeno, sem ocupar largura toda */
.q-alt-row input[type="radio"]{
  flex:0 0 auto;
  margin:3px 0 0 0;
  width:auto;          /* IMPORTANTÍSSIMO: nada de 100% aqui */
}

/* Texto da alternativa ocupa o resto da linha e quebra certinho */
.q-alt-row span{
  flex:1;
  font-size:14px;
  color:#111827;
  line-height:1.5;
  text-align:left;
  white-space:normal !important;
  word-break:break-word;
  overflow-wrap:anywhere;
}

/* Quando marcada, destaca o texto */
.q-alt-row input[type="radio"]:checked + span{
  font-weight:600;
  color:#1d4ed8;
}

/* Esconde quaisquer linhas antigas dentro da alternativa */
.quiz-item .linha{
  display:none;
}

/* Quando a alternativa estiver marcada, dá destaque no texto */
.q-alt-row input[type="radio"]:checked + span{
  font-weight:600;
  color:#1d4ed8;
}

/* Caso use input de texto na parte administrativa do quiz */
.q-alt-row input[type="text"]{
  flex:1;
}

/* Rodapé do formulário (Cancelar / Enviar) */
.q-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:12px;
}

/* Labels dentro da avaliação – ficam em linha, não em bloco */
.quiz-item label{
  display:inline;
  margin:0;
  font-weight:400;
  color:#0f172a;
}

/* Specific override for Sala de Treinamento to avoid stacking conflicts
   with other global modal rules elsewhere in the stylesheet. This forces
   the overlay/modal for the training flow to appear above other overlays. */
#salaTreinaOverlay.modal-overlay {
  z-index: 10000 !important;
}
#salaTreinaOverlay.modal-overlay.is-open {
  display: block !important;
  z-index: 10000 !important;
  pointer-events: auto !important;
}
#salaTreinamentoBox.sala-treina-modal {
  z-index: 10010 !important;
  pointer-events: auto !important;
}
#salaTreinamentoBox.sala-treina-modal.is-open {
  display: block !important;
  z-index: 10010 !important;
}

.muted{ color:#64748b; font-size:12px; }
.empty,.skeleton{ padding:16px; color:#475569; background:#fff; border:1px solid #e3e7ef; border-radius:10px; }

/* ===== Treinamentos – tabela de concluídos ===== */
#treinamentosConcluidosWrap h4{
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

#treinamentosConcluidosWrap .table-wrap{
  margin-top: 4px;
}

#treinamentosConcluidosWrap .table-epi{
  font-size: 13px;
}

/* opcional: deixa as colunas mais compactas */
#treinamentosConcluidosWrap .table-epi th,
#treinamentosConcluidosWrap .table-epi td{
  padding: 8px 6px;
}



/* -------- Modal da Sala de Treinamento -------- */

/* Overlay escuro por trás do modal */
.modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,0.35);
  backdrop-filter: blur(4px);
  z-index: 980;
  display:none;
}

/* Card do modal */
.sala-treina-modal{
  position:fixed;
  top:50%;
  left:50%;
  transform: translate(-50%, -50%);
  max-width:520px;
  width:100%;
  background:#ffffff;
  border-radius:18px;
  padding:22px 24px 20px;
  box-shadow:0 22px 55px rgba(15,23,42,0.25);
  border:1px solid #e6e9ef;
  z-index: 9010;
  display:none;
}

/* Título e texto do modal */
.sala-treina-modal h4{
  margin:0 0 8px;
  font-size:18px;
  font-weight:600;
}

.sala-treina-modal p{
  margin:0 0 14px;
  font-size:13px;
  color:#4b5563;
}

/* Labels e selects internos */
.sala-treina-modal label{
  display:block;
  font-size:13px;
  font-weight:500;
  margin-bottom:4px;
  color:#374151;
}

.sala-treina-modal select{
  width:100%;
  padding:8px 10px;
  border-radius:8px;
  border:1px solid #d1d5db;
  font-size:13px;
  margin-bottom:12px;
}

/* Skeleton loading inside the sala modal */
.sala-treina-skeleton{ display:none; margin-bottom:12px; }
.sala-treina-skeleton[aria-hidden="false"]{ display:block; }
.sala-treina-skeleton .sk-row{ height:12px; background: linear-gradient(90deg,#f3f4f6,#eef2f7); border-radius:6px; margin:8px 0; }
.sala-treina-skeleton .sk-row.sk-short{ width:40%; height:14px; }
.sala-treina-skeleton .sk-row.sk-long{ width:90%; height:14px; }

/* Área do botão criar + link gerado */
.salaTreina-actions{
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:6px;
}

.salaTreina-actions .btn{
  white-space:nowrap;
}

.sala-link{
  flex:1;
  font-size:12px;
  color:#111827;
  word-break:break-all;
}

/* Botão de fechar (X) no canto */
.modal-close{
  position:absolute;
  top:8px;
  right:8px;
  width:40px;
  height:40px;
  border-radius:10px;
  border:none;
  background:transparent;
  color:#6b7280;
  cursor:pointer;
  font-size:18px;
  line-height:1;
  display:inline-flex; align-items:center; justify-content:center;
}

.modal-close:hover{
  background:#f3f4f6;
  color:#111827;
}

/* Sala modal premium styles */
.sala-header{ padding-bottom:10px; }
.sala-title-row{ display:flex; gap:12px; align-items:center; }
.sala-icon{ width:20px; height:20px; display:inline-flex; align-items:center; justify-content:center; color:#2563eb; }
.sala-icon svg{ width:20px; height:20px; display:block; }
.sala-icon svg path{ stroke: currentColor; }
.sala-title{ margin:0; font-size:18px; font-weight:700; }
.sala-sub{ font-size:13px; color:#6b7280; margin-top:4px; }
.sala-divider{ height:1px; background: linear-gradient(90deg, rgba(15,23,42,0.04), rgba(15,23,42,0.03)); margin-top:12px; margin-bottom:12px; border-radius:1px; }
.sala-body{ padding-bottom:12px; }
.sala-label{ display:block; font-size:12px; color:#6b7280; margin-bottom:6px; font-weight:600; }
.sala-treina-modal{ padding:20px 22px 18px; border-radius:16px; }
.sala-treina-modal select{ transition: box-shadow .12s ease, border-color .12s ease; }
.sala-treina-modal select:focus{ outline:none; box-shadow:0 6px 22px rgba(37,99,235,0.08); border-color:#2563eb; }

.sala-footer{ display:flex; justify-content:space-between; align-items:center; gap:16px; margin-top:10px; }
.sala-actions-left{ display:flex; gap:8px; }
.sala-actions-right{ display:flex; gap:12px; align-items:center; }
.sala-actions-right .btn-tertiary{ font-size:13px; padding:7px 10px; color:#6b7280; opacity:0.95; }
.btn-tertiary{ background:transparent; border:1px solid transparent; color:#374151; padding:8px 12px; border-radius:10px; }
.btn-primary{ background: linear-gradient(90deg,#1d4ed8,#2563eb); color:#fff; border:none; padding:8px 16px; border-radius:10px; font-weight:700; }
.btn-primary[disabled]{ opacity:.6; cursor:default; }

.btn-secondary{ background:#fff; border:1px solid #e6e9ef; color:#0b1220; padding:8px 12px; border-radius:10px; }
.btn-tertiary{ background:transparent; border:1px solid transparent; color:#374151; padding:8px 12px; border-radius:10px; }

.link-input{ width:100%; border:none; background:transparent; font-size:13px; color:#0b5ed7; }
.link-input:focus{ outline:none; }

/* Overlay enhancements */
.modal-overlay.is-open{ backdrop-filter: blur(3px); background: rgba(8,10,20,0.6); }

/* Modal entrance animation */
.sala-treina-modal.is-open{ animation: modalEnter .18s cubic-bezier(.2,.9,.2,1); }
@keyframes modalEnter{ from{ opacity:0; transform: translate(-50%,-48%) scale(.98); } 50% { opacity:0.6; transform: translate(-50%,-49%) scale(.992);} to{ opacity:1; transform: translate(-50%,-50%) scale(1); } }

/* Link box for success modal */
.link-box.sala-link{ padding:12px 14px; border-radius:12px; border:1px solid #e6eefb; background:#fbfdff; word-break:break-all; margin:10px 0; }
.link-box.sala-link a{ color:#0b5ed7; text-decoration:none; }

/* Skeleton rows */
.sala-treina-skeleton{ display:none; margin-bottom:12px; }
.sala-treina-skeleton[aria-hidden="false"]{ display:block; }
.sala-treina-skeleton .sk-row{ height:12px; background: linear-gradient(90deg,#f3f4f6,#eef2f7); border-radius:6px; margin:8px 0; }
.sala-treina-skeleton .sk-row.sk-short{ width:40%; height:14px; }
.sala-treina-skeleton .sk-row.sk-long{ width:90%; height:14px; }

/* Estado "aberto" do modal/overlay */
.modal-overlay.is-open{
  display:block;
}
.modal.is-open{
  display: block;
}

.sala-treina-modal.is-open{
  display:block;
}

/* Regras antigas de `.login-card` removidas — usamos `.login-panel` no bloco final */


/* legacy login overrides removed — final login styles are scoped at the end of this file */

/* ===== Treinamentos (cards + quiz) ===== */
/* LOGIN FINAL — versão corrigida e centralizada
   ============================================ */

#loginSection {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center; /* CENTRALIZA NO MEIO */
  overflow: hidden;
}




/* ==================================================
   AVALIAÇÃO (PROVA) – VISUAL REFINADO
   ================================================== */

/* Bloco geral da prova */
.quiz-block{
  margin: 16px auto;
  max-width: 1100px;   /* aumenta a largura máxima */
  width: 95vw;         /* ocupa quase a tela inteira */
  padding: 8px 0 16px; /* um pouco mais de respiro */
}

/* Cabeçalho "Avaliação" */
.quiz-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:12px;
}

.quiz-title{
  font-weight:700;
  font-size:18px;
  color:#0f172a;
}

/* Cada questão em um card */
.quiz-item{
  border:1px solid #e2e8f0;
  border-radius:18px;
  padding:16px 18px 14px;
  background:#ffffff;
  margin-top:14px;
  box-shadow:0 10px 24px rgba(15,23,42,0.08);
  counter-reset: altIndex;   /* reinicia A/B/C/D a cada questão */
}

/* Enunciado (onde estava "1) ..." etc.) */
.q-enunciado{
  font-weight:600;
  font-size:15px;
  color:#0f172a;
  margin-bottom:12px;
  line-height:1.6;
}

/* Linha de alternativa */
/* Cada alternativa no estilo A, B, C, D */
.q-alt-row{
  position: relative;
  display: block;
  margin: 8px 0;
  padding: 6px 0 6px 44px;        /* espaço para o círculo da letra à esquerda */
  cursor: pointer;
}

/* Bolinha com A / B / C / D */
.q-alt-row::before{
  counter-increment: altIndex;
  content: counter(altIndex, upper-alpha);   /* A, B, C, D... */
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #f97316;     /* laranja parecido com seu exemplo */
  color: #f97316;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  background: #fff;
}

/* Esconde o radio (continuamos usando ele, mas sem aparecer) */
.q-alt-row input[type="radio"]{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Texto da alternativa (pode ser grande, várias linhas) */
.q-alt-row span{
  display: block;
  font-size: 14px;
  color: #111827;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  word-break: break-word;
}

/* Quando a alternativa estiver marcada, só dá um leve destaque */
.q-alt-row input[type="radio"]:checked + span{
  font-weight: 600;
}

/* Rodapé Cancelar / Enviar */
.q-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:16px;
}

/* Remove o width:100% apenas nesses botões */
.q-actions button{
  width:auto;
  min-width:120px;
  border-radius:999px;
}

/* Botão Cancelar (branco) */
.q-actions button:first-child{
  background:#ffffff;
  color:#111827;
  border:1px solid #e5e7eb;
}

/* Botão Enviar (azul BRAZSAFE) */
.q-actions button:last-child{
  background:linear-gradient(135deg,#1d4ed8,#2563eb);
  color:#ffffff;
  border:none;
  box-shadow:0 10px 24px rgba(37,99,235,0.35);
}

/* Caso existam elementos decorativos de linha dentro das alternativas, escondemos aqui */
.quiz-item .linha{ display:none; }


.modal .modal-content {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.45;
  word-break: break-all;
}

.modal .link-box {
  margin-top: 16px;
  background: #f5f7fb;
  padding: 12px;
  border-radius: 8px;
  color: #0f172a;
  font-size: 14px;
  word-break: break-all;
}

.modal .modal-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

.modal .btn-primary {
  background: linear-gradient(90deg, #0d6efd, #1d4ed8);
  padding: 10px 18px;
  border-radius: 8px;
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

.modal .btn-primary:hover {
  filter: brightness(1.08);
}

/* ========================================== */

/* ==== FIX VISUAL AVALIAÇÃO – SOMENTE LETRA EM BOLINHA, SEM CAIXA AZUL ==== */

/* Linha de alternativa sem cartão azul antigo */
.q-alt-row{
  position: relative;
  display: block;
  margin: 8px 0;
  padding: 6px 0 6px 44px; /* espaço pro círculo A/B/C/D */
  
  /* zera o visual do estilo antigo */
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Hover bem suave só na linha toda */
.q-alt-row:hover{
  background: #f9fafb !important;
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Garante que o radio fique invisível e não estique nada */
.q-alt-row input[type="radio"]{
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none;
  width: auto !important;
  margin: 0;
  padding: 0;
}

/* Texto da alternativa, ocupando toda a largura à direita da bolinha */
.q-alt-row span{
  display: block;
  font-size: 14px;
  color: #111827;
  line-height: 1.5;
  white-space: normal;
  word-break: break-word;
}

/* Quando marcada, só destaca o texto (sem mudar a bolinha laranja) */
.q-alt-row input[type="radio"]:checked + span{
  font-weight: 600;
  color: #1d4ed8;
}



/* Modal da avaliação ocupando bem a largura da tela */
.modal {
  max-width: 1100px;
  width: 95%;
}

/* ============ AVALIAÇÃO – QUESTÕES E ALTERNATIVAS ============ */

/* Bloco de cada questão */
.quiz-item {
  background: #fff;
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 18px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

/* Enunciado da pergunta */
.q-enunciado {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 12px;
  line-height: 1.5;
}

/* Cada alternativa em linha: letra + texto */
.q-alt-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  position: relative;
}

/* efeito ao passar o mouse */
.q-alt-row:hover {
  background: #f9fafb;
  transform: translateX(1px);
}

/* Esconde o radio "feio" mas mantém clicável pelo label */
.q-alt-row input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Bolinha com a letra A/B/C/D */
.q-alt-letter {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid #f97316;
  color: #f97316;

  /* centraliza perfeitamente a letra dentro do círculo */
  display: inline-grid !important;
  place-items: center !important;   /* centraliza vertical+horizontal de forma consistente */
  font-family: inherit !important;  /* garante mesma métrica de fonte do restante do app */
  font-weight: 600 !important;
  font-size: 14px !important;
  line-height: 1 !important;        /* evita deslocamento por line-height */
  box-sizing: border-box !important;
  padding: 0 !important;
  transform: translateY(0.6px) !important; /* ajuste fino para centralizar no Windows/Chrome */
  vertical-align: middle !important;
}

/* Texto da alternativa */
.q-alt-text {
  flex: 1;
  font-size: 14px;
  color: #111827;
  line-height: 1.5;
}

/* Quando marcada: pinta a bolinha e dá destaque */
.q-alt-row input[type="radio"]:checked + .q-alt-letter {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.q-alt-row input[type="radio"]:checked ~ .q-alt-text {
  font-weight: 600;
}

/* Desativa o pseudo-elemento anterior que gerava A/B/C/D com ::before
   (mantemos agora a letra via .q-alt-letter para maior controle) */
.q-alt-row::before {
  display: none !important;
  content: none !important;
}

/* ===== Override final: garante alinhamento consistente das letras A/B/C/D ===== */
.quiz-item .q-alt-row {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 6px 10px !important; /* remove eventuais paddings antigos */
  margin: 8px 0 !important;
}

.quiz-item .q-alt-letter {
  flex: 0 0 28px !important;
  width: 28px !important;
  height: 28px !important;
  display: inline-grid !important;
  place-items: center !important;
  font-size: 14px !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  transform: none !important;
  vertical-align: middle !important;
}

.quiz-item .q-alt-text {
  margin: 0 !important;
  padding: 0 !important;
}



/* ===================== TREINAMENTOS — OVERRIDE PREMIUM FINAL ===================== */
#treinamentos{
  --tr-text:#0f172a;
  --tr-muted:#64748b;
  --tr-border:#e2e8f0;
  --tr-border-strong:#d5deea;
  --tr-blue:#2563eb;
  --tr-blue-dark:#1d4ed8;
  --tr-green:#059669;
  --tr-orange:#b45309;
  --tr-red:#b91c1c;
}

/* Header */
#treinamentos .train-header{
  margin-bottom:22px;
  padding:16px 18px;
  border-radius:18px;
  background:linear-gradient(180deg, rgba(255,255,255,.95), rgba(248,250,252,.95));
  border:1px solid rgba(226,232,240,.95);
  box-shadow:0 14px 34px rgba(15,23,42,.05);
}

#treinamentos .train-header-left h3{
  margin:0;
  font-size:1.55rem;
  font-weight:800;
  letter-spacing:-0.02em;
  color:var(--tr-text);
}

#treinamentos .train-subtitle{
  margin:4px 0 0 0;
  font-size:.96rem;
  color:var(--tr-muted);
}

#treinamentos .train-header-right{
  display:flex;
  align-items:center;
  gap:10px;
}

#treinamentos .train-search{
  height:44px;
  min-width:290px;
  padding:0 16px 0 42px;
  border:1px solid #d7e1ec;
  border-radius:14px;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364758b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>") no-repeat 14px center / 15px 15px,
    linear-gradient(180deg, #ffffff, #fbfdff);
  color:var(--tr-text);
  box-shadow:0 8px 18px rgba(15,23,42,.03);
  transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

#treinamentos .train-search:focus{
  outline:none;
  border-color:rgba(37,99,235,.34);
  box-shadow:0 0 0 4px rgba(37,99,235,.10), 0 10px 20px rgba(15,23,42,.04);
}

#btnNovoTreina{
  width:auto;
  height:44px;
  padding:0 18px;
  border-radius:14px;
  border:none;
  background:linear-gradient(135deg, #1d4ed8, #2563eb);
  color:#fff;
  font-size:12.5px;
  font-weight:800;
  letter-spacing:.01em;
  box-shadow:0 12px 24px rgba(37,99,235,.20);
  transition:transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

#btnNovoTreina:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 28px rgba(37,99,235,.24);
  filter:brightness(1.02);
}

#treinamentos .train-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(320px, 360px));
  gap:18px;
  justify-content:flex-start;
  align-items:start;
  margin-bottom:24px;
}

#treinamentos .train-card{
  width:100%;
  max-width:360px;
  border:1px solid #e6edf5;
  border-radius:20px;
  overflow:hidden;
  background:linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow:0 14px 30px rgba(15,23,42,.06);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

#treinamentos .train-card:hover{
  transform:translateY(-3px);
  border-color:#d5e1ef;
  box-shadow:0 22px 38px rgba(15,23,42,.09);
}

#treinamentos .train-media{
  height:96px;
  background:linear-gradient(135deg, #eef5ff, #f8fbff);
}

#treinamentos .train-thumb{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

#treinamentos .train-body{
  padding:14px 14px 10px;
  display:flex;
  flex-direction:column;
  gap:8px;
}

#treinamentos .train-title{
  margin:0;
  font-size:1rem;
  font-weight:800;
  line-height:1.15;
  letter-spacing:-0.02em;
  color:var(--tr-text);
}

#treinamentos .train-submeta{
  margin:0;
  font-size:.84rem;
  line-height:1.35;
  color:var(--tr-muted);
}

#treinamentos .train-badges{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

#treinamentos .badge,
#treinamentos .chip{
  height:28px;
  padding:0 10px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:11.5px;
  font-weight:800;
}

#treinamentos .train-meta{
  font-size:.82rem;
  color:#5b6b80;
  line-height:1.35;
}

#treinamentos .train-actions{
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:flex-start;
  padding:0 14px 14px;
}

#treinamentos .train-actions .btnAbrirSala,
#treinamentos .train-actions .btnConfig{
  width:auto;
  min-width:0;
  height:38px;
  padding:0 14px;
  border-radius:11px;
  font-size:12.5px;
  font-weight:800;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

#treinamentos .train-actions .btnAbrirSala{
  background:linear-gradient(135deg, #1d4ed8, #2563eb);
  color:#fff;
  border:none;
  box-shadow:0 10px 22px rgba(37,99,235,.18);
}

#treinamentos .train-actions .btnAbrirSala:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 24px rgba(37,99,235,.24);
}

#treinamentos .train-actions .btnConfig{
  background:#fff;
  color:#0f172a;
  border:1px solid #dbe4ef;
}

#treinamentos .train-actions .btnConfig:hover{
  background:#f8fafc;
  border-color:#c7d4e3;
}

#treinamentos .train-card .btnDelTpl{
  top:12px;
  right:12px;
  width:30px;
  height:30px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.88);
  background:rgba(255,255,255,.94);
  color:#b91c1c;
  box-shadow:0 10px 22px rgba(15,23,42,.14);
}

#treinamentos .train-card .btnDelTpl:hover{
  background:#fff1f2;
  color:#991b1b;
  transform:translateY(-1px);
}

#treinamentos .train-search-empty{
  grid-column:1 / -1;
  text-align:center;
  padding:22px;
  border-radius:16px;
}

/* Bloco concluídos / dashboard */
#treinamentosConcluidosWrap{
  margin-top:10px;
}

#treinamentosConcluidosWrap .treina-topbar{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}

#treinamentosConcluidosWrap h4{
  margin:0 0 4px 0;
  font-size:1rem;
  font-weight:800;
  color:var(--tr-text);
}

#treinamentosConcluidosWrap .treina-subinfo{
  margin:0;
  font-size:.88rem;
  color:var(--tr-muted);
}

#treinamentosConcluidosWrap .treina-kpis{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:14px;
  margin:0 0 14px 0;
}

#treinamentosConcluidosWrap .treina-kpi-card{
  position:relative;
  background:linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border:1px solid #e3ebf4;
  border-radius:18px;
  padding:16px 18px;
  box-shadow:0 14px 28px rgba(15,23,42,.05);
  overflow:hidden;
}

#treinamentosConcluidosWrap .treina-kpi-card::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:4px;
  background:#cfd9e6;
}

#treinamentosConcluidosWrap .treina-kpi-card.is-total::before{
  background:#2563eb;
}

#treinamentosConcluidosWrap .treina-kpi-card.is-valid::before{
  background:#059669;
}

#treinamentosConcluidosWrap .treina-kpi-card.is-near::before{
  background:#b45309;
}

#treinamentosConcluidosWrap .treina-kpi-card.is-expired::before{
  background:#b91c1c;
}

#treinamentosConcluidosWrap .treina-kpi-label{
  font-size:10.5px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#64748b;
}

#treinamentosConcluidosWrap .treina-kpi-value{
  margin-top:10px;
  font-size:2rem;
  line-height:1;
  font-weight:900;
  letter-spacing:-0.04em;
  color:#0f172a;
}

#treinamentosConcluidosWrap .treina-kpi-card.is-valid .treina-kpi-value{
  color:#059669;
}

#treinamentosConcluidosWrap .treina-kpi-card.is-near .treina-kpi-value{
  color:#b45309;
}

#treinamentosConcluidosWrap .treina-kpi-card.is-expired .treina-kpi-value{
  color:#b91c1c;
}

/* filtros */
#treinamentosConcluidosWrap .treina-summary{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0 0 14px 0;
  padding:6px;
  border:1px solid #e3ebf4;
  border-radius:16px;
  background:rgba(255,255,255,.78);
  box-shadow:0 10px 22px rgba(15,23,42,.04);
}

#treinamentosConcluidosWrap .summary-filter{
  width:auto;
  flex:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:34px;
  padding:0 14px;
  border-radius:10px;
  border:1px solid transparent;
  background:transparent;
  color:#475569;
  font-size:12.5px;
  font-weight:800;
  line-height:1;
  box-shadow:none;
  transition:transform .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease, border-color .16s ease;
}

#treinamentosConcluidosWrap .summary-filter:hover{
  transform:translateY(-1px);
  background:#f8fbff;
  border-color:#d7e3f0;
  color:#1e293b;
  box-shadow:0 8px 16px rgba(15,23,42,.04);
}

#treinamentosConcluidosWrap .summary-filter.active{
  background:linear-gradient(135deg, #1d4ed8, #2563eb);
  color:#fff;
  border-color:transparent;
  box-shadow:0 12px 22px rgba(37,99,235,.18);
}

#treinamentosConcluidosWrap .summary-filter.active::after{
  display:none;
}

/* tabela */
#treinamentosConcluidosWrap .table-wrap{
  background:#fff;
  border:1px solid var(--tr-border);
  border-radius:18px;
  padding:12px 14px;
  box-shadow:0 14px 32px rgba(15,23,42,.05);
}

#treinamentosConcluidosWrap .table-epi{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
}

#treinamentosConcluidosWrap .table-epi thead th{
  background:#f8fafc;
  color:#64748b;
  font-size:12px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  padding:12px 14px;
  border-bottom:1px solid #e8eef5;
}

#treinamentosConcluidosWrap .table-epi tbody td{
  padding:14px;
  vertical-align:middle;
  color:#334155;
  border-bottom:1px solid #eef2f7;
}

#treinamentosConcluidosWrap .table-epi tbody tr:hover{
  background:#fbfdff;
}

#treinamentosConcluidosWrap .table-epi tbody td:first-child{
  font-weight:700;
  color:#0f172a;
}

#treinamentosConcluidosWrap .table-epi tbody td:nth-child(3){
  color:#475569;
}

#treinamentosConcluidosWrap .table-epi tbody td.date-cell{
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}

#treinamentosConcluidosWrap .status-badge{
  margin-left:6px;
  font-size:12px;
}

#treinamentos .btnCertTreina{
  height:38px;
  min-width:132px;
  padding:0 16px;
  border:none;
  border-radius:12px;
  background:linear-gradient(135deg, #10b981, #059669);
  color:#fff;
  font-size:13px;
  font-weight:800;
  box-shadow:0 12px 24px rgba(5,150,105,.18);
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

#treinamentos .btnCertTreina:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 28px rgba(5,150,105,.24);
  filter:brightness(1.02);
}

/* responsivo */
@media (max-width: 980px){
  #treinamentos .train-search{
    min-width:240px;
  }

  #treinamentosConcluidosWrap .treina-kpis{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px){
  #treinamentos .train-header{
    flex-direction:column;
    align-items:stretch;
  }

  #treinamentos .train-header-right{
    flex-direction:column;
    align-items:stretch;
  }

  #treinamentos .train-search{
    width:100%;
    min-width:0;
  }

  #btnNovoTreina{
    width:100%;
  }

  #treinamentos .train-grid{
    grid-template-columns:1fr;
  }

  #treinamentosConcluidosWrap .treina-kpis{
    grid-template-columns:1fr;
  }

  #treinamentos .train-actions{
    flex-direction:column;
    align-items:stretch;
  }

  #treinamentos .train-actions .btnAbrirSala,
  #treinamentos .train-actions .btnConfig,
  #treinamentos .btnCertTreina{
    width:100%;
  }

  #treinamentos .train-card{
    max-width:none;
  }

  #treinamentosConcluidosWrap .treina-summary{
    padding:4px;
  }
}
