/*
 * ============================================================================
 * VideoAcesso - Portal público de Treinamento (sistema à parte do SIGI)
 * Arquivo: assets/css/TR_Estilo.css
 * Tipo: VIEW - estilo de todas as telas (cores da logo CLIA Empório).
 * Criado em 2026-11-26.
 * ============================================================================
 */
:root {
    --verde: #1f6b4f;
    --verde-esc: #12382a;
    --verde-cl: #e6f1ec;
    --ouro: #b89a4c;
    --ouro-esc: #977a32;
    --texto: #1d2b25;
    --texto2: #5b6b64;
    --linha: #dfe8e3;
    --fundo: #f2f6f4;
    --branco: #fff;
    --erro: #b3261e;
    --raio: 16px;
    --sombra: 0 10px 30px rgba(18, 56, 42, .10), 0 2px 6px rgba(18, 56, 42, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px; line-height: 1.5; color: var(--texto); background: var(--fundo);
}
.tr-fundo {
    position: fixed; inset: 0 0 auto 0; height: 340px; z-index: -1;
    background: radial-gradient(circle at 85% -20%, rgba(184, 154, 76, .35), transparent 45%),
                linear-gradient(135deg, var(--verde-esc), var(--verde));
}
h1 { font-size: 1.6rem; margin: 0 0 .25rem; color: var(--verde-esc); letter-spacing: -.01em; }
h2 { font-size: 1.2rem; margin: .4rem 0; color: var(--verde-esc); }
h3 { font-size: 1rem; margin: 0 0 .5rem; color: var(--verde-esc); }

/* ---------- topo ---------- */
.tr-topo { padding: 18px 16px 0; }
.tr-topo-in {
    max-width: 980px; margin: 0 auto; display: flex; align-items: center; gap: 16px;
    background: var(--branco); border-radius: 14px; padding: 10px 18px; box-shadow: var(--sombra);
}
.tr-logo { height: 48px; width: auto; }
.tr-topo-txt { display: flex; flex-direction: column; border-left: 1px solid var(--linha); padding-left: 16px; }
.tr-topo-txt strong { color: var(--verde-esc); font-size: 1.05rem; }
.tr-topo-txt span { color: var(--texto2); font-size: .85rem; }

.tr-main { flex: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 22px 16px 40px; }

/* ---------- etapas ---------- */
.tr-etapas { list-style: none; display: flex; justify-content: center; gap: 6px; padding: 0; margin: 0 0 22px; counter-reset: e; }
.tr-etapas li { display: flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, .7); font-size: .9rem; }
.tr-etapas li + li::before { content: ""; width: 34px; height: 2px; background: rgba(255, 255, 255, .35); margin-right: 2px; }
.tr-etapas span {
    width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem;
    border: 2px solid rgba(255, 255, 255, .5);
}
.tr-etapas em { font-style: normal; }
.tr-etapas .atual { color: #fff; font-weight: 600; }
.tr-etapas .atual span { background: var(--ouro); border-color: var(--ouro); color: #fff; box-shadow: 0 0 0 4px rgba(184, 154, 76, .3); }
.tr-etapas .feita span { background: #fff; border-color: #fff; color: var(--verde); }

/* ---------- cartão ---------- */
.tr-card { background: var(--branco); border-radius: var(--raio); box-shadow: var(--sombra); padding: 32px; animation: tr-sobe .35s ease-out; }
.tr-card-estreito { max-width: 520px; margin: 0 auto; }
.tr-sub { color: var(--texto2); margin: 0 0 20px; }
.tr-mini { color: var(--texto2); font-size: .8rem; margin: 14px 0 0; text-align: center; }
@keyframes tr-sobe { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- formulário ---------- */
.tr-campo { display: block; margin-bottom: 18px; }
.tr-campo span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.tr-campo input {
    width: 100%; padding: 13px 14px; font-size: 1.05rem; color: var(--texto);
    border: 1.5px solid var(--linha); border-radius: 10px; background: #fbfdfc; transition: border-color .15s, box-shadow .15s;
}
.tr-campo input:focus { outline: none; border-color: var(--verde); box-shadow: 0 0 0 4px rgba(31, 107, 79, .12); background: #fff; }
.tr-campo input.tr-invalido { border-color: var(--erro); box-shadow: 0 0 0 4px rgba(179, 38, 30, .1); }
.tr-campo small { display: block; color: var(--texto2); font-size: .8rem; margin-top: 4px; }
.tr-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tr-erro-js { color: var(--erro); font-size: .9rem; margin: -6px 0 14px; }
.tr-form-inline { display: inline; margin: 0; }

/* ---------- botões ---------- */
.tr-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border: 0; border-radius: 10px; cursor: pointer; text-decoration: none;
    font: inherit; font-weight: 600; color: #fff; background: var(--verde);
    transition: background .15s, transform .05s, box-shadow .15s; box-shadow: 0 4px 12px rgba(31, 107, 79, .25);
}
.tr-btn:hover { background: var(--verde-esc); }
.tr-btn:active { transform: translateY(1px); }
.tr-btn:disabled { opacity: .5; cursor: default; box-shadow: none; }
.tr-btn:focus-visible { outline: 3px solid var(--ouro); outline-offset: 2px; }
.tr-btn-grande { width: 100%; padding: 15px 20px; font-size: 1.05rem; margin-top: 6px; }
.tr-btn-ouro { background: linear-gradient(135deg, var(--ouro), var(--ouro-esc)); box-shadow: 0 4px 14px rgba(151, 122, 50, .35); }
.tr-btn-ouro:hover { background: var(--ouro-esc); }
.tr-btn-link { background: transparent; color: var(--verde); box-shadow: none; padding: 8px 10px; }
.tr-btn-link:hover { background: var(--verde-cl); }

/* ---------- alertas ---------- */
.tr-alerta { padding: 12px 14px; border-radius: 10px; margin: 0 0 18px; font-size: .92rem; border-left: 4px solid; }
.tr-alerta-erro { background: #fdecea; color: #7a1c15; border-color: var(--erro); }
.tr-alerta-aviso { background: #fff7e3; color: #6d5414; border-color: var(--ouro); }
.tr-alerta-ok { background: var(--verde-cl); color: var(--verde-esc); border-color: var(--verde); }

/* ---------- curso ---------- */
.tr-ola { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tr-cursos { display: grid; gap: 18px; }
.tr-curso { display: grid; grid-template-columns: 240px 1fr; border: 1px solid var(--linha); border-radius: 14px; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.tr-curso:hover { box-shadow: var(--sombra); transform: translateY(-2px); }
.tr-curso-capa {
    display: grid; place-items: center; min-height: 200px;
    background: radial-gradient(circle at 30% 20%, rgba(184, 154, 76, .45), transparent 55%), linear-gradient(160deg, var(--verde), var(--verde-esc));
}
.tr-curso-corpo { padding: 20px 22px; }
.tr-curso-corpo p { color: var(--texto2); margin: 0 0 14px; font-size: .95rem; }
.tr-off { opacity: .7; }
.tr-tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ouro-esc); background: #f8f1df; padding: 4px 10px; border-radius: 99px; }
.tr-info { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .9rem; }
.tr-info b { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--texto2); font-weight: 600; }
.tr-play-ico { width: 68px; height: 68px; border-radius: 50%; background: rgba(255, 255, 255, .95); position: relative; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); display: inline-block; }
.tr-play-ico::after { content: ""; position: absolute; left: 27px; top: 21px; border-left: 20px solid var(--verde); border-top: 13px solid transparent; border-bottom: 13px solid transparent; }
.tr-regras { margin-top: 22px; background: var(--verde-cl); border-radius: 12px; padding: 16px 20px; }
.tr-regras ul { margin: 0; padding-left: 20px; color: var(--verde-esc); font-size: .92rem; }

/* ---------- vídeo ---------- */
.tr-video-cab { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.tr-video-cab h1 { font-size: 1.35rem; margin-top: 6px; }
.tr-tempo { font-variant-numeric: tabular-nums; color: var(--texto2); white-space: nowrap; }
.tr-tempo b { color: var(--verde-esc); font-size: 1.1rem; }
.tr-player { position: relative; background: #000; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; }
.tr-player video { width: 100%; height: 100%; display: block; background: #000; }
.tr-player-capa {
    position: absolute; inset: 0; border: 0; cursor: pointer; color: #fff; font: inherit;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    background: linear-gradient(160deg, rgba(31, 107, 79, .88), rgba(18, 56, 42, .94));
}
.tr-player-capa em { font-style: normal; font-weight: 600; font-size: 1.1rem; }
.tr-player-capa:hover .tr-play-ico { transform: scale(1.06); }
.tr-player-capa .tr-play-ico { transition: transform .15s; }
.tr-player-capa[hidden] { display: none; }
.tr-player-aviso {
    position: absolute; left: 50%; top: 16px; transform: translateX(-50%); max-width: 90%;
    background: rgba(0, 0, 0, .78); color: #fff; padding: 8px 14px; border-radius: 99px; font-size: .88rem;
}
.tr-controles { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.tr-controles #tr-play { min-width: 110px; }
.tr-barra { flex: 1; height: 10px; background: var(--linha); border-radius: 99px; overflow: hidden; }
.tr-barra-in { height: 100%; width: 0; background: linear-gradient(90deg, var(--verde), #2f9a72); border-radius: 99px; transition: width .4s linear; }
.tr-pct { font-weight: 700; color: var(--verde-esc); font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.tr-concluir { margin-top: 22px; text-align: center; background: #fbf7ec; border: 1px solid #efe3c3; border-radius: 14px; padding: 20px; animation: tr-sobe .35s ease-out; }
.tr-concluir[hidden] { display: none; }
.tr-concluir p { margin: 0 0 10px; }
.tr-concluir .tr-btn-grande { max-width: 360px; }

/* ---------- fim ---------- */
.tr-fim { text-align: center; }
.tr-selo {
    width: 78px; height: 78px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center;
    font-size: 2.2rem; color: #fff; background: linear-gradient(135deg, var(--verde), #2f9a72); box-shadow: 0 0 0 8px var(--verde-cl);
}
.tr-resumo { text-align: left; margin: 0 0 20px; border: 1px solid var(--linha); border-radius: 12px; overflow: hidden; }
.tr-resumo div { display: grid; grid-template-columns: 90px 1fr; gap: 10px; padding: 10px 16px; }
.tr-resumo div + div { border-top: 1px solid var(--linha); }
.tr-resumo dt { color: var(--texto2); font-size: .85rem; }
.tr-resumo dd { margin: 0; font-weight: 600; word-break: break-word; }
.tr-codigo { font-family: Consolas, "Courier New", monospace; color: var(--verde); letter-spacing: .05em; }
.tr-fim .tr-btn-link { margin-top: 8px; }

/* ---------- rodapé ---------- */
.tr-rodape { text-align: center; color: var(--texto2); font-size: .8rem; padding: 18px 16px 26px; }
.tr-rodape span { font-size: .75rem; }

/* ---------- celular ---------- */
@media (max-width: 680px) {
    .tr-card { padding: 22px 18px; }
    .tr-topo-in { padding: 8px 12px; gap: 12px; }
    .tr-logo { height: 38px; }
    .tr-topo-txt span { display: none; }
    .tr-etapas em { display: none; }
    .tr-etapas li + li::before { width: 22px; }
    .tr-curso { grid-template-columns: 1fr; }
    .tr-curso-capa { min-height: 140px; }
    .tr-video-cab { flex-direction: column; align-items: flex-start; }
    .tr-controles { flex-wrap: wrap; }
    .tr-barra { order: 3; flex-basis: 100%; }
    .tr-ola { flex-direction: column; }
    h1 { font-size: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
