/* Baggage & Travel · Tarefas (lista, janela da tarefa, detalhes, aba da cotação e da venda) e Automação de tarefas.
   Prefixos: tf- (tarefas) e at- (automação). Só variáveis de app.css, para o tema claro e o escuro. Celular primeiro. */

/* ---------- Cores da situação ---------- */
.tf-item, .tf-ver, .tf-cor-aguardando, .tf-cor-hoje, .tf-cor-vencida, .tf-cor-concluida { --sit: var(--amarelo-600); }
.tf-item.tf-hoje, .tf-ver.tf-hoje, .tf-cor-hoje { --sit: var(--laranja); }
.tf-item.tf-vencida, .tf-ver.tf-vencida, .tf-cor-vencida { --sit: var(--vermelho); }
.tf-item.tf-concluida, .tf-ver.tf-concluida, .tf-cor-concluida { --sit: var(--verde); }

/* ---------- Topo da tela: resumo por situação e ações ---------- */
.tf-topo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tf-resumo { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.tf-chip-sit {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--borda-forte); background: var(--card); color: var(--texto-2); font-weight: 600; font-size: 13px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tf-chip-sit b {
  min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; display: inline-grid; place-items: center; font-size: 12px;
  background: var(--navy-50); color: var(--tinta); font-variant-numeric: tabular-nums;
}
.tf-chip-sit:hover { background: var(--navy-50); }
.tf-chip-sit::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--sit); }
.tf-chip-aguardando { --sit: var(--amarelo-600); }
.tf-chip-hoje { --sit: var(--laranja); }
.tf-chip-vencida { --sit: var(--vermelho); }
.tf-chip-concluida { --sit: var(--verde); }
.tf-chip-sit[aria-pressed='true'] { background: var(--navy); border-color: var(--navy); color: #fff; }
.tf-chip-sit[aria-pressed='true'] b { background: rgba(255, 255, 255, 0.16); color: var(--amarelo); }
.tf-chip-vencida b { color: var(--vermelho-texto); background: var(--vermelho-100); }

/* ---------- Filtros ---------- */
.tf-filtros { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 10px; }
.tf-filtros .campo { min-width: 0; }
.tf-filtros input, .tf-filtros select, .tf-filtros .btn { height: 38px; }
.tf-f-busca { flex: 2 1 200px; }
/* .campo é coluna: sem flex: none, a regra de tela estreita de app.css (.busca { flex: 1 1 180px }) vira 180px de altura */
.tf-f-busca .busca { min-width: 0; flex: none; }
.tf-f-periodo { flex: 2 1 300px; min-width: 260px; }
.tf-f-periodo .periodo-linha input { padding: 0 8px; }
.tf-f-sit { flex: 1 1 140px; }
/* "Minhas e da equipe" cabe inteiro no seletor */
.tf-f-minhas { flex: 1 1 180px; }
.tf-f-resp { flex: 1 1 160px; }
.tf-f-botoes { display: flex; gap: 8px; }
.tf-qtd-filtros {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--amarelo); color: var(--navy-950);
  font-size: 11px; font-weight: 800; display: inline-grid; place-items: center;
}
.periodo-linha { display: flex; align-items: center; gap: 6px; }
.periodo-linha input { min-width: 0; flex: 1; }
.tf-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 2px 10px; }
.tf-chips:empty { display: none; }
.tf-chip-filtro {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 4px 2px 10px; border-radius: 20px;
  background: var(--navy-50); border: 1px solid var(--borda); color: var(--texto-2); max-width: 100%;
}
.tf-chip-filtro b { font-weight: 600; color: var(--texto); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-chip-filtro button { border: 0; background: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--texto-2); }
.tf-chip-filtro button:hover { background: var(--navy-100); }
.tf-painel-periodo { margin-bottom: 14px; }

