/* tarefas.css — estilos próprios do Conecta Tarefas. Tokens (cores, fontes, raios, sombras) vêm de conecta.css. */
:root { --azul: #1d4ed8; --azul-lt: #e8efff; }
[data-theme="dark"] { --azul: #6b93ff; --azul-lt: #16213d; }

/* O .inp do RH reserva espaço para ícone à esquerda; aqui os campos não têm ícone. */
.inp { padding-left: 12px; }
#sidebar a.snav { text-decoration: none; color: inherit; }
.tf-muted { color: var(--muted); }
.tf-login-aviso { margin: 0 0 14px; padding: 10px 12px; border-radius: var(--r); background: rgba(220, 38, 38, .22); color: #fff; font-size: 13px; }
.tf-login-aviso a { color: var(--ouro); }

/* Formulários */
.tf-form { display: flex; flex-direction: column; }
.tf-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.tf-details summary { cursor: pointer; font-size: 12.5px; color: var(--verde-dk); margin: 4px 0 10px; }
.tf-check { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--text-med); }
.tf-lista-marcar { max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.tf-lista-marcar label { display: flex; gap: 8px; align-items: center; padding: 4px 2px; }

/* Minha conta */
.tf-conta dl { display: grid; grid-template-columns: 120px 1fr; gap: 10px 16px; margin: 0 0 12px; }
.tf-conta dt { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding-top: 2px; }
.tf-conta ul { margin: 0; padding-left: 18px; }

/* Celular: o RH esconde o menu; aqui ele abre por cima com o botão da topbar. */
.tf-menu-btn { display: none; }
@media (max-width: 860px) {
  .tf-menu-btn { display: inline-flex; }
  .tb-ctx, .tb-sep, .tb-conecta-sep, [data-theme-label] { display: none; }
  #btn-nova-tarefa .tf-rotulo { display: none; }
  body.tf-menu-aberto .sidebar { display: block !important; position: fixed; top: 64px; left: 0; bottom: 0; width: 270px; z-index: 900; overflow-y: auto; box-shadow: var(--sh-lg); }
}
@media (max-width: 640px) {
  .tf-grid2, .tf-conta dl { grid-template-columns: 1fr; }
  .drawer { width: 100vw !important; max-width: 100vw !important; }
}

/* Filtros */
.tf-filtros { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0; }
.tf-filtros .inp { width: auto; min-width: 150px; padding-top: 8px; padding-bottom: 8px; }
.tf-filtros .tf-busca { min-width: 220px; flex: 1; }
.tf-seg { display: inline-flex; border: 1.5px solid var(--border); border-radius: var(--r); overflow: hidden; }
.tf-seg button { border: 0; background: var(--white); color: var(--text-med); padding: 8px 12px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.tf-seg button.is-on { background: var(--verde); color: #fff; }
.tf-aviso { font-size: 12.5px; color: var(--ouro-dk); margin: 0 0 10px; }

/* Quadro */
.tf-quadro { margin-bottom: 26px; }
.tf-quadro-hd { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.tf-quadro-hd h2 { font-size: 16px; }
.tf-colunas { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.tf-coluna { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); display: flex; flex-direction: column; min-height: 120px; }
.tf-coluna.is-alvo { outline: 2px dashed var(--verde); outline-offset: -4px; }
.tf-coluna-hd { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-med); border-bottom: 1px solid var(--border); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.tf-nat-aguardando .tf-coluna-hd { color: var(--ouro-dk); background: var(--ouro-lt); }
.tf-nat-final .tf-coluna-hd { color: var(--verde-dkk); background: var(--verde-lt); }
.tf-contador { background: var(--white); border: 1px solid var(--border); border-radius: 99px; padding: 1px 8px; font-size: 10.5px; }
.tf-coluna-corpo { padding: 10px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tf-vazio { color: var(--muted); text-align: center; font-size: 12px; padding: 12px 0; }
.tf-card { background: var(--white); border: 1px solid var(--border); border-left: 4px solid var(--border-dk); border-radius: var(--r); padding: 10px 12px; box-shadow: var(--sh-sm); cursor: pointer; }
.tf-card[draggable="true"] { cursor: grab; }
.tf-card:hover, .tf-card:focus-visible { box-shadow: var(--sh-md); outline: none; }
.tf-card.is-arrastando { opacity: .5; }
.tf-card.is-cancelada { opacity: .6; }
.tf-pri-alta { border-left-color: var(--ouro); }
.tf-pri-urgente { border-left-color: var(--red); }
.tf-card-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.tf-codigo { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); letter-spacing: .06em; }
.tf-badge-pri { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tf-pri-alta .tf-badge-pri { color: var(--ouro-dk); }
.tf-pri-urgente .tf-badge-pri { color: var(--red); }
.tf-card-titulo { font-weight: 600; color: var(--text); line-height: 1.35; margin-bottom: 6px; overflow-wrap: anywhere; }
.tf-card-setor { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.tf-card-rodape { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.tf-av { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--verde), var(--verde-dkk)); color: #fff; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.tf-sem-resp { color: var(--ouro-dk); font-weight: 600; }
.tf-prazo, .tf-meta { display: inline-flex; align-items: center; gap: 3px; }
.tf-prazo.is-hoje { color: var(--ouro-dk); font-weight: 700; }
.tf-prazo.is-atrasada { color: var(--red); font-weight: 700; }
@media (max-width: 860px) {
  .tf-filtros .inp, .tf-filtros .tf-busca { min-width: 0; flex: 1 1 45%; }
}

/* Card da tarefa (painel lateral) */
.tf-card-painel { display: flex; flex-direction: column; gap: 18px; }
.tf-infos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tf-info { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); padding: 8px 10px; }
.tf-info span { display: block; font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.tf-info strong { font-size: 13px; color: var(--text); }
.tf-txt-vermelho { color: var(--red) !important; }
.tf-txt-ouro { color: var(--ouro-dk) !important; }
.tf-alerta { background: var(--terra-lt); border-left: 4px solid var(--red); padding: 8px 12px; border-radius: var(--r); margin: 0; }
.tf-acoes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tf-inp-sm { width: auto; padding-top: 7px; padding-bottom: 7px; }
.tf-perigo { color: var(--red); border-color: var(--red); }
.tf-secao h4 { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ouro-dk); margin: 0 0 8px; }
.tf-texto { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.tf-linha { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.tf-chk-item { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; }
.tf-chk-item.is-feito span { text-decoration: line-through; color: var(--muted); }
.tf-inline { display: flex; gap: 8px; margin-top: 8px; }
.tf-inline .inp { flex: 1; }
.tf-link { background: none; border: 0; color: var(--verde-dk); font: inherit; cursor: pointer; padding: 0; display: inline-flex; gap: 4px; align-items: center; text-align: left; }
.tf-upload { margin-top: 8px; display: inline-flex; gap: 4px; align-items: center; cursor: pointer; }
.tf-comentario { border: 1px solid var(--border); border-radius: var(--r); padding: 8px 10px; margin-bottom: 8px; }
.tf-comentario-hd { display: flex; justify-content: space-between; margin-bottom: 4px; }
.tf-comentar { position: relative; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; margin-top: 8px; }
.tf-timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--border); }
.tf-timeline li { position: relative; padding: 0 0 10px 10px; display: flex; flex-direction: column; font-size: 12.5px; }
.tf-timeline li::before { content: ''; position: absolute; left: -20px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--verde); }
.tf-tl-quando { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }
@media (max-width: 640px) { .tf-infos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Lista e tabelas */
.tf-tabela-wrap { overflow-x: auto; }
.tf-ordenavel { cursor: pointer; user-select: none; white-space: nowrap; }
.tf-paginacao { display: flex; gap: 12px; align-items: center; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
tr.is-cancelada td { opacity: .55; }
.tf-td-acoes { text-align: right; white-space: nowrap; }

/* Cadastros */
.tf-sub { font-size: 14px; margin: 4px 0 8px; }
.tf-campo-extra { display: grid; grid-template-columns: 1.2fr 1.4fr .8fr auto auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.tf-fluxo { margin-bottom: 18px; }
.tf-fluxo h3 { font-size: 15px; margin-bottom: 8px; }
.tf-etapas { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.tf-etapa { border: 1px solid var(--border); border-radius: var(--r); padding: 8px 12px; display: flex; flex-direction: column; background: var(--white); }
.tf-etapa small { color: var(--muted); font-size: 11px; }
.tf-etapa.tf-nat-aguardando { border-color: var(--ouro); background: var(--ouro-lt); }
.tf-etapa.tf-nat-final { border-color: var(--verde); background: var(--verde-lt); }
@media (max-width: 640px) { .tf-campo-extra { grid-template-columns: 1fr 1fr; } }

/* ───────────────────── Sino e notificações (Fase 2A) ───────────────────── */
.tf-sino-wrap { position: relative; display: inline-flex; }
.tf-sino-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.tf-sino-pop { position: absolute; top: calc(100% + 8px); right: 0; width: min(360px, 90vw); max-height: 70vh;
  overflow: auto; padding: 6px; z-index: 60; }
.tf-sino-item { display: flex; gap: 10px; width: 100%; padding: 10px; border: 0; background: none; text-align: left;
  border-radius: 8px; cursor: pointer; }
.tf-sino-item:hover { background: var(--bg-soft, rgba(0,0,0,.04)); }
.tf-sino-cat { width: 4px; border-radius: 2px; background: var(--border); flex: 0 0 4px; }
.tf-sino-cat.tf-cat-prazo { background: var(--red); }
.tf-sino-cat.tf-cat-atribuicao, .tf-sino-cat.tf-cat-mencao { background: var(--ouro); }
.tf-sino-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tf-sino-txt strong { font-size: 13px; }
.tf-sino-txt small, .tf-sino-txt time { font-size: 12px; color: var(--muted); }
.tf-sino-vazio, .tf-sino-todas { display: block; padding: 14px; text-align: center; font-size: 13px; color: var(--muted); }
.tf-nao-lida { font-weight: 600; }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 6px; }

/* ───────────── Card: bloco de tempo, cadeado e menção (Fase 2A) ───────────── */
.tf-selo-restrita { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  background: var(--red); color: #fff; font-size: 11px; }
.tf-etapa-estourada { color: var(--red); font-weight: 600; }

/* ───────────── Fila visível e tempo parado no quadro e na lista (Task 19) ───────────── */
/* .tf-fila-chip é elemento de topo de página (uma vez por carga do quadro, não por bloco de fluxo). */
.tf-fila-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  background: var(--ouro-lt, #f6efdc); color: #6b5518; font-size: 12px; text-decoration: none; margin: 0 0 14px; }
.tf-selo-parada { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--red);
  color: #fff; font-size: 11px; }
.tf-mencao-pop { position: absolute; z-index: 40; background: var(--white); border: 1px solid var(--border);
  border-radius: 8px; padding: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.tf-mencao-pop button { display: block; width: 100%; padding: 6px 10px; border: 0; background: none; text-align: left; cursor: pointer; }
.tf-mencao-pop button:hover { background: var(--bg-soft, rgba(0,0,0,.05)); }

/* Central de notificações (Task 16 — página ficou sem estas classes) */
.tf-nt-dia { margin: 18px 0 8px; font-size: 13px; color: var(--muted); }
.tf-nt-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px; margin-bottom: 8px; }
.tf-nt-abrir { display: grid; gap: 2px; flex: 1; border: 0; background: none; text-align: left; cursor: pointer; }
.tf-nt-cat { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tf-nt-cat.tf-cat-prazo { color: var(--red); }
.tf-nt-cat.tf-cat-atribuicao, .tf-nt-cat.tf-cat-mencao { color: var(--ouro-dk); }

/* ───────────────────── Home do gestor ───────────────────── */
.tf-hm { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.tf-hm-card { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.tf-hm-nums { display: flex; flex-wrap: wrap; gap: 20px; }
.tf-hm-num { display: flex; flex-direction: column; }
.tf-hm-num strong { font-size: 26px; line-height: 1.1; }
.tf-hm-num span { font-size: 12px; color: var(--muted); }
.tf-hm-alerta strong { color: var(--red); }
.tf-hm-comp { font-size: 12px; color: var(--muted); margin: 0; }
.tf-hm-aviso { font-size: 13px; color: var(--red); margin: 0; }
.tf-hm-calmo { font-size: 14px; color: var(--muted); margin: 0; }
