/* Gestão de Treinamentos — navegação (sidebar desktop + barra do módulo).
   Mesmo padrão do modelo B usado em Gestão de Pessoas. */

/* Barra fina de identidade do módulo (roxa) */
.tr-modtag {
  padding: 9px 20px;
  font-size: var(--text-2xs);
  font-weight: var(--font-bold);
  letter-spacing: .6px;
  color: var(--purple);
  background: var(--purple-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}
.tr-modrule {
  height: 3px;
  background: linear-gradient(90deg, var(--purple), transparent 70%);
}

/* Sidebar lateral (desktop) — só texto, item ativo com barra verde */
.tr-shell { display: flex; min-height: calc(100vh - 150px); }
.tr-side {
  width: 238px; flex-shrink: 0; background: var(--bg);
  border-right: 1px solid var(--line); padding: 12px 0;
  overflow-y: auto; height: calc(100vh - 150px);
}
.tr-side-glabel {
  font-size: var(--text-3xs, 10px); font-weight: var(--font-bold);
  letter-spacing: .8px; color: var(--muted); padding: 14px 20px 6px;
  text-transform: uppercase;
}
.tr-side-item {
  display: block; padding: 11px 20px; color: var(--muted);
  font-size: var(--text-sm); cursor: pointer;
  border-left: 3px solid transparent;
}
.tr-side-item:hover { color: var(--text); }
.tr-side-item.active {
  color: var(--text); background: var(--panel);
  border-left-color: var(--green); font-weight: var(--font-semibold);
}
.tr-main {
  flex: 1; min-width: 0; padding: 1.25rem;
  overflow-y: auto; height: calc(100vh - 150px); min-height: 440px;
}

/* Termômetro: legenda, faixa e valor ocupam colunas independentes. */
.tr-clima-geral { margin: 42px 8px 6px; }
.tr-clima-geral-faixa { position: relative; height: 16px; }
.tr-clima-geral-trilho,
.tr-clima-setor-faixa {
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(90deg, #ef444455, #f59e0b55, #84cc1655, #22c55e55);
}
.tr-clima-geral-trilho {
  background: linear-gradient(90deg, #ef4444 0%, #f59e0b 30%, #eab308 50%, #84cc16 72%, #22c55e 100%);
  border: 0;
}
.tr-clima-geral-legenda {
  position: absolute;
  top: -30px;
  z-index: 2;
  transform: translateX(-50%);
  max-width: calc(100% - 12px);
  overflow: hidden;
  color: var(--text);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tr-clima-geral-marcador,
.tr-clima-setor-marcador {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 2px solid var(--panel);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.tr-clima-geral-marcador { width: 50px; height: 50px; font-size: 22px; }
.tr-clima-geral-rotulos { display: flex; justify-content: space-between; margin-top: 12px; }
.tr-clima-setor-row {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(150px, 1fr) 44px;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.tr-clima-setor-nome { min-width: 0; font-size: var(--text-sm); overflow-wrap: anywhere; }
.tr-clima-setor-faixa { position: relative; min-width: 0; height: 12px; }
.tr-clima-setor-marcador { width: 26px; height: 26px; font-size: 12px; }
.tr-clima-setor-valor { min-width: 44px; text-align: right; font-size: var(--text-sm); font-weight: var(--font-bold); }

/* Paginação institucional: mesma navegação da Lista Mestra. */
.tr-pagination { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-4); padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel); }
.tr-pagination-count { color: var(--muted); font-size: var(--text-sm); }
.tr-pagination-nav { display: flex; gap: var(--space-1); }
.tr-pagination-jump { display: inline-flex; align-items: center; gap: var(--space-1-5); color: var(--muted); font-size: var(--text-sm); }
.tr-pagination-jump input { width: 54px; height: 32px; padding: 0 var(--space-1-5); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--field-bg); color: var(--text); }
.tr-page-btn { min-width: 32px; height: 32px; padding: 0 var(--space-2); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); color: var(--text); cursor: pointer; font: inherit; }
.tr-page-btn:hover:not(:disabled) { border-color: var(--green); color: var(--green); }
.tr-page-btn.is-active { border-color: var(--green); background: var(--green); color: var(--on-primary); font-weight: var(--font-semibold); }
.tr-page-btn:disabled { opacity: .45; cursor: not-allowed; }

@media (max-width: 640px) {
  .tr-clima-setor-row { grid-template-columns: minmax(128px, 1fr) minmax(110px, 1fr) 40px; gap: var(--space-2); }
  .tr-clima-setor-valor { min-width: 40px; }
  .tr-pagination { flex-wrap: wrap; }
  .tr-pagination-count { width: 100%; }
}

/* Mobile: cards agrupados (padrão do sistema) */
@media (max-width: 768px) {
  .tr-shell { display: block; }
  .tr-side, .tr-main { height: auto; width: auto; border: none; }
}
.tr-cron-tabs {
  display: flex;
  gap: var(--space-1);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--space-4);
}
.tr-cron-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: var(--space-2-5) var(--space-3);
  cursor: pointer;
  font: inherit;
  font-size: var(--text-sm);
}
.tr-cron-tab.active { color: var(--green); border-bottom-color: var(--green); font-weight: var(--font-semibold); }
.tr-cron-filtros {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}
.tr-cron-filtros label { display: grid; gap: 6px; min-width: 0; }
.tr-cron-filtros label > span { color: var(--muted); font-size: var(--text-xs); }
.tr-cron-acoes { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.tr-cron-acoes > div { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.tr-cron-legenda { display: flex; flex-wrap: wrap; gap: var(--space-3); color: var(--muted); font-size: var(--text-xs); }
.tr-cron-cor { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-right: 5px; vertical-align: -1px; }
.tr-cron-cor.planejada { background: #b9d7f8; }
.tr-cron-cor.realizada { background: #bfe6d0; }
.tr-cron-cor.atrasada { background: #f2c3c7; }
.tr-view-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
}
.tr-view-tabs button {
  border: 0;
  border-radius: calc(var(--radius-sm) - 2px);
  background: transparent;
  color: var(--muted);
  padding: 7px 12px;
  cursor: pointer;
  font: inherit;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
}
.tr-view-tabs button.on { background: var(--green); color: var(--on-primary); }
.tr-cron-lista-card { padding: 0 !important; overflow: hidden; box-shadow: none !important; }
.tr-cron-lista-scroll { overflow-x: auto; }
.tr-cron-lista { width: 100%; min-width: 1120px; border-collapse: collapse; font-size: var(--text-sm); }
.tr-cron-lista th { padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--muted); text-align: left; font-size: var(--text-xs); font-weight: var(--font-semibold); white-space: nowrap; }
.tr-cron-lista td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tr-cron-lista tbody tr:last-child td { border-bottom: 0; }
.tr-cron-lista tbody tr:hover td { background: color-mix(in srgb, var(--green) 6%, var(--panel)); }
.tr-cron-lista td small { display: block; margin-top: 4px; color: var(--muted); font-size: var(--text-2xs); }
.tr-cron-lista .tr-cron-atrasado { color: #b85d66; font-weight: var(--font-semibold); }
.tr-cron-lista-acoes { display: flex; align-items: center; justify-content: flex-end; gap: 3px; white-space: nowrap; }
.tr-cron-lista-acoes .icon-btn { width: 31px; height: 31px; color: var(--muted); }
.tr-cron-lista-acoes .tr-tur-excluir { color: var(--danger); }
.tr-cron-lista th:last-child,
.tr-cron-lista td:last-child { text-align: right; }

@media (max-width: 900px) {
  .tr-cron-filtros { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .tr-cron-filtros { grid-template-columns: 1fr; }
  .tr-cron-tab { flex: 1; padding-inline: var(--space-1); }
  .tr-view-tabs { width: 100%; }
  .tr-view-tabs button { flex: 1; }
}
