/* tarefas — ver tarefas.js. Tokens do index.html; peças do kit s-* (secoes.css). */

.t-sec { display:flex; flex-direction:column; overflow:hidden !important; }
.t-conteudo { flex:1; min-height:0; display:flex; flex-direction:column; }
.t-palco { flex:1; min-height:0; display:flex; flex-direction:column; }

.t-seletor { width:auto !important; max-width:260px; min-height:36px; padding:7px 10px !important; }

/* ---------- nova tarefa ---------- */
.t-nova { padding:12px 16px 4px; }
.t-nova[hidden] { display:none; }
.t-nova-linha {
  display:flex; align-items:flex-end; gap:8px; padding:6px; border-radius:16px;
  background:var(--vidro-leve); border:1px solid var(--vidro-brd); box-shadow:var(--vidro-topo);
}
.t-nova-linha:focus-within { border-color:var(--line); }
textarea.t-nova-campo {
  flex:1; min-width:0; resize:none; border:none; background:none; padding:9px 10px; min-height:38px;
  max-height:160px; line-height:1.4; font:inherit; font-size:14px; outline:none;
}
.t-urgente {
  flex:none; width:38px; height:38px; border-radius:50%; border:1px solid var(--vidro-brd); background:none;
  color:var(--muted); font-size:15px; cursor:pointer; transition:background .15s, color .15s, border-color .15s;
}
.t-urgente:hover { color:var(--err); border-color:rgba(248,113,113,.5); }
.t-urgente.on { background:var(--err); border-color:var(--err); color:#1a0606; }
.t-urgente:focus-visible, .t-mais:focus-visible, .t-acao:focus-visible, .t-corpo:focus-visible,
.t-cab-acao:focus-visible, .t-recolhida:focus-visible, .t-menu-item:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.t-criar { flex:none; min-height:38px; }
.t-nova-dica { font-size:11.5px; color:var(--muted); padding:5px 6px 0; opacity:.8; }

.t-resumo { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:8px 18px 4px; font-size:12.5px; color:var(--muted); }

/* ---------- o quadro (largo) ---------- */
.t-quadro {
  flex:1; min-height:0; display:grid; gap:10px; padding:8px 16px 16px; overflow-x:auto; overflow-y:hidden;
  grid-template-columns:repeat(6, minmax(190px, 1fr));
}
.t-quadro.concl-fechada { grid-template-columns:repeat(5, minmax(190px, 1fr)) minmax(120px, .55fr); }
.t-col {
  min-height:0; display:flex; flex-direction:column; border-radius:14px; border:1px solid var(--vidro-brd);
  background:rgba(255,255,255,.018); transition:border-color .15s, background .15s;
}
.t-col.recolhida { background:none; border-style:dashed; }
.t-quadro.arrastando .t-col { border-style:dashed; }
.t-col.alvo { border-color:var(--accent); border-style:solid !important; background:rgba(56,189,248,.07); }
.t-col-lista { flex:1; min-height:0; overflow-y:auto; padding:4px 8px 10px; display:flex; flex-direction:column; gap:7px; }
.t-col-vazia { padding:14px 6px; text-align:center; color:var(--muted); font-size:12px; opacity:.75; }
.t-recolhida {
  margin:4px 0; padding:12px 8px; border-radius:11px; border:1px dashed var(--linha-fraca); background:none;
  color:var(--muted); font:inherit; font-size:12.5px; cursor:pointer;
}
.t-recolhida:hover { color:var(--text); border-color:var(--line); }

.t-cab { display:flex; align-items:center; flex-wrap:wrap; gap:4px 7px; padding:10px 10px 6px 12px; min-height:40px; }
.t-cab > i { font-style:normal; color:var(--c); font-size:12px; width:14px; text-align:center; }
.t-cab h2 { margin:0; font-size:11.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); white-space:nowrap; }
.t-conta { font-size:11.5px; color:var(--muted); opacity:.75; font-weight:600; }
.t-cab-extra { margin-left:auto; display:flex; gap:4px; }
.t-cab-acao {
  border:none; background:none; font:inherit; font-size:12px; font-weight:650; color:var(--muted);
  cursor:pointer; padding:3px 4px; border-radius:6px; white-space:nowrap;
}
.t-cab-acao:hover { color:var(--text); }
.t-cab-acao.ok { color:var(--ok); }
.t-cab-acao.ac { color:var(--accent); }

