/* Terminal do profissional ("Meu dia"): pensado para o celular, com o polegar. Botões grandes, uma coluna, barra de abas embaixo.
   Só variáveis de tokens.css (nada de cor fixa), então vale nos dois temas. */
.tm { max-width: 640px; width: 100%; margin: 0 auto; gap: 16px; animation: none; }   /* sem a animação de entrada da página: ela cria um transform e a barra de abas deixaria de ficar fixa na tela */
body.tm-sem-rolagem { overflow: hidden; }

.tm-cabeca { display: flex; align-items: center; gap: 12px; }
.tm-cabeca .ag-av { width: 44px; height: 44px; font-size: .95rem; }
.tm-cabeca-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.tm-cabeca-t b { font-family: var(--fonte-titulo); font-size: 1.45rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-cabeca-t small { font-size: .8rem; }

/* campos de toque (dentro do terminal e das folhas) */
.tm input:not([type=checkbox]), .tm select, .tm-folha input:not([type=checkbox]), .tm-folha select { width: 100%; min-height: 48px; padding: 8px 14px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--raio-sm); color: var(--text); font-size: 1rem; }
.tm input:focus, .tm select:focus, .tm-folha input:focus, .tm-folha select:focus { outline: none; border-color: var(--foco); box-shadow: 0 0 0 3px var(--accent-soft-2); }
.tm .marcar, .tm-folha .marcar { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.tm input[type=checkbox], .tm-folha input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); }
.tm-ver-como { width: auto !important; max-width: 46vw; min-height: 40px !important; border-radius: 99px !important; font-size: .88rem !important; }

/* botões grandes */
.tm-btn { min-height: 52px; font-size: 1rem; width: 100%; padding: 0 20px; }
.tm-btn.pequeno { min-height: 40px; width: auto; font-size: .9rem; padding: 0 14px; }
.tm-btn.armado { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); font-weight: 500; }
.tm-acao-rapida .tm-btn, .tm-acoes-folha .tm-btn { width: 100%; }
.tm-acoes-folha { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 6px; }

/* navegação do dia */
.tm-nav { display: flex; align-items: center; gap: 8px; }
.tm-nav .btn.icone-so { width: 48px; min-height: 48px; flex: 0 0 auto; }
.tm-data { position: relative; flex: 1; min-width: 0; min-height: 48px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 99px; background: var(--surface); cursor: pointer; padding: 0 12px; }
.tm-data-rotulo { display: flex; flex-direction: column; align-items: center; line-height: 1.2; max-width: 100%; }
.tm-data-rotulo b { font-family: var(--fonte-titulo); font-size: 1.2rem; font-weight: 500; white-space: nowrap; }
.tm-data-rotulo small { font-size: .78rem; color: var(--muted); }
.tm-data-rotulo small::first-letter { text-transform: uppercase; }
.tm .tm-data .tm-data-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }

.tm-resumo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tm-chip { background: var(--surface); border: 1px solid var(--line); border-radius: var(--raio-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tm-chip b { font-family: var(--fonte-titulo); font-size: 1.15rem; font-weight: 500; line-height: 1.2; overflow-wrap: anywhere; }
.tm-chip span { font-size: .66rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.tm-resumo .btn { grid-column: 1 / -1; }

/* lista de atendimentos */
.tm-lista { display: flex; flex-direction: column; gap: 12px; }
.tm-carregando { text-align: center; padding: 28px 0; }
.tm-cartao { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: var(--raio); overflow: hidden; }
.tm-cartao.st-confirmado { border-left-color: var(--info); }
.tm-cartao.st-aguardando { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn-soft) 70%, var(--surface)); }
.tm-cartao.st-em_atendimento { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok-soft) 70%, var(--surface)); }
.tm-cartao.st-finalizado, .tm-cartao.st-pago { border-left-color: var(--ok); }
.tm-cartao.st-cancelado, .tm-cartao.st-faltou { border-left-color: var(--bad); opacity: .78; }
.tm-cartao.agora { box-shadow: 0 0 0 2px var(--accent); }
.tm-cartao-corpo { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 80px; padding: 14px; background: none; border: 0; color: inherit; text-align: left; }
.tm-hora { flex: 0 0 52px; display: flex; flex-direction: column; align-items: center; line-height: 1.25; }
.tm-hora b { font-size: 1.12rem; font-weight: 600; }
.tm-hora span { font-size: .8rem; color: var(--muted); }
.tm-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tm-nome { font-size: 1.08rem; font-weight: 500; overflow-wrap: anywhere; }
.tm-servicos { color: var(--text-2); font-size: .92rem; overflow-wrap: anywhere; }
.tm-selos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.tm-seta { color: var(--muted); }
.tm-acao-rapida { padding: 0 14px 14px; }
.tm-bloqueio { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: var(--raio); color: var(--text-2); background: var(--surface-2); }
.tm-bloqueio div { display: flex; flex-direction: column; }
.tm-vazio { border: 1px dashed var(--line-strong); border-radius: var(--raio); padding: 36px 20px; }