/* ---------- Lista ---------- */
.tf-lista-card { overflow: hidden; }
.tf-lista-cab { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--borda); background: var(--card-2); font-size: 12.5px; color: var(--texto-3); }
.tf-lote-todos { font-size: 12.5px; color: var(--texto-2); font-weight: 600; }
.tf-contagem { font-weight: 600; color: var(--texto-2); }
.tf-legenda { display: inline-flex; align-items: center; gap: 6px; }
.tf-legenda i { width: 9px; height: 9px; border-radius: 3px; background: var(--sit); display: inline-block; margin-left: 8px; }
.tf-grupo {
  display: flex; align-items: center; gap: 8px; padding: 9px 16px 7px; font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--texto-3); background: var(--card-2); border-top: 1px solid var(--borda);
}
.tf-grupo:first-child { border-top: 0; }
.tf-grupo b { font-size: 11px; color: var(--texto-2); background: var(--navy-50); border-radius: 10px; padding: 0 7px; letter-spacing: 0; }
.tf-grupo-atrasadas { color: var(--vermelho-texto); }
.tf-grupo-hoje { color: var(--laranja-texto); }
.tf-vazio-acoes { display: flex; justify-content: center; gap: 8px; margin: -14px 0 24px; }

.tf-item {
  position: relative; display: grid; grid-template-columns: auto auto 46px minmax(0, 1fr) auto auto; align-items: center; gap: 12px;
  padding: 12px 16px 12px 18px; border-top: 1px solid var(--borda); background: var(--card); cursor: pointer; transition: background 0.12s;
}
.tf-item.tf-sem-lote { grid-template-columns: auto 46px minmax(0, 1fr) auto auto; }
.tf-lista-card .tf-grupo + .tf-item, .tf-aba-lista > .tf-item:first-child { border-top: 0; }
.tf-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--sit); }
.tf-item:hover { background: var(--navy-50); }
.tf-item:has(.tf-lote input:checked) { background: var(--amarelo-50); }
.tf-lote { display: grid; place-items: center; cursor: pointer; }
.tf-lote input { width: 17px; height: 17px; accent-color: var(--tinta); cursor: pointer; margin: 0; }
.tf-check {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--borda-forte); background: var(--card); color: transparent;
  display: grid; place-items: center; cursor: pointer; padding: 0; transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.tf-check:hover:not(:disabled) { border-color: var(--verde); color: var(--verde); }
