/* App de treino — claro por padrao; html.tema-escuro = modo escuro. Escopo .treino-app */
html, body {
    margin: 0;
    padding: 0;
    background: #f4f4f4;
    color: #212121;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
html.tema-escuro,
html.tema-escuro body {
    background: #121212;
    color: #ececec;
}
.treino-app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: #fff;
    padding: 16px 16px 48px;
    box-sizing: border-box;
}
html.tema-escuro .treino-app {
    background: #212121;
}
.treino-app-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 16px;
}
.treino-app-marca {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.treino-app-logo {
    height: 36px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    flex: 0 0 auto;
    /* PNG da Prime e branco; no claro vira preto. Make ja e roxo — nao inverter. */
    filter: brightness(0);
}
html.tema-escuro .treino-app-logo,
.treino-app-logo[src*="make_logo"] {
    filter: none;
}
.treino-app h1 {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    color: #212121;
}
html.tema-escuro .treino-app h1 {
    color: #ececec;
}
.treino-app .btn-tema {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    background: #eee;
    color: #212121;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
html.tema-escuro .treino-app .btn-tema {
    background: #2f2f2f;
    color: #ececec;
}
.treino-app .btn-tema .icone-sol,
.treino-app .btn-tema .icone-lua {
    width: 22px;
    height: 22px;
    display: none;
}
/* Claro: mostra lua (ir para escuro). Escuro: mostra sol (ir para claro). */
.treino-app .btn-tema .icone-lua {
    display: block;
}
html.tema-escuro .treino-app .btn-tema .icone-lua {
    display: none;
}
html.tema-escuro .treino-app .btn-tema .icone-sol {
    display: block;
}
.treino-app label {
    display: block;
    font-size: 14px;
    color: #616161;
    margin-bottom: 6px;
}
html.tema-escuro .treino-app label {
    color: #bdbdbd;
}
.treino-app input[type="text"],
.treino-app input[type="tel"] {
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    color: #212121;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 16px;
}
html.tema-escuro .treino-app input[type="text"],
html.tema-escuro .treino-app input[type="tel"] {
    background: #2f2f2f;
    color: #ececec;
    border-color: #3e3e3e;
}
.treino-app .acoes {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.treino-app .acoes button {
    flex: 1;
}
.treino-app #form-treino.oculto {
    display: none;
}
.treino-app button {
    -webkit-appearance: none;
    appearance: none;
    border: 0;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 16px;
    cursor: pointer;
    touch-action: manipulation;
}
.treino-app .btn-ok {
    background: #1c7ebb;
    color: #fff;
}
.treino-app .btn-ok:disabled {
    opacity: 0.5;
}
.treino-app .btn-sec {
    background: #e0e0e0;
    color: #212121;
}
html.tema-escuro .treino-app .btn-sec {
    background: #3e3e3e;
    color: #ececec;
}
.treino-app .msg {
    margin-top: 16px;
    color: #616161;
    font-size: 15px;
    line-height: 1.4;
}
html.tema-escuro .treino-app .msg {
    color: #bdbdbd;
}
.treino-app .msg.erro {
    color: #c62828;
}
html.tema-escuro .treino-app .msg.erro {
    color: #ef9a9a;
}
.treino-app .msg.buscando {
    color: #1c7ebb;
    font-weight: 600;
}
html.tema-escuro .treino-app .msg.buscando {
    color: #fff;
}
.treino-app .meta {
    margin-top: 20px;
    font-size: 13px;
    color: #757575;
}
html.tema-escuro .treino-app .meta {
    color: #9e9e9e;
}
.treino-app .meta strong {
    color: #212121;
}
html.tema-escuro .treino-app .meta strong {
    color: #ececec;
}
.treino-app .unidades,
.treino-app .ordens,
.treino-app .letras {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0;
}
.treino-app .unidades .chip {
    flex: 1 1 100%;
    white-space: normal;
    line-height: 1.3;
    text-align: left;
}
.treino-app .chip {
    flex: 0 0 auto;
    background: #f0f0f0;
    border: 2px solid #ddd;
    color: #212121;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
    cursor: pointer;
}
html.tema-escuro .treino-app .chip {
    background: #2f2f2f;
    border-color: #3e3e3e;
    color: #ececec;
}
.treino-app button.chip.ativo {
    background: #1c7ebb;
    border-color: #1c7ebb;
    color: #fff;
}
.treino-app .ex {
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 0;
}
html.tema-escuro .treino-app .ex {
    border-bottom-color: #3e3e3e;
}
.treino-app .ex-nome {
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
}
.treino-app .ex-serie {
    margin-top: 4px;
    font-size: 18px;
    color: #212121;
}
html.tema-escuro .treino-app .ex-serie {
    color: #fff;
}
.treino-app .ex-obs {
    margin-top: 4px;
    font-size: 14px;
    color: #757575;
    font-style: italic;
}
html.tema-escuro .treino-app .ex-obs {
    color: #bdbdbd;
}
.treino-app .aviso-lag {
    font-size: 12px;
    color: #ef6c00;
    margin-top: 8px;
}
html.tema-escuro .treino-app .aviso-lag {
    color: #ffcc80;
}
.treino-app .meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.treino-app .meta-txt {
    flex: 1;
    min-width: 0;
}
.treino-app .meta-nome {
    font-size: 16px;
    line-height: 1.3;
    word-wrap: break-word;
}
.treino-app .meta-unidade {
    margin-top: 2px;
    font-size: 13px;
    color: #757575;
    line-height: 1.3;
}
html.tema-escuro .treino-app .meta-unidade {
    color: #9e9e9e;
}
.treino-app .btn-sair {
    flex: 0 0 auto;
    width: auto;
    background: transparent;
    color: #9e9e9e;
    padding: 2px 0;
    font-size: 13px;
    border-radius: 0;
    text-decoration: underline;
    box-shadow: none;
}
html.tema-escuro .treino-app .btn-sair {
    background: transparent;
    color: #8a8a8a;
}
.treino-app .btn-sair:hover,
.treino-app .btn-sair:focus {
    color: #616161;
}
html.tema-escuro .treino-app .btn-sair:hover,
html.tema-escuro .treino-app .btn-sair:focus {
    color: #bdbdbd;
}
.treino-app .vencimentos {
    margin-top: 10px;
    font-size: 13px;
    color: #616161;
    line-height: 1.45;
}
html.tema-escuro .treino-app .vencimentos {
    color: #bdbdbd;
}
.treino-app .venc-linha {
    margin-top: 2px;
}
.treino-app .linha-tempo {
    display: flex;
    gap: 8px;
    margin: 14px 0 4px;
}
.treino-app .lt-seg {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    text-align: left;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    color: #212121;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    cursor: pointer;
}
html.tema-escuro .treino-app .lt-seg {
    background: #2a2a2a;
    border-color: #3e3e3e;
    color: #ececec;
}
.treino-app .lt-seg.lt-hoje {
    box-shadow: inset 3px 0 0 #1c7ebb;
}
.treino-app .lt-seg.lt-ativo {
    background: #1c7ebb;
    border-color: #1c7ebb;
    color: #fff;
    box-shadow: none;
}
.treino-app .lt-seg.lt-ativo .lt-dt {
    color: rgba(255, 255, 255, 0.9);
}
html.tema-escuro .treino-app .lt-seg.lt-ativo {
    background: #1c7ebb;
    border-color: #1c7ebb;
    color: #fff;
}
html.tema-escuro .treino-app .lt-seg.lt-ativo .lt-dt {
    color: rgba(255, 255, 255, 0.9);
}
.treino-app .lt-tit {
    font-weight: 600;
    font-size: 12px;
    line-height: 1.3;
}
.treino-app .lt-dt {
    margin-top: 4px;
    font-size: 12px;
    color: #757575;
    font-weight: 400;
    line-height: 1.35;
}
html.tema-escuro .treino-app .lt-dt {
    color: #9e9e9e;
}
.treino-app .planos-treino {
    margin-top: 8px;
}
.treino-app .plano-grupo {
    margin-top: 10px;
    padding: 8px 0 0;
}
.treino-app .plano-grupo.plano-hoje .plano-cab {
    color: #1c7ebb;
}
html.tema-escuro .treino-app .plano-grupo.plano-hoje .plano-cab {
    color: #64b5f6;
}
.treino-app .plano-cab {
    font-size: 13px;
    font-weight: 600;
    color: #616161;
    margin-bottom: 6px;
}
html.tema-escuro .treino-app .plano-cab {
    color: #bdbdbd;
}
.treino-app .ultimo-feito {
    margin: 0 0 8px;
    font-size: 13px;
    color: #616161;
}
html.tema-escuro .treino-app .ultimo-feito {
    color: #bdbdbd;
}
.treino-app .letras {
    margin: 0;
}
.treino-app label.ex {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    color: inherit;
    cursor: pointer;
}
.treino-app .ex-check {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin: 4px 0 0;
    accent-color: #1c7ebb;
}
html.tema-escuro .treino-app .ex-check {
    accent-color: #64b5f6;
}
.treino-app .ex-corpo {
    flex: 1;
    min-width: 0;
}
.treino-app .ex.feito .ex-nome,
.treino-app .ex.feito .ex-serie {
    text-decoration: line-through;
    opacity: 0.65;
}