/* folha (detalhe do atendimento, novo bloqueio) */
.tm-fundo { position: fixed; inset: 0; z-index: 80; background: rgba(8, 6, 4, .66); display: flex; align-items: flex-end; justify-content: center; animation: aparece .15s ease both; }
.tm-folha { width: min(600px, 100%); max-height: 92vh; max-height: 92dvh; background: var(--surface); border: 1px solid var(--line-strong); border-bottom: 0; border-radius: 22px 22px 0 0; box-shadow: var(--sombra); display: flex; flex-direction: column; overflow: hidden; animation: sobe .22s ease both; }
@keyframes sobe { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.tm-folha-alca { width: 42px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 10px auto 0; flex: 0 0 auto; }
.tm-folha-cab { display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px 8px 18px; flex: 0 0 auto; }
.tm-folha-tit { flex: 1; min-width: 0; }
.tm-folha-tit h2 { font-size: 1.55rem; overflow-wrap: anywhere; }
.tm-folha-tit p { color: var(--muted); font-size: .92rem; }
.tm-folha-corpo { overflow-y: auto; padding: 4px 18px calc(28px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 4px; -webkit-overflow-scrolling: touch; }
.tm-folha-status { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-folha .form { gap: 14px; margin-top: 6px; }
@media (min-width: 700px) { .tm-fundo { align-items: center; } .tm-folha { border-bottom: 1px solid var(--line-strong); border-radius: 22px; } }

/* blocos de conteúdo */
.tm-bloco { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.tm-bloco h3 { font-family: var(--fonte-corpo); font-size: .74rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.tm-bloco-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tm-nota { font-size: .84rem; }
.tm-obs { background: var(--nota-fundo); border-radius: var(--raio-sm); padding: 10px 12px; overflow-wrap: anywhere; }
.tm-itens { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tm-itens > li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.tm-itens > li:last-child { border-bottom: 0; }
.tm-item-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; overflow-wrap: anywhere; }
.tm-item-t small { font-size: .8rem; }
.tm-item-v { display: flex; flex-direction: column; align-items: flex-end; text-align: right; white-space: nowrap; }
.tm-item-v .neg { color: var(--bad); }
.tm-total, .tm-linha { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; }
.tm-total { border-top: 1px solid var(--line-strong); }
.tm-linha { border-bottom: 1px solid var(--line); }
.tm-linha.forte span, .tm-linha.forte b { font-weight: 600; color: var(--accent-ink); }
.tm-vazio-linha { display: flex; flex-direction: column; gap: 10px; }
.tm-acrescentar { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.tm-acrescentar-campos { display: grid; grid-template-columns: minmax(0, 1fr) 76px; gap: 8px; }
.tm-escolher { display: flex; flex-direction: column; gap: 10px; }
.tm-topo-aba { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.tm-lista-bloq > li { flex-wrap: wrap; }
.tm-lista-bloq .btn { width: auto; }

/* comissão */
.tm-atalhos { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.tm-atalhos::-webkit-scrollbar { display: none; }
.tm-atalho { flex: 0 0 auto; min-height: 42px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line-strong); background: none; color: var(--text-2); white-space: nowrap; }
.tm-atalho.on { background: var(--accent-soft-2); border-color: var(--accent); color: var(--accent-ink); font-weight: 500; }
.tm-periodo, .tm-par { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.tm-par { margin: 0; }
.tm-periodo label, .tm-par label { min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tm-comissao > section + section { margin-top: 18px; }
.tm-saldo { background: linear-gradient(160deg, var(--accent-soft-2), var(--surface)); border: 1px solid var(--line-strong); border-radius: var(--raio); padding: 20px; text-align: center; }
.tm-saldo-valor { font-family: var(--fonte-titulo); font-size: 2.9rem; line-height: 1.1; color: var(--accent-ink); margin: 6px 0; overflow-wrap: anywhere; }
.tm-dia-det { border-bottom: 1px solid var(--line); }
.tm-dia-det summary { display: flex; align-items: center; gap: 10px; min-height: 52px; cursor: pointer; list-style: none; }
.tm-dia-det summary::-webkit-details-marker { display: none; }
.tm-dia-det summary span { flex: 1; text-transform: capitalize; }
.tm-dia-det[open] summary { border-bottom: 1px solid var(--line); }

/* barra de abas: embaixo no celular, no alcance do polegar; no computador vai para baixo do cabeçalho */
.tm-abas { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(4, 1fr); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line-strong); padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); }
.tm-aba { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; border: 0; background: none; color: var(--muted); font-size: .74rem; border-radius: var(--raio-sm); }
.tm-aba[aria-current="page"] { color: var(--accent-ink); background: var(--accent-soft); font-weight: 500; }
.tm { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 901px) {
  .tm { padding-bottom: 0; }
  .tm-abas { position: static; order: -1; border: 1px solid var(--line); border-radius: var(--raio); backdrop-filter: none; background: var(--surface); }
  .tm-cabeca { order: -2; }
}
@media (max-width: 900px) { body:has(.tm-abas) #avisos { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); } }
@media (max-width: 360px) { .tm-saldo-valor { font-size: 2.3rem; } .tm-aba span { font-size: .68rem; } }