.tf-check[aria-pressed='true'] { background: var(--verde); border-color: var(--verde); color: #fff; }
.tf-check:disabled { cursor: default; opacity: 0.6; }
.tf-data {
  width: 46px; text-align: center; border-radius: 10px; background: var(--navy-50); padding: 5px 0; line-height: 1.1;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.tf-data b { font-family: var(--fonte-titulo); font-size: 17px; color: var(--tinta); }
.tf-data small { font-size: 10.5px; text-transform: uppercase; font-weight: 700; color: var(--texto-3); }
.tf-data span { font-size: 11px; font-weight: 700; color: var(--texto-2); margin-top: 1px; }
.tf-vencida .tf-data { background: var(--vermelho-100); }
.tf-vencida .tf-data b, .tf-vencida .tf-data span { color: var(--vermelho-texto); }
.tf-hoje .tf-data { background: var(--laranja-100); }
.tf-hoje .tf-data b { color: var(--laranja-texto); }
.tf-corpo { min-width: 0; }
.tf-l1 { display: flex; align-items: center; gap: 7px; min-width: 0; }
.tf-tipo-ic { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--navy-50); color: var(--tinta); flex: none; }
.tf-titulo { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-concluida .tf-titulo { text-decoration: line-through; color: var(--texto-3); }
.tf-desc { margin: 3px 0 0 31px; font-size: 12.5px; color: var(--texto-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: pre-line; }
.tf-meta { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; margin: 5px 0 0 31px; font-size: 12px; color: var(--texto-3); }
.tf-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.tf-meta .ic { flex: none; }
.tf-selo {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--navy-100); color: var(--tinta);
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; text-decoration: none;
}
a.tf-selo:hover { background: var(--navy); color: #fff; text-decoration: none; }
.tf-quem { color: var(--texto-2); }
.tf-mais { font-weight: 700; color: var(--tinta); background: var(--navy-50); border-radius: 8px; padding: 0 5px; }
.tf-situacao { justify-self: end; }
/* Situação ao lado do assunto (tela média) e faixa do topo do card (celular): escondidas no computador */
.tf-sit-media { display: none; margin-left: auto; flex: none; }
.tf-faixa { display: none; }
.tf-acoes { display: flex; gap: 2px; }
.tf-acoes .tf-excluir:hover { color: var(--vermelho); background: var(--vermelho-100); }

/* ---------- Janela da tarefa ---------- */
.tf-form { display: flex; flex-direction: column; gap: 14px; }
.tf-rotulo { font-size: 12.5px; font-weight: 600; color: var(--texto-2); display: inline-flex; align-items: center; gap: 6px; }
.tf-ajuda { color: var(--texto-3); font-size: 11.5px; margin-top: -8px; }
.campo .tf-ajuda { margin-top: 0; }
.tf-vinculo {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 12px; border-radius: 10px;
  background: var(--navy-50); border: 1px solid var(--borda); font-size: 13px; color: var(--texto-2);
}
.tf-vinculo a { font-weight: 700; }
.tf-tipos { border: 0; padding: 0; margin: 0; min-width: 0; }
.tf-tipos legend { font-size: 12.5px; font-weight: 600; color: var(--texto-2); padding: 0; margin-bottom: 6px; }
.tf-tipos-lista { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tf-tipo { position: relative; cursor: pointer; }
.tf-tipo input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tf-tipo > span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 58px; border-radius: 11px;
  border: 1px solid var(--borda-forte); background: var(--card); color: var(--texto-2); transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.tf-tipo b { font-size: 12px; font-weight: 600; }
.tf-tipo:hover > span { background: var(--navy-50); }
.tf-tipo input:checked + span { border-color: var(--navy); background: var(--navy); color: #fff; }
.tf-tipo input:checked + span .ic { color: var(--amarelo); }
.tf-tipo input:focus-visible + span { outline: 2px solid var(--navy-600); outline-offset: 2px; }
.tf-quando-campos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 12px; align-items: end; }
.tf-atalhos { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.tf-atalho {
  height: 28px; padding: 0 11px; border-radius: 14px; border: 1px solid var(--borda-forte); background: var(--card); color: var(--texto-2);
  font-size: 12px; font-weight: 600; cursor: pointer;
}
.tf-atalho:hover { background: var(--navy-50); }
.tf-atalho[aria-pressed='true'] { background: var(--amarelo-100); border-color: var(--amarelo); color: var(--amarelo-texto); }
.tf-resp { display: flex; flex-wrap: wrap; gap: 6px; }
.tf-resp-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px 0 6px; border-radius: 17px; max-width: 100%;
  border: 1px solid var(--borda-forte); background: var(--card); color: var(--texto); font-size: 13px; font-weight: 500; cursor: pointer;
}
.tf-resp-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-resp-chip small { color: var(--texto-3); }
.tf-resp-chip .avatar { flex: none; }
.tf-resp-chip em { font-style: normal; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--navy-950); background: var(--amarelo); border-radius: 8px; padding: 0 6px; }
.tf-resp-equipe { padding-left: 11px; }
.tf-resp-chip:hover { background: var(--navy-50); }
.tf-resp-chip[aria-pressed='true'] { border-color: var(--navy); background: var(--navy-100); box-shadow: inset 0 0 0 1px var(--navy); }
.tf-resp-chip[aria-pressed='true'] small { color: var(--texto-2); }
.tf-bloco-anexos, .tf-bloco-repetir { border: 1px solid var(--borda); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.tf-bloco-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tf-anexar { cursor: pointer; }
.tf-anexos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tf-anexos:empty { display: none; }
.tf-anexo { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; padding: 4px 6px; border-radius: 8px; background: var(--card-2); }
.tf-anexo a, .tf-anexo > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tf-anexo small { color: var(--texto-3); white-space: nowrap; }
.tf-anexo.pendente { background: var(--amarelo-50); }
.tf-repetir small { font-weight: 400; }
.tf-repetir-campos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 12px; }
.tf-previa {
  grid-column: 1 / -1; margin: 0; font-size: 12.5px; color: var(--texto-2); display: flex; align-items: flex-start; gap: 8px; line-height: 1.45;
  padding: 9px 11px; border-radius: 10px; background: var(--navy-50); border: 1px solid var(--borda);
}
.tf-previa:empty { display: none; }
.tf-previa > .ic { margin-top: 2px; color: var(--tinta); flex: none; }
.tf-previa-txt { flex: 1; min-width: 0; }
.tf-previa-txt b { color: var(--tinta); }
.tf-previa-dias { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.tf-previa-dia {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px 0 4px; border-radius: 12px; background: var(--card);
  border: 1px solid var(--borda-forte); font-size: 12px; font-weight: 600; color: var(--texto); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.tf-previa-dia small {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; color: var(--tinta); background: var(--navy-100);
  border-radius: 8px; padding: 0 5px; line-height: 16px;
}
.tf-previa-dia:first-child { border-color: var(--tinta); }
.tf-previa-mais { display: inline-grid; place-items: center; height: 24px; padding: 0 4px; font-weight: 800; color: var(--texto-3); }
.tf-previa.tf-previa-aviso { background: var(--amarelo-50); border-color: var(--amarelo-100); color: var(--amarelo-texto); }
.tf-previa.tf-previa-aviso > .ic { color: var(--amarelo-texto); }
.tf-serie-info { margin: 0; font-size: 12.5px; color: var(--texto-2); display: flex; align-items: center; gap: 6px; }

/* ---------- Detalhes da tarefa ---------- */
.tf-ver { display: flex; flex-direction: column; gap: 14px; }
.tf-ver-topo { display: flex; align-items: flex-start; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--borda); }
.tf-ver-topo > div { flex: 1; min-width: 0; }
.tf-ver-topo h3 { font-size: 17px; line-height: 1.3; margin: 2px 0 0; overflow-wrap: anywhere; }
.tf-ver-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--navy); color: var(--amarelo); flex: none; box-shadow: inset 0 -3px 0 var(--sit); }
.tf-ver-tipo { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--texto-3); }
.tf-ver-dados { margin: 0; display: grid; grid-template-columns: 1fr; gap: 0; }
.tf-ver-dados > div { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--borda); }
.tf-ver-dados > div:last-child { border-bottom: 0; }
.tf-ver-dados dt { font-size: 12.5px; font-weight: 600; color: var(--texto-3); }
.tf-ver-dados dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.tf-pessoas-lista { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.tf-pessoa { display: inline-flex; align-items: center; gap: 6px; }
.tf-pessoa em { font-style: normal; font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--amarelo-texto); }
.tf-ver-desc { white-space: pre-line; background: var(--card-2); border: 1px solid var(--borda); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; overflow-wrap: anywhere; }
.tf-ver-sub { font-size: 13px; display: flex; align-items: center; gap: 6px; margin: 0 0 6px; }
.tf-contato { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--navy-50); }
.tf-contato > div:first-child { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; }
.tf-contato small { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--texto-3); }
.tf-contato span { font-size: 12.5px; color: var(--texto-2); overflow-wrap: anywhere; }
.tf-contato-acoes { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Aba Tarefas da cotação e da venda ---------- */
.tf-aba { overflow: hidden; }
.tf-aba + .tf-aba { margin-top: 16px; }
.tf-aba-topo { display: flex; align-items: flex-start; gap: 12px 16px; flex-wrap: wrap; padding: 16px 18px 12px; border-bottom: 1px solid var(--borda); }
.tf-aba-titulo { flex: 1 1 260px; min-width: 0; }
.tf-aba-titulo h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; margin: 0; }
.tf-aba-titulo p { margin: 4px 0 0; font-size: 12.5px; color: var(--texto-3); }
.tf-aba-controles { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tf-aba-filtro button { height: 31px; font-size: 12.5px; padding: 0 10px; }
.tf-aba-filtro button span { font-variant-numeric: tabular-nums; opacity: 0.85; }
.tf-aba-lista .vazio { padding-bottom: 18px; }
.tf-aba-lista .tf-vazio-acoes { margin: -6px 0 20px; }
.tf-aba-rodape { display: flex; gap: 8px 18px; flex-wrap: wrap; padding: 10px 18px 14px; border-top: 1px solid var(--borda); font-size: 12.5px; background: var(--card-2); }
.tf-aba-rodape a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.tf-aba-origem .tf-aba-topo { align-items: center; }

/* ---------- Automação de tarefas ---------- */
.at-pagina .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.at-intro { display: flex; gap: 14px; padding: 16px 18px; margin-bottom: 14px; align-items: flex-start; }
.at-intro-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--navy); color: var(--amarelo); flex: none; }
.at-intro-txt { min-width: 0; }
.at-intro h2 { font-size: 17px; margin: 0 0 4px; }
.at-intro p { margin: 0; color: var(--texto-2); font-size: 13.5px; max-width: 760px; }
.at-fluxo { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: at; }
.at-fluxo li {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--tinta);
  background: var(--navy-50); border: 1px solid var(--borda); border-radius: 18px; padding: 4px 11px;
}
.at-fluxo li + li::before { content: '→'; color: var(--texto-3); margin-right: 4px; font-weight: 700; }
.at-barra { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.at-f-etapa { min-width: 170px; }
.at-f-etapa select { height: 38px; }
.at-funil { display: flex; flex-direction: column; gap: 12px; }
.at-etapa { background: var(--card); border: 1px solid var(--borda); border-left: 4px solid var(--cor); border-radius: var(--raio); box-shadow: var(--sombra); overflow: hidden; }
.at-etapa-cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; }
.at-etapa-cab small { display: block; font-size: 11px; color: var(--texto-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.at-etapa-cab h3 { font-size: 15px; margin: 0; }
.at-etapa-num {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12.5px; font-weight: 800;
  background: color-mix(in srgb, var(--cor) 16%, var(--card)); color: color-mix(in srgb, var(--cor) 75%, var(--texto));
}
.at-sem { margin: 0; padding: 0 16px 14px 54px; font-size: 12.5px; color: var(--texto-3); }
.at-regras { display: flex; flex-direction: column; border-top: 1px solid var(--borda); }
.at-regra { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--borda); }
.at-regra:first-child { border-top: 0; }
.at-regra.desligada { background: var(--card-2); }
.at-regra.desligada .at-regra-corpo { opacity: 0.6; }
.at-regra-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--navy-50); color: var(--tinta); }
.at-assunto { font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.at-var {
  display: inline-block; font-size: 11.5px; font-weight: 700; padding: 0 6px; border-radius: 6px; line-height: 19px;
  background: var(--amarelo-100); color: var(--amarelo-texto); border: 1px dashed var(--amarelo-600);
}
.at-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 12px; color: var(--texto-3); }
.at-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.at-desc { margin: 4px 0 0; font-size: 12.5px; color: var(--texto-2); }
.at-regra-acoes { display: flex; align-items: center; gap: 4px; }
.at-excluir:hover { color: var(--vermelho); background: var(--vermelho-100); }
.at-chave { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; position: relative; margin-right: 6px; }
.at-chave input { position: absolute; opacity: 0; width: 38px; height: 22px; margin: 0; cursor: pointer; }
.at-chave-trilho { width: 38px; height: 22px; border-radius: 11px; background: var(--borda-forte); position: relative; transition: background 0.15s; flex: none; }
.at-chave-trilho::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.15s; }
.at-chave input:checked + .at-chave-trilho { background: var(--verde); }
.at-chave input:checked + .at-chave-trilho::after { transform: translateX(16px); }
.at-chave input:focus-visible + .at-chave-trilho { outline: 2px solid var(--navy-600); outline-offset: 2px; }
.at-chave input:disabled + .at-chave-trilho { opacity: 0.6; }
.at-chave-rot { font-size: 12px; font-weight: 600; color: var(--texto-2); min-width: 62px; }
.at-orfas { --cor: var(--vermelho); }
.at-form { display: flex; flex-direction: column; gap: 14px; }
.at-form-grade { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 14px; }
.at-vars { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.at-var-btn {
  height: 26px; padding: 0 9px; border-radius: 13px; border: 1px dashed var(--borda-forte); background: var(--card); color: var(--texto-2);
  font-size: 11.5px; font-weight: 600; cursor: pointer;
}
.at-var-btn:hover { border-color: var(--amarelo-600); background: var(--amarelo-50); color: var(--amarelo-texto); }
.at-previa { border-radius: 12px; background: var(--navy-50); border: 1px solid var(--borda); padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.at-previa small { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--texto-3); }
.at-previa-linha { display: flex; align-items: center; gap: 7px; color: var(--tinta); overflow-wrap: anywhere; }
.at-previa > span { font-size: 12.5px; color: var(--texto-2); }

/* ---------- Telas largas e estreitas ---------- */
@media (max-width: 1100px) {
  .tf-item { grid-template-columns: auto auto 46px minmax(0, 1fr) auto; }
  .tf-item.tf-sem-lote { grid-template-columns: auto 46px minmax(0, 1fr) auto; }
  .tf-item .tf-situacao { display: none; }
  .tf-l1 .tf-sit-media { display: inline-flex; }
}
@media (max-width: 760px) {
  .tf-so-largo, .tf-filtros .so-largo { display: none !important; }
  .tf-topo { gap: 6px; }
  .tf-resumo { order: 3; flex: 1 1 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tf-chip-sit { justify-content: space-between; padding: 0 10px; }
  .tf-chip-sit::before { margin-right: -2px; }
  .tf-chip-sit > span { flex: 1; text-align: left; }
  .tf-topo .btn-primario { flex: 1; }
  .tf-filtros { padding: 10px; gap: 8px; flex-wrap: nowrap; }
  .tf-filtros .tf-f-busca > label { display: none; }
  .tf-f-busca { flex: 1 1 auto; }
  .tf-f-botoes .btn { width: 40px; padding: 0; }
  .tf-lista-cab { padding: 8px 12px; }
  .tf-item { grid-template-columns: auto auto minmax(0, 1fr); gap: 10px; padding: 11px 12px 11px 14px; align-items: start; }
  .tf-item.tf-sem-lote { grid-template-columns: auto minmax(0, 1fr); }
  .tf-item .tf-data, .tf-item .tf-acoes { display: none; }
  .tf-item .tf-check { margin-top: -2px; }
  .tf-item .tf-lote { margin-top: 2px; }
  .tf-desc, .tf-meta { margin-left: 0; }
  .tf-l1 { align-items: flex-start; }
  .tf-titulo { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .tf-tipo-ic { display: none; }
  .tf-tipo-rot { display: none !important; }
  .tf-l1 .tf-sit-media { display: none; }
  /* Faixa do topo do card no celular: tipo, data e hora limite e a situação (o que no computador fica em colunas) */
  /* Numa linha só: se faltar espaço, o nome do tipo encolhe (o ícone fica); a data e a situação nunca quebram */
  .tf-faixa { display: flex; align-items: center; gap: 7px; min-width: 0; min-height: 22px; margin-bottom: 5px; }
  .tf-faixa-tipo {
    display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px 0 5px; border-radius: 7px; min-width: 0; flex: 0 1 auto;
    background: var(--navy-50); color: var(--tinta); font-size: 11px; font-weight: 700;
  }
  .tf-faixa-tipo .ic { flex: none; }
  .tf-faixa-tipo span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tf-faixa-prazo {
    display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--texto-2); flex: none;
    font-variant-numeric: tabular-nums; white-space: nowrap;
  }
  .tf-faixa-prazo .ic { opacity: 0.8; }
  .tf-vencida .tf-faixa-prazo { color: var(--vermelho-texto); }
  .tf-hoje .tf-faixa-prazo { color: var(--laranja-texto); }
  .tf-concluida .tf-faixa-prazo { color: var(--texto-3); font-weight: 600; }
  .tf-faixa-sit { margin-left: auto; flex: none; font-size: 11px; padding: 1px 8px; }
  .tf-grupo { padding: 8px 12px 6px; }
  .tf-tipos-lista { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  .tf-tipo > span { height: 54px; }
  .tf-tipo b { font-size: 11px; }
  .tf-ver-dados > div { grid-template-columns: 1fr; gap: 2px; }
  .tf-aba-topo { padding: 14px 14px 10px; }
  .tf-aba-controles { width: 100%; }
  .tf-aba-filtro { flex: 1; }
  .tf-aba-filtro button { flex: 1; padding: 0 6px; }
  .tf-aba-rodape { padding: 10px 14px 12px; }
  .at-intro { padding: 14px; }
  .at-intro-ic { display: none; }
  .at-barra .grupo-btn { flex: 1 1 100%; }
  .at-barra .grupo-btn button { flex: 1; }
  .at-f-etapa { flex: 1 1 100%; }
  .at-barra .btn-primario { flex: 1; }
  .at-regra { grid-template-columns: auto minmax(0, 1fr); padding: 12px; }
  .at-regra-acoes { grid-column: 1 / -1; justify-content: flex-end; border-top: 1px dashed var(--borda); padding-top: 8px; }
  .at-chave { margin-right: auto; }
  .at-sem { padding-left: 16px; }
  .at-form-grade { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
  .tf-quando-campos, .tf-repetir-campos { grid-template-columns: 1fr; }
}