/* ---------- o card ---------- */
.t-card {
  position:relative; display:flex; flex-direction:column; gap:6px; padding:9px 8px 7px 11px; border-radius:13px;
  background:var(--vidro-leve); border:1px solid var(--vidro-brd); box-shadow:var(--vidro-topo);
  cursor:grab; transition:border-color .15s, opacity .15s;
}
.t-card::before { content:""; position:absolute; left:0; top:10px; bottom:10px; width:3px; border-radius:0 3px 3px 0; background:var(--c); opacity:.7; }
.t-card:hover { border-color:rgba(255,255,255,.2); }
.t-card.arrastando { opacity:.35; }
.t-card.feita { opacity:.62; }
.t-corpo {
  min-width:0; display:flex; flex-direction:column; gap:3px; text-align:left; padding:1px 2px;
  border:none; background:none; color:var(--text); font:inherit; cursor:pointer; border-radius:6px;
}
.t-tit { font-size:13.5px; font-weight:600; line-height:1.35; overflow-wrap:break-word;
         display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.t-card.feita .t-tit { color:var(--muted); text-decoration:line-through; }
.t-desc { font-size:12.5px; color:var(--muted); line-height:1.4; overflow-wrap:break-word;
          display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.t-pe { display:flex; align-items:center; gap:4px; min-height:30px; }
.t-marca { flex:none; font-size:11px; color:var(--c); width:14px; text-align:center; }
.t-meta { flex:1; min-width:0; font-size:11px; color:var(--muted); opacity:.85; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.t-acao {
  flex:none; width:30px; height:30px; border-radius:50%; display:grid; place-items:center; border:none;
  background:none; font:inherit; font-size:15px; font-weight:700; color:var(--muted);
}
button.t-acao { cursor:pointer; }
.t-acao.ac { color:var(--accent); background:rgba(56,189,248,.14); }
.t-acao.ac:hover { background:rgba(56,189,248,.26); }
.t-acao.ok { color:var(--ok); background:rgba(45,212,167,.15); }
.t-acao.ok:hover { background:rgba(45,212,167,.28); }
.t-acao.pos { color:var(--accent); background:rgba(56,189,248,.12); font-size:12px; font-weight:800; }
.t-pulso { width:9px; height:9px; border-radius:50%; background:var(--accent); animation:t-pulso 1.8s ease-in-out infinite; }
@keyframes t-pulso { 50% { opacity:.25; } }
.t-mais-ic { font-size:17px; line-height:1; font-weight:700; }
.t-mais {
  flex:none; width:22px; height:30px; border-radius:8px; border:none; background:none; color:var(--muted);
  font-size:17px; line-height:1; cursor:pointer; opacity:.55;
}
.t-card:hover .t-mais, .t-mais:focus-visible, .t-mais[aria-expanded="true"] { opacity:1; }
.t-mais:hover { color:var(--text); background:rgba(255,255,255,.06); }

/* ---------- menu ⋯ ---------- */
.t-menu {
  position:fixed; z-index:65; min-width:220px; padding:6px; border-radius:13px;
  background:var(--vidro-denso); border:1px solid var(--vidro-brd);
  -webkit-backdrop-filter:var(--desfoque); backdrop-filter:var(--desfoque);
  box-shadow:var(--vidro-topo), 0 18px 44px rgba(0,0,0,.5); display:flex; flex-direction:column;
}
.t-menu-cab { font-size:10.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); padding:6px 10px 4px; }
.t-menu-sep { height:1px; background:var(--vidro-brd); margin:5px 4px; }
.t-menu-item {
  display:flex; align-items:center; gap:9px; padding:8px 10px; border-radius:8px; border:none; background:none;
  color:var(--text); font:inherit; font-size:13px; text-align:left; cursor:pointer;
}
.t-menu-item i { font-style:normal; width:16px; text-align:center; font-size:12px; color:var(--muted); }
.t-menu-item small { margin-left:auto; font-size:11px; color:var(--muted); }
.t-menu-item:hover, .t-menu-item:focus-visible { background:rgba(255,255,255,.07); }
.t-menu-item:disabled { opacity:.55; cursor:default; }
.t-menu-item.perigo { color:var(--err); }
.t-menu-item.perigo i { color:var(--err); }

/* ---------- detalhe ---------- */
.t-detalhe { width:min(640px, 100%); max-height:88vh; display:flex; flex-direction:column; gap:12px; }
.t-det-topo { display:flex; align-items:center; gap:10px; }
.t-estado {
  display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius:999px; font-size:12px; font-weight:700;
  color:var(--c); background:color-mix(in srgb, var(--c) 15%, transparent);
}
.t-estado i { font-style:normal; }
.t-det-idade { flex:1; min-width:0; font-size:12px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
input.t-det-titulo { font-size:17px; font-weight:650; }
textarea.t-det-desc { resize:vertical; min-height:120px; max-height:46vh; line-height:1.5; font:inherit; font-size:14px; }
.t-det-conta { font-size:11.5px; color:var(--muted); text-align:right; min-height:0; }
.t-det-conta:empty { display:none; }
.t-det-conta.over { color:var(--err); font-weight:650; }
.t-det-acoes { display:flex; flex-wrap:wrap; gap:8px; }
.t-det-acoes .s-btn { flex:1 1 auto; min-height:40px; }
.s-btn.t-btn-ok { background:var(--ok); border-color:var(--ok); color:#03140f; font-weight:650; }
.s-btn.t-btn-ok:hover { color:#03140f; filter:brightness(1.08); }
.t-det-sec { font-size:10.5px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; color:var(--muted); margin-top:2px; }
.t-det-chips { display:flex; flex-wrap:wrap; gap:7px; }
button.t-chip { padding:6px 11px; font-size:12.5px; gap:6px; }
button.t-chip i { font-style:normal; color:var(--c); }
button.t-chip:hover:not(:disabled) { border-color:var(--c); color:var(--text); }
button.t-chip.on { background:color-mix(in srgb, var(--c) 18%, transparent); border-color:var(--c); color:var(--text); cursor:default; }
.t-det-rodape { display:flex; align-items:flex-end; gap:8px; flex-wrap:wrap; padding-top:10px; border-top:1px solid var(--vidro-brd); }
.t-det-proj { flex:1 1 180px; }

/* ---------- estreito: chips + uma lista ---------- */
.t-chips, .t-lista-movel { display:none; }
@media (max-width:860px) {
  .t-quadro { display:none; }
  .t-nova { padding:10px 12px 2px; }
  .t-nova-dica { display:none; }
  .t-resumo { padding:6px 14px 2px; }
  .t-chips {
    display:flex; gap:6px; overflow-x:auto; padding:8px 12px 6px; scrollbar-width:none; flex:none;
  }
  .t-chips::-webkit-scrollbar { display:none; }
  .t-gchip { padding:5px 10px; font-size:12.5px; gap:6px; flex:none; }
  .t-gchip i { font-style:normal; color:var(--c); }
  .t-gchip b { font-weight:700; opacity:.7; }
  .t-gchip.on i { color:#04121f; }
  .t-lista-movel { display:flex; flex-direction:column; gap:8px; flex:1; min-height:0; overflow-y:auto; padding:0 12px 28px; }
  .t-lista-movel .t-cab { padding:6px 2px 0; }
  .t-card { cursor:default; padding:10px 8px 8px 12px; }
  .t-mais { opacity:1; width:34px; height:34px; }
  .t-acao { width:34px; height:34px; }
  .t-seletor { max-width:min(180px, 40vw); }
  .t-rot { display:none; }
  .t-criar { width:38px; padding:0 !important; }
  .t-det-rodape .s-btn { flex:1 1 auto; }
}
@media (max-width:860px) and (pointer:coarse) { .t-card { -webkit-user-drag:none; } }

@media (prefers-reduced-motion: reduce) { .t-pulso { animation:none; } .t-card, .t-col { transition:none; } }

/* Visão de TODOS os projetos: a etiqueta do projeto no card (tocar filtra por ele) e o seletor do
   projeto da tarefa nova, ao lado da caixa. */
.t-proj-linha { padding:0 2px; display:flex; min-width:0; }
.t-proj {
  display:inline-flex; align-items:center; gap:5px; min-width:0; max-width:100%; padding:2px 8px 2px 6px;
  border:1px solid var(--vidro-brd); border-radius:999px; background:rgba(255,255,255,.04);
  color:var(--text); font:inherit; font-size:11px; font-weight:550; cursor:pointer;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex-shrink:1;
}
.t-proj i { width:7px; height:7px; border-radius:50%; flex:none; }
.t-proj:hover { border-color:var(--accent); color:var(--accent); }
.t-nova-proj { width:auto; max-width:200px; flex:none; }
@media (max-width:860px) {
  .t-nova-linha { flex-wrap:wrap; }
  .t-nova-proj { max-width:none; width:100%; order:-1; }
}

/* ---------- atividade: a faixa de números e gráficos acima do quadro (atividade.js no servidor) ---------- */
.t-painel { flex:none; margin:4px 16px 6px; border-radius:14px; border:1px solid var(--vidro-brd); background:rgba(255,255,255,.018); }
.t-painel.fechado { background:none; border-style:dashed; }
.t-pn-topo { display:flex; align-items:center; gap:10px; padding:6px 8px 6px 6px; }
.t-pn-toggle {
  display:inline-flex; align-items:center; gap:8px; min-width:0; flex:1; padding:5px 8px; border:none; background:none;
  color:var(--text); font:inherit; cursor:pointer; border-radius:8px; text-align:left;
}
.t-pn-toggle i { font-style:normal; color:var(--muted); width:10px; font-size:11px; }
.t-pn-toggle b { font-size:11.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); }
.t-pn-resumo { font-size:12.5px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.t-pn-toggle:hover b, .t-pn-toggle:hover i { color:var(--text); }
.t-pn-toggle:focus-visible, .t-pn-seg button:focus-visible, .t-gp:focus-visible, .t-gl:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.t-pn-seg { display:flex; gap:2px; padding:2px; border-radius:9px; background:rgba(255,255,255,.04); border:1px solid var(--vidro-brd); }
.t-pn-seg button {
  border:none; background:none; color:var(--muted); font:inherit; font-size:12px; font-weight:650; padding:3px 9px;
  border-radius:7px; cursor:pointer; font-variant-numeric:tabular-nums;
}
.t-pn-seg button.on { background:rgba(56,189,248,.16); color:var(--accent); }
.t-pn-vazio { padding:4px 16px 14px; font-size:12.5px; color:var(--muted); }
.t-pn-corpo { display:flex; flex-direction:column; gap:10px; padding:0 10px 10px; }

.t-kpis { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:8px; }
.t-kpi { display:flex; flex-direction:column; gap:1px; min-width:0; padding:8px 12px; border-radius:11px; background:var(--vidro-leve); border:1px solid var(--vidro-brd); }
.t-kpi-rot { font-size:10.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); }
.t-kpi b { font-size:21px; font-weight:700; line-height:1.25; letter-spacing:-.01em; }
.t-kpi-sub { font-size:11.5px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.t-kpi-filtro .t-kpi-sub { color:var(--ok); }

.t-graficos { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:8px; }
.t-gr { min-width:0; display:flex; flex-direction:column; gap:6px; padding:9px 12px 10px; border-radius:11px; border:1px solid var(--vidro-brd); background:rgba(255,255,255,.015); }
.t-gr-tit { display:flex; align-items:baseline; gap:8px; font-size:11.5px; font-weight:700; color:var(--muted); }
.t-gr-tit > span:first-child { letter-spacing:.06em; text-transform:uppercase; }
.t-gr-leg { margin-left:auto; font-size:10.5px; font-weight:500; opacity:.75; white-space:nowrap; }

.t-gr-proj { display:flex; flex-direction:column; gap:3px; }
.t-gp {
  display:grid; grid-template-columns:minmax(0, 1.1fr) minmax(0, 1fr) auto; align-items:center; gap:8px; padding:2px 4px;
  border:none; background:none; color:var(--text); font:inherit; font-size:12px; text-align:left; cursor:pointer; border-radius:6px;
}
.t-gp:hover { background:rgba(255,255,255,.05); }
.t-gp-nome { display:flex; align-items:center; gap:6px; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.t-gp-nome i { flex:none; width:7px; height:7px; border-radius:50%; }
.t-gp-barra { height:6px; border-radius:3px; background:rgba(255,255,255,.05); overflow:hidden; }
.t-gp-barra i { display:block; height:100%; border-radius:3px; opacity:.85; }
.t-gp-val { font-size:11.5px; color:var(--text); white-space:nowrap; }
.t-gp-val small { color:var(--muted); font-size:10.5px; }

.t-gr-ritmo { display:flex; flex-direction:column; gap:4px; }
.t-rit-barras { display:flex; align-items:flex-end; gap:2px; height:76px; padding-top:12px; }
.t-rit-barras.denso { gap:1px; }
.t-rit-col { flex:1; min-width:0; height:100%; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; position:relative; }
.t-rit-col i { display:block; width:100%; max-width:14px; border-radius:3px 3px 1px 1px; background:var(--accent); opacity:.75; }
.t-rit-col:hover i { opacity:1; }
.t-rit-barras.hora .t-rit-col i { background:var(--warn); opacity:.65; }
.t-rit-n { position:absolute; top:-12px; font-size:9.5px; font-weight:700; color:var(--ok); font-variant-numeric:tabular-nums; }
.t-rit-n, .t-rit-ponto { pointer-events:none; }
.t-rit-ponto { position:absolute; top:-9px; width:calc(3px + var(--n) * 1px); height:calc(3px + var(--n) * 1px); border-radius:50%; background:var(--ok); }
.t-rit-eixo { display:flex; justify-content:space-between; font-size:10px; color:var(--muted); opacity:.8; font-variant-numeric:tabular-nums; }

.t-gr-longas { display:flex; flex-direction:column; gap:1px; }
.t-gl {
  display:flex; align-items:center; gap:8px; padding:3px 4px; border:none; background:none; color:var(--text);
  font:inherit; font-size:12px; text-align:left; cursor:pointer; border-radius:6px;
}
.t-gl:hover { background:rgba(255,255,255,.05); }
.t-gl-tit { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.t-gl-tit i { font-style:normal; color:var(--accent); }
.t-gl-val { flex:none; font-size:11.5px; color:var(--muted); }

/* o card que o terminal criou sozinho */
.t-auto-ic { flex:none; font-size:11px; color:var(--accent); width:14px; text-align:center; opacity:.85; }
.t-auto {
  display:inline-flex; align-items:center; padding:3px 9px; border-radius:999px; font-size:11.5px; font-weight:650;
  color:var(--accent); background:rgba(56,189,248,.12); white-space:nowrap;
}
.t-det-pedidos { display:flex; flex-direction:column; gap:6px; max-height:34vh; overflow-y:auto; padding-right:2px; }
.t-ped { padding:7px 10px; border-radius:10px; background:rgba(255,255,255,.03); border:1px solid var(--vidro-brd); }
.t-ped-txt { font-size:13px; line-height:1.45; white-space:pre-wrap; overflow-wrap:anywhere; max-height:7.3em; overflow:hidden; }
.t-ped-meta { display:flex; flex-wrap:wrap; align-items:center; gap:4px 6px; margin-top:3px; font-size:11px; color:var(--muted); }
.t-ped-meta code { font-size:10.5px; padding:0 5px; border-radius:5px; background:rgba(45,212,167,.12); color:var(--ok); }
.t-det-juntar { display:flex; gap:8px; }
.t-det-juntar .s-select { flex:1; min-width:0; }

@media (max-width:860px) {
  .t-painel { margin:4px 12px 4px; }
  .t-kpis { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .t-kpi b { font-size:18px; }
  .t-graficos { display:flex; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none; }
  .t-graficos::-webkit-scrollbar { display:none; }
  .t-gr { flex:0 0 min(300px, 82%); scroll-snap-align:start; }
  /* com a faixa aberta não sobra altura pra lista rolar sozinha: rola o palco inteiro */
  .t-palco { overflow-y:auto; }
  .t-palco .t-lista-movel { flex:none; overflow:visible; }
}
@media (max-height:760px) and (min-width:861px) { .t-rit-barras { height:56px; } }
