/* Tarefas (tarefas.html): calendário + lista + painel de detalhes com subtarefas. Usa os tokens de style.css.
   --tk-blue era o azul do Asana para seleção, foco e "hoje". Agora é a TINTA da marca (verde da Lemon,
   vermelho da Luna): seleção é ação, e ação tem a cor da marca. --tk-done é o verde de sinal (concluído). */
.tk-body { --tk-blue: var(--ink); --tk-done: var(--grn); }

/* camadas flutuantes do calendário (menus, sugestões, busca, janelas): vidro espesso, como em style.css */
.tk-pop, .tk-suggest, .tk-tagmenu, .tk-qres {
  background: var(--glass-thick); border: var(--hair) solid var(--line2);
  -webkit-backdrop-filter: var(--glass-blur-deep); backdrop-filter: var(--glass-blur-deep);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge);
  animation: menuIn var(--dur-1) var(--ease) both;
}
.tk-app { display: flex; align-items: stretch; min-height: calc(100vh - var(--hdr-h, 75px)); }
.tk-main { flex: 1; min-width: 0; padding: 20px clamp(14px, 2.4vw, 32px) 80px; }
.tk-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.tk-head h1 { font-size: 1.5rem; margin: 0; letter-spacing: -0.02em; }
.tk-views { display: flex; gap: 4px; border-bottom: 1px solid var(--sep); }
.tk-view { background: none; border: 0; padding: 8px 12px; font: inherit; font-weight: 600; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tk-view:hover { color: var(--text); }
.tk-view[aria-selected="true"] { color: var(--text); border-bottom-color: var(--tk-blue); }
.tk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.tk-bar .grow { flex: 1; }
.tk-bar select { width: auto; padding: 7px 12px; font-size: 0.8125rem; }
.tk-cal-ctl { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; }
.tk-cal-ctl strong { margin-left: 6px; font-size: 0.9375rem; }
.tk-monthbtn { margin-left: 6px; border: 0; background: none; font: inherit; font-size: 0.9375rem; font-weight: 700; color: var(--text); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.tk-monthbtn:hover { background: var(--fill); }
.tk-cal-ctl { position: relative; }
.tk-monthpick { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.tk-check input { width: auto; margin: 0; }
/* Mostrar/ocultar concluídas (ícone). Mostrando = estado ligado, com a seleção da marca e o círculo com visto;
   ocultando = círculo riscado, recuado. A dica diz o que o clique FAZ. */
.tk-donetoggle .i-hide, .tk-donetoggle:not(:has(input:checked)) .i-show { display: none; }
.tk-donetoggle:not(:has(input:checked)) .i-hide { display: block; }
.tk-donetoggle:has(input:checked) { background: var(--acc-t); color: var(--ink); border-color: transparent; box-shadow: inset 0 0 0 1px var(--ink); }
.tk-donetoggle:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
/* o botão mora na borda direita: a dica abre alinhada à direita, senão passa da tela e cria rolagem lateral */
.tk-donetoggle[data-tip]::after { content: "Ocultar concluídas"; left: auto; right: 0; transform: translate(0, -4px); }
.tk-donetoggle[data-tip]:hover::after, .tk-donetoggle[data-tip]:has(:focus-visible)::after { transform: none; }
.tk-donetoggle:not(:has(input:checked))[data-tip]::after { content: "Mostrar concluídas"; }
.tk-check { display: inline-flex; gap: 6px; align-items: center; font-size: 0.8125rem; color: var(--text-2); cursor: pointer; }
.tk-undated-wrap { position: relative; }
.tk-pop { position: absolute; right: 0; top: calc(100% + 6px); width: 320px; max-height: 360px; overflow: auto; border-radius: var(--r-lg); padding: 6px; z-index: 30; }
.tk-pop .tk-row { border-radius: 8px; }
.tk-pop .tk-empty { padding: 14px; }

/* ----- calendário ----- */
/* Calendário e lista: superfície SÓLIDA (muito texto pequeno), com fio fino e raio de bloco. */
.tk-cal { border: var(--hair) solid var(--line2); border-radius: var(--r-lg); overflow: hidden; background: var(--card); }
.tk-dow, .tk-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tk-dow div { padding: 8px 10px; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em; color: var(--text-3); border-bottom: 1px solid var(--sep); }
.tk-cell { min-height: 124px; padding: 6px 6px 8px; border-right: 1px solid var(--sep); border-bottom: 1px solid var(--sep); display: flex; flex-direction: column; gap: 4px; position: relative; }
.tk-week .tk-cell:last-child { border-right: 0; }
.tk-week:last-child .tk-cell { border-bottom: 0; }
.tk-infcal { position: relative; height: calc(100vh - 270px); min-height: 420px; overflow-y: auto; border: var(--hair) solid var(--line2); border-radius: var(--r-lg); background: var(--card); overscroll-behavior: contain; }
.tk-infcal .tk-dow { position: sticky; top: 0; z-index: 3; background: var(--card); }
.tk-infcal .tk-cell { min-height: 112px; }
.tk-infcal .tk-week .tk-cell:last-child { border-right: 0; }
.tk-infcal .tk-week:last-child .tk-cell { border-bottom: 1px solid var(--sep); }
.tk-cell.alt { background: color-mix(in srgb, var(--fill) 45%, transparent); }
.tk-cell.first .tk-daynum { color: var(--text); font-weight: 700; }
.tk-moredays { border: 0; background: none; font: inherit; font-size: 0.75rem; font-weight: 600; color: var(--text-2); text-align: left; padding: 2px 6px; border-radius: 6px; cursor: pointer; }
.tk-moredays:hover { background: var(--fill); color: var(--text); }
.tk-cell.off { background: color-mix(in srgb, var(--fill) 55%, transparent); }
.tk-cell.off .tk-daynum { color: var(--text-3); }
.tk-cell.drop { background: var(--acc-t); outline: 2px solid var(--tk-blue); outline-offset: -2px; }
.tk-daynum { font-size: 0.8125rem; font-weight: 600; color: var(--text-2); padding: 2px 4px; align-self: flex-start; min-width: 24px; text-align: center; font-variant-numeric: tabular-nums; }
/* hoje: a única marca cheia da grade, na cor da marca */
.tk-cell.today .tk-daynum { background: var(--lemon); color: var(--on-lemon); border-radius: var(--r-pill); font-weight: 700; box-shadow: var(--glow-acc); }
.tk-chip { display: flex; align-items: center; gap: 5px; width: 100%; text-align: left; border: 0; border-radius: 6px; padding: 4px 7px; font: inherit; font-size: 0.75rem; font-weight: 500; line-height: 1.25; color: var(--black); cursor: pointer; background: var(--chip, var(--lemon)); }
.tk-chip:hover { filter: brightness(0.95); }
.tk-chip.sel { outline: 2px solid var(--tk-blue); outline-offset: 1px; }
.tk-chip.done { opacity: 0.5; }
.tk-chip.done .tk-chip-t { text-decoration: line-through; }
.tk-chip-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-chip-n { font-size: 0.6875rem; opacity: 0.75; white-space: nowrap; }
.tk-chip.dragging { opacity: 0.35; }
.tk-addday { opacity: 0; border: 0; background: none; font: inherit; font-size: 0.75rem; color: var(--text-3); text-align: left; padding: 3px 5px; border-radius: 6px; cursor: pointer; margin-top: auto; }
.tk-cell:hover .tk-addday, .tk-addday:focus-visible { opacity: 1; }
.tk-addday:hover { background: var(--fill); color: var(--text); }
.tk-quick { width: 100%; padding: 5px 7px; font-size: 0.75rem; border-radius: 6px; border: 1px solid var(--tk-blue); background: var(--card); color: var(--text); }
.tk-more { font-size: 0.6875rem; color: var(--text-3); padding: 0 6px; }

/* ----- lista ----- */
.tk-list { background: var(--card); border: var(--hair) solid var(--line2); border-radius: var(--r-lg); overflow: hidden; }
.tk-sec { padding: 12px 14px 6px; font-size: 0.6875rem; font-weight: 700; color: var(--text-3); letter-spacing: 0.07em; text-transform: uppercase; }
.tk-row { display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-top: 1px solid var(--sep); cursor: pointer; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; font: inherit; color: var(--text); text-align: left; }
.tk-row:hover { background: var(--fill); }
.tk-row.sel { background: var(--acc-t); box-shadow: inset 3px 0 0 var(--tk-blue); }
.tk-row .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-row.done .t { color: var(--text-3); text-decoration: line-through; }
/* Minhas tarefas: a subtarefa vem primeiro; o nome da tarefa-mãe vem depois, recuado */
.tk-of { color: var(--text-3); font-weight: 400; }
.tk-row .meta { font-size: 0.75rem; color: var(--text-3); white-space: nowrap; }
.tk-row .meta.late { color: var(--bad); }
.tk-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--chip, var(--lemon)); flex: none; }
.tk-empty { color: var(--text-3); padding: 18px 14px; font-size: 0.875rem; }
.tk-listadd { display: flex; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--sep); }
.tk-listadd input { flex: 1; }

/* círculo de concluir */
.tk-circ { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--text-3); background: none; flex: none; padding: 0; cursor: pointer; display: inline-grid; place-items: center; color: transparent; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.tk-circ:hover { border-color: var(--grn-i); color: var(--grn-i); }
/* concluído: preenchimento verde de SINAL com o visto em preto (branco sobre esse verde não chega a 3:1) */
.tk-circ.on { background: var(--tk-done); border-color: var(--tk-done); color: var(--black); }
.tk-circ svg { width: 12px; height: 12px; }

/* ----- painel da direita ----- */
/* Painel de detalhes: CARTÃO flutuante, mesmo fixo na lateral. Mesma altura da área de conteúdo (respiro igual em
   cima e embaixo), cantos de janela (--r-xl) e vidro ESPESSO: muito texto em cima, quase não deixa ler o que passa
   por baixo. --tk-top = altura do cabeçalho; o respiro é o mesmo do topo do conteúdo (.tk-main). */
.tk-body { --tk-top: var(--hdr-h, 75px); --tk-gap: 16px; } /* --hdr-h é medido por js/theme.js */
/* O calendário ocupa a largura toda (barra lateral colada à esquerda): o cabeçalho também, com a logo alinhada aos
   quadradinhos dos projetos na barra lateral (10px da barra + 10px do item). */
.tk-body .top { padding-inline: 20px; }
.tk-panel {
  width: min(var(--tk-panel-w, 460px), calc(100vw - 32px)); flex: none; align-self: flex-start;
  position: sticky; top: calc(var(--tk-top) + var(--tk-gap)); height: calc(100vh - var(--tk-top) - 2 * var(--tk-gap));
  margin: var(--tk-gap) var(--tk-gap) var(--tk-gap) 0; padding: 0; overflow: auto; overscroll-behavior: contain;
  background: var(--glass-thick); border: var(--hair) solid var(--line2); border-radius: var(--r-xl);
  -webkit-backdrop-filter: var(--glass-blur-deep); backdrop-filter: var(--glass-blur-deep);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge);
  animation: panelIn var(--dur-2) var(--ease) both;
}
@keyframes panelIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
/* Alça de largura: faixa de 14px na borda esquerda do painel, com a mesma altura dele. Invisível em repouso; no hover
   (e no foco, e arrastando) aparece a pegada na tinta da marca. Arrastar para a esquerda cresce o painel e encolhe o
   calendário/lista; setas do teclado também mudam; duplo clique volta aos 460px. */
.tk-resizer {
  display: none; position: sticky; flex: none; align-self: flex-start; z-index: 3;
  top: calc(var(--tk-top) + var(--tk-gap)); height: calc(100vh - var(--tk-top) - 2 * var(--tk-gap));
  width: var(--tk-gap); margin: var(--tk-gap) 0; cursor: col-resize; touch-action: none; border-radius: var(--r-pill);
}
.tk-app:has(#tk-panel:not([hidden])) .tk-resizer { display: block; }
/* Painel aberto: o espaço entre a lista e o painel É a alça (--tk-gap, 16px), com a pegada no centro dele.
   Para isso o conteúdo perde o respiro da direita, que somava mais ~30px de vão. */
.tk-app:has(#tk-panel:not([hidden])) .tk-main { padding-right: 0; }
.tk-resizer::before, .tk-resizer::after { content: ""; position: absolute; left: 50%; translate: -50% 0; border-radius: var(--r-pill); opacity: 0; transition: opacity var(--dur-1) var(--ease), height var(--dur-2) var(--ease), background-color var(--dur-1) var(--ease); }
.tk-resizer::before { top: 0; bottom: 0; width: 2px; background: var(--line2); }                         /* trilho */
.tk-resizer::after { top: 50%; translate: -50% -50%; width: 6px; height: 44px; background: var(--ink); box-shadow: var(--glow-acc); } /* pegada */
.tk-resizer:hover::before, .tk-resizer:hover::after, .tk-resizer:focus-visible::before, .tk-resizer:focus-visible::after,
.tk-resizer.dragging::before, .tk-resizer.dragging::after { opacity: 1; }
.tk-resizer:hover::after, .tk-resizer.dragging::after { height: 72px; }
.tk-resizer:focus-visible { outline: none; box-shadow: none; }
/* enquanto arrasta: cursor de redimensionar na página toda, sem selecionar texto nem animar */
body.tk-resizing { cursor: col-resize; user-select: none; -webkit-user-select: none; }
body.tk-resizing * { transition: none !important; }
/* Cabeçalho do painel: linha 1 = estado da tarefa + FECHAR no canto direito de cima (sempre); linha 2 = ações.
   Botão em pílula não quebra em várias linhas: o texto fica numa linha e é a linha de ações que quebra. */
.tk-ph { position: sticky; top: 0; z-index: 2; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 12px 18px; background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-bottom: var(--hair) solid var(--line2); }
.tk-ph-top, .tk-ph-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* ações secundárias: metade da altura dos botões normais (18px), texto no mínimo da escala (11px) */
.tk-ph-acts { gap: 6px; }
.tk-ph-acts .btn.small { min-height: 18px; height: 18px; padding: 0 9px; font-size: 0.6875rem; font-weight: 600; line-height: 1; gap: 4px; }
@media (pointer: coarse) { .tk-ph-acts .btn.small { height: 32px; padding: 0 12px; } }
.tk-ph .btn, .tk-donebtn { white-space: nowrap; }
.tk-ph .grow { flex: 1; }
.tk-close { width: 32px; height: 32px; font-size: 0.875rem; }
.tk-close[data-tip]::after { left: auto; right: 0; transform: translate(0, -4px); }
.tk-close[data-tip]:hover::after, .tk-close[data-tip]:focus-visible::after { transform: none; }
.tk-donebtn { display: inline-flex; align-items: center; gap: 7px; border: var(--hair) solid var(--line2); background: var(--card); color: var(--text); border-radius: var(--r-pill); padding: 6px 13px; font: inherit; font-size: 0.8125rem; font-weight: 600; cursor: pointer; transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease); }
/* passar o mouse em "Marcar como concluída" já mostra o resultado: a caixa fica verde (verde de SINAL, = concluído) */
.tk-donebtn:not(.on):hover { background: var(--grn); border-color: transparent; color: var(--black); }
.tk-donebtn.on { background: var(--grn-t); border-color: transparent; box-shadow: inset 0 0 0 1px var(--grn-i); color: var(--grn-i); }
.tk-donebtn.on:hover { background: var(--fill); box-shadow: inset 0 0 0 1px var(--line2); color: var(--text); }
.tk-saved { font-size: 0.75rem; color: var(--text-3); min-width: 56px; text-align: right; }
.tk-pb { padding: 16px 18px 0; }
.tk-ttl { display: block; resize: none; overflow: hidden; line-height: 1.3; width: 100%; border: 1px solid transparent; background: none; font: inherit; font-size: 1.125rem; font-weight: 700; letter-spacing: -0.015em; padding: 6px 8px; margin: 0 -8px 8px; border-radius: 8px; color: var(--text); }
.tk-ttl:hover { border-color: var(--sep); }
.tk-ttl:focus { outline: none; border-color: var(--tk-blue); }
/* minmax(0, 1fr): a coluna dos campos pode encolher com o painel estreito (1fr puro não deixa ficar menor que o
   texto do seletor, e o campo vazava da borda) */
.tk-fields { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 6px 8px; align-items: center; margin: 6px 0 14px; }
.tk-fields label.k { font-size: 0.8125rem; color: var(--text-2); }
/* Campos do painel (responsável, data, projeto): todos com a MESMA altura, 36px, raio de campo e fio fino.
   O input[type=date] global tem min-height 47px (formulário dos artistas): aqui ele é zerado, senão a data fica
   mais alta que o responsável. */
.tk-fields input, .tk-fields select { height: 36px; min-height: 36px; padding: 0 12px; font-size: 0.875rem; line-height: 1.2; border-radius: var(--r-sm); background: var(--fill); border: 1px solid var(--line); width: 100%; color: var(--text); }
.tk-fields select { padding-right: 34px; background-position: right 12px center; }
.tk-fields .tk-tagfield { min-height: 36px; border-radius: var(--r-sm); border: 1px solid var(--line); }
.tk-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; grid-column: 2; }
.tk-tag { background: var(--lemon); color: var(--on-lemon); border-radius: 6px; padding: 2px 8px; font-size: 0.75rem; font-weight: 600; }
.tk-h { font-size: 0.875rem; font-weight: 700; margin: 18px 0 6px; display: flex; align-items: center; gap: 8px; }
.tk-h .n { color: var(--text-3); font-weight: 600; }
.tk-notes { width: 100%; min-height: 96px; max-height: 60vh; overflow-y: auto; resize: vertical; border: 1px solid var(--sep); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 0.875rem; background: var(--card); color: var(--text); line-height: 1.5; }
.tk-notes:focus { outline: none; border-color: var(--tk-blue); }
.tk-subs { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--sep); }
.tk-sub { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--sep); }
.tk-sub:hover .tk-x { opacity: 1; }
.tk-sub input.t { flex: 1; min-width: 0; border: 1px solid transparent; background: none; font: inherit; font-size: 0.875rem; padding: 4px 6px; border-radius: 6px; color: var(--text); }
.tk-sub input.t:hover { border-color: var(--sep); }
.tk-sub input.t:focus { outline: none; border-color: var(--tk-blue); }
.tk-sub.done input.t { color: var(--text-3); text-decoration: line-through; }
.tk-sub input.d { width: 118px; flex: none; font: inherit; font-size: 0.75rem; padding: 4px 6px; border-radius: 6px; border: 1px solid transparent; background: none; color: var(--text-3); }
.tk-sub input.d:hover, .tk-sub input.d:focus { border-color: var(--sep); background: var(--fill); color: var(--text); }
.tk-sub input.d.empty:not(:focus) { opacity: 0; }
.tk-sub:hover input.d.empty { opacity: 1; }
.tk-x { opacity: 0; border: 0; background: none; color: var(--text-3); cursor: pointer; font-size: 1rem; line-height: 1; padding: 4px 6px; border-radius: 6px; }
.tk-x:hover { background: var(--fill); color: var(--bad); }
.tk-subadd { margin-top: 8px; width: 100%; text-align: left; border: 0; background: none; font: inherit; font-size: 0.875rem; color: var(--text-2); padding: 8px 6px; border-radius: 8px; cursor: pointer; }
.tk-subadd:hover { background: var(--fill); color: var(--text); }
.tk-subnew { width: 100%; padding: 8px 10px; font-size: 0.875rem; border-radius: 8px; border: 1px solid var(--tk-blue); background: var(--card); color: var(--text); margin-top: 8px; }
.tk-prog { height: 4px; border-radius: 2px; background: var(--fill); overflow: hidden; margin-bottom: 6px; }
.tk-prog > i { display: block; height: 100%; background: var(--tk-done); width: 0; border-radius: inherit; transition: width var(--dur-3) var(--ease); }
.tk-danger { margin-top: 28px; }

@media (max-width: 900px) {
  .tk-app { flex-direction: column; }
  .tk-panel { width: auto; align-self: stretch; position: static; height: auto; max-height: none; margin: 0 12px 16px; }
  .tk-app:has(#tk-panel:not([hidden])) .tk-resizer { display: none; } /* empilhado não há largura para arrastar */
  .tk-cell { min-height: 84px; }
}

/* ===== v2: barra lateral, avatares, janelas, aviso ===== */
.tk-side { width: 244px; flex: none; border-right: 1px solid var(--sep); padding: 14px 10px 40px; position: sticky; top: var(--tk-top); height: calc(100vh - var(--tk-top)); overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.tk-me { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; }
.tk-me-n { font-weight: 600; font-size: 0.875rem; line-height: 1.2; }
.tk-me-e { font-size: 0.75rem; color: var(--text-3); }
.tk-nav { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: none; font: inherit; font-size: 0.875rem; color: var(--text); padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; text-align: left; transition: background-color var(--dur-1) var(--ease); }
.tk-nav:hover { background: var(--fill); }
/* item escolhido: fundo tingido e tinta da marca, como toda seleção do app */
.tk-nav.on { background: var(--acc-t); color: var(--ink); font-weight: 650; }
.tk-nav-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-sq { width: 12px; height: 12px; border-radius: 4px; background: var(--c); flex: none; box-shadow: 0 0 0 var(--hair) var(--line2); }
/* contador: pílula cheia na cor da marca, número tabular */
.tk-badge { background: var(--lemon); color: var(--on-lemon); font-size: 0.6875rem; font-weight: 700; border-radius: var(--r-pill); padding: 1px 7px; font-variant-numeric: tabular-nums; }
.tk-cog { opacity: 0; color: var(--text-3); padding: 0 6px; border-radius: 6px; font-weight: 700; }
.tk-nav:hover .tk-cog, .tk-cog:focus-visible { opacity: 1; }
.tk-cog:hover { background: var(--fill-hover); color: var(--text); }
.tk-side-h { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 2px; padding: 0 10px; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
.tk-side-h .btn.icon { width: 26px; height: 26px; font-size: 1.1rem; }
.tk-team { margin-top: 14px; color: var(--text-2); }
.tk-demo { margin-top: auto; padding: 14px 8px 0; font-size: 0.75rem; }
.tk-demo select { margin-top: 6px; width: 100%; padding: 6px 8px; font-size: 0.8125rem; }
.tk-av { display: inline-grid; place-items: center; border-radius: 50%; background: var(--c); color: #fff; font-weight: 700; flex: none; line-height: 1; }
.tk-av.none { background: transparent; border: 1.5px dashed var(--text-3); }
.tk-chip .tk-av { margin-left: auto; }
.tk-whorow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tk-whorow select, .tk-whorow input { flex: 1; min-width: 0; }
.tk-whorow .tk-rel { flex: none; }
.tk-crumb { border: 0; background: none; color: var(--text-2); font: inherit; font-size: 0.8125rem; cursor: pointer; padding: 0 0 8px; text-align: left; }
.tk-crumb:hover { color: var(--text); text-decoration: underline; }
.tk-sub select.who { width: 118px; flex: none; font: inherit; font-size: 0.75rem; padding: 4px 6px; border-radius: 6px; border: 1px solid transparent; background: none; color: var(--text-2); }
.tk-sub select.who:hover, .tk-sub select.who:focus { border-color: var(--sep); background: var(--fill); color: var(--text); }
.tk-sub select.who.empty:not(:focus) { opacity: 0; }
.tk-sub:hover select.who.empty { opacity: 1; }
.tk-head .btn.small { margin-left: -6px; }

.tk-modal { border: var(--hair) solid var(--line2); border-radius: var(--r-xl); padding: 22px 24px; background: var(--glass-thick); -webkit-backdrop-filter: var(--glass-blur-deep); backdrop-filter: var(--glass-blur-deep); color: var(--text); width: min(520px, calc(100vw - 32px)); box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge); }
.tk-modal[open] { animation: modalIn var(--dur-2) var(--ease) both; }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.tk-modal::backdrop { background: rgba(0, 0, 0, .48); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tk-modal h2 { margin: 0 0 16px; font-size: 1.125rem; }
.tk-modal h3 { margin: 18px 0 8px; font-size: 0.9375rem; }
.tk-modal-act { display: flex; gap: 8px; align-items: center; margin-top: 20px; }
.tk-modal-act .grow, .tk-trow .grow { flex: 1; }
.tk-form { display: grid; grid-template-columns: 70px 1fr; gap: 10px 10px; align-items: start; }
.tk-form label.k { font-size: 0.8125rem; color: var(--text-2); padding-top: 9px; }
.tk-form input[type="text"], .tk-form input:not([type]) { width: 100%; }
.tk-form .err { grid-column: 1 / -1; margin: 0; }
.tk-sw { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 6px; }
.tk-swb { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; background: var(--c); cursor: pointer; padding: 0; }
.tk-swb.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--card) inset; }

/* ── Cor personalizada (js/color-picker.js) ──────────────────────────
   Última bolinha das cores: anel de arco-íris = "escolha qualquer cor". Com uma cor personalizada escolhida,
   o centro mostra essa cor; sem ela, um "+". */
.tk-swwrap { position: relative; }
.tk-swb-custom {
  position: relative; border: 0;
  background: conic-gradient(from 180deg, #ff3b30, #ff9500, #ffd60a, #34c759, #0a84ff, #bf5af2, #ff3b30);
}
.tk-swb-custom::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--card); }
.tk-swb-custom.has-color::before { background: var(--c); box-shadow: 0 0 0 1.5px var(--card); }
.tk-swb-custom::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.875rem; font-weight: 700; line-height: 1; color: var(--text-2); }
.tk-swb-custom.has-color::after { content: none; }
.tk-swb-custom.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--text); }

/* a janela de projeto deixa o dropdown passar da borda (senão ele virava rolagem dentro da janela) */
.tk-modal.tk-modal-pop { overflow: visible; }

/* dropdown: vidro espesso, cantos arredondados, abre logo abaixo das bolinhas */
.cp {
  position: absolute; z-index: 60; top: calc(100% + 8px); left: 0; width: 256px; padding: 12px;
  background: var(--glass-thick); border: var(--hair) solid var(--line2); border-radius: var(--r-lg);
  -webkit-backdrop-filter: var(--glass-blur-deep); backdrop-filter: var(--glass-blur-deep);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge);
  animation: menuIn var(--dur-1) var(--ease) both;
}
/* saturação (→) e brilho (↑) sobre o matiz escolhido; raio concêntrico ao dropdown (16 − 12 de respiro ≈ 9) */
.cp-sv {
  position: relative; height: 140px; border-radius: var(--r-sm); cursor: crosshair; touch-action: none;
  background-image: linear-gradient(to top, #000, rgba(0, 0, 0, 0)), linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
  box-shadow: inset 0 0 0 var(--hair) var(--line2);
}
.cp-sv:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.cp-sv-thumb { position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .3); transform: translate(-50%, -50%); pointer-events: none; }
.cp-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.cp-eye { width: 30px; height: 30px; }
.cp-prev { width: 28px; height: 28px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px var(--line2); }
/* faixa de matiz: o input range sem o visual de campo (anula as regras gerais de input) */
.cp .cp-hue {
  flex: 1; min-width: 0; height: 12px; min-height: 0; padding: 0; border: 0; border-radius: var(--r-pill); cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background: linear-gradient(to right, #f00, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00);
  box-shadow: inset 0 0 0 var(--hair) var(--line2);
}
.cp .cp-hue:hover, .cp .cp-hue:focus { background: linear-gradient(to right, #f00, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00); border: 0; }
.cp .cp-hue:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.cp .cp-hue::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 1px 4px rgba(0, 0, 0, .35); cursor: pointer; }
.cp .cp-hue::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 1px 4px rgba(0, 0, 0, .35); cursor: pointer; }
/* HEX + R G B: campos pequenos com o nome embaixo */
.cp-fields { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 6px; margin-top: 12px; }
.cp-fields label { display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-width: 0; }
.cp-fields label span { font-size: 0.6875rem; font-weight: 650; letter-spacing: .06em; color: var(--text-3); text-align: center; }
.cp .cp-fields input { height: 32px; min-height: 0; padding: 0 4px; border-radius: var(--r-sm); font-size: 0.8125rem; text-align: center; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.cp .cp-fields input::-webkit-outer-spin-button, .cp .cp-fields input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cp .cp-hex { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; }
.cp .cp-hex.is-bad { border-color: var(--red); color: var(--red-i); }
.tk-opt { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; padding: 5px 0; cursor: pointer; }
.tk-opt input { width: auto; margin: 0; }
.tk-picklist { max-height: 200px; overflow: auto; margin: 4px 0 0 22px; }
.tk-trow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--sep); }
.tk-invite-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.tk-invite-act { margin-top: 10px; }
/* aviso: pílula de vidro na base, junto do que ela descreve; nunca alert() */
.tk-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--glass); color: var(--text); border: var(--hair) solid var(--line2); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); padding: 10px 18px; border-radius: var(--r-pill); font-size: 0.875rem; font-weight: 550; box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge); z-index: 100; max-width: min(560px, calc(100vw - 32px)); animation: toastIn var(--dur-2) var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px) scale(.97); } to { opacity: 1; transform: translate(-50%, 0); } }
.tk-toast { display: flex; align-items: center; gap: 12px; }
.tk-toast:has(.tk-toast-action) { padding: 6px 6px 6px 18px; }
.tk-toast-msg { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Desfazer: a ação do aviso, na cor da marca */
.tk-toast-action { flex: none; min-height: 32px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: var(--lemon); color: var(--on-lemon); font: inherit; font-size: 0.8125rem; font-weight: 650; cursor: pointer; box-shadow: var(--glow-acc); }
.tk-toast-action:hover { filter: brightness(1.05); }
/* janela de confirmação de exclusão */
.tk-confirm { margin: -6px 0 0; color: var(--text-2); font-size: 0.9375rem; line-height: 1.5; }
.tk-confirm b { color: var(--text); font-weight: 650; }

@media (max-width: 900px) {
  .tk-side { width: 100%; position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--sep); flex-direction: row; flex-wrap: wrap; padding: 8px; }
  .tk-me, .tk-side-h, .tk-demo { width: 100%; }
}

/* ===== v3: tags com cor, templates ===== */
.tk-chip { background: var(--chip, var(--fill-hover)); color: var(--chip-ink, var(--text)); }
.tk-tagfield { position: relative; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--fill); border-radius: 8px; padding: 5px 8px; min-height: 36px; grid-column: 2; }
.tk-taginput { flex: 1; min-width: 110px; border: 0 !important; background: none !important; padding: 3px 2px !important; font-size: 0.875rem; color: var(--text); outline: none; }
.tk-tagchip { display: inline-flex; align-items: center; gap: 2px; background: var(--c); color: var(--ink); border-radius: 6px; font-size: 0.75rem; font-weight: 600; padding: 2px 4px 2px 8px; border: 0; }
.tk-tagchip.static { padding: 2px 8px; }
.tk-tagchip.toggle { padding: 3px 9px; cursor: pointer; opacity: 0.45; }
.tk-tagchip.toggle.on { opacity: 1; box-shadow: 0 0 0 2px var(--text); }
.tk-tagname { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; padding: 0; }
.tk-tagname:hover { text-decoration: underline; }
.tk-tagx { border: 0; background: none; color: inherit; cursor: pointer; font-size: 0.95rem; line-height: 1; padding: 0 4px; opacity: 0.7; }
.tk-tagx:hover { opacity: 1; }
.tk-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); border-radius: var(--r-md); padding: 4px; z-index: 40; max-height: 220px; overflow: auto; }
.tk-sug { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; font: inherit; font-size: 0.875rem; color: var(--text); padding: 7px 9px; border-radius: 7px; cursor: pointer; text-align: left; }
.tk-sug:hover { background: var(--fill); }
.tk-sug.new { color: var(--text-2); }
.tk-tagmenu { position: fixed; z-index: 120; width: 236px; border-radius: var(--r-md); padding: 12px; }
.tk-tagmenu-t { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.tk-tagact { display: block; width: 100%; border: 0; background: none; font: inherit; font-size: 0.875rem; color: var(--text); text-align: left; padding: 7px 6px; border-radius: 7px; cursor: pointer; margin-top: 2px; }
.tk-tagact:hover { background: var(--fill); }
.tk-tagact.danger { color: var(--bad); }
.tk-tpl-wrap { position: relative; }
.tk-tplpop { left: 0; right: auto; width: 280px; top: calc(100% + 6px); }
.tk-swap p { margin: 0 0 8px; }
.tk-swaplist { margin: 0 0 12px; padding-left: 20px; max-height: 260px; overflow: auto; font-size: 0.875rem; }
.tk-swaplist li { margin: 2px 0; overflow-wrap: anywhere; }
.tk-swapdone { display: flex; gap: 8px; align-items: flex-start; font-size: 0.8125rem; margin-bottom: 10px; }
.tk-tplhead { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.tk-tplhead p { margin: 0; max-width: 640px; }
.tk-tplgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.tk-tplcard { background: var(--glass-card); border: var(--hair) solid var(--line2); -webkit-backdrop-filter: var(--glass-blur-deep); backdrop-filter: var(--glass-blur-deep); box-shadow: inset 0 1px 0 var(--glass-edge); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.tk-tpl-n { font-weight: 700; font-size: 1rem; }
.tk-tpl-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
/* avatar | título (usa toda a largura e quebra entre palavras) | prazo; o gatilho do Lima vai numa linha própria embaixo do título */
.tk-tpl-items li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: start; column-gap: 8px; row-gap: 2px; font-size: 0.875rem; }
.tk-tpl-items li > :first-child { grid-column: 1; margin-top: 1px; }
.tk-tpl-items .t { grid-column: 2; min-width: 0; overflow-wrap: break-word; }
.tk-tpl-items .meta { grid-column: 3; font-size: 0.75rem; color: var(--text-3); white-space: nowrap; padding-top: 2px; }
.tk-tpl-items .meta.lima { grid-column: 2 / -1; white-space: normal; padding-top: 0; }
.tk-tpl-act { display: flex; gap: 8px; margin-top: 4px; }
.tk-modal.wide { width: min(760px, calc(100vw - 32px)); }
.tk-tplform { display: grid; grid-template-columns: 90px 1fr; gap: 12px 10px; align-items: start; }
.tk-tplform label.k { font-size: 0.8125rem; color: var(--text-2); padding-top: 9px; }
.tk-tplform .tk-hint { grid-column: 2; margin: -4px 0 0; font-size: 0.75rem; }
.tk-tplform .err { grid-column: 2; margin: 0; }
.tk-titems { display: flex; flex-direction: column; gap: 6px; }
.tk-titem { display: grid; grid-template-columns: 30px 1fr 150px 64px 130px 30px; gap: 6px; align-items: center; }
.tk-titem.head { font-size: 0.6875rem; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.tk-titem input, .tk-titem select { width: 100%; padding: 7px 9px; font-size: 0.8125rem; border-radius: 8px; }
.tk-ord { display: flex; flex-direction: column; }
.tk-ord button { border: 0; background: none; color: var(--text-3); font-size: 0.6875rem; line-height: 1; cursor: pointer; padding: 0 6px; }
.tk-ord button:hover { color: var(--text); }
.tk-x.show { opacity: 1; }

/* ===== comentários ===== */
.tk-comment, .tk-composer { display: flex; gap: 10px; padding: 10px 0; }
.tk-comment { border-bottom: 1px solid var(--sep); }
.tk-comment .grow, .tk-composer .grow { flex: 1; min-width: 0; }
.tk-chead { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; }
.tk-chead .meta { font-size: 0.75rem; color: var(--text-3); }
.tk-chead .tk-x { margin-left: auto; opacity: 0; }
.tk-comment:hover .tk-x { opacity: 1; }
.tk-cbody { font-size: 0.875rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.tk-mention { color: var(--tk-blue); font-weight: 600; background: var(--acc-t); border-radius: 4px; padding: 0 3px; }
.tk-cwrap { position: relative; }
.tk-ctext { width: 100%; resize: none; border: 1px solid var(--sep); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 0.875rem; background: var(--card); color: var(--text); line-height: 1.5; min-height: 56px; }
.tk-ctext:focus { outline: none; border-color: var(--tk-blue); }
.tk-cact { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; font-size: 0.75rem; }
.tk-mpop { top: auto; bottom: calc(100% - 38px); }
.tk-sug.on { background: var(--fill); }

.tk-atts { display: flex; flex-direction: column; gap: 4px; }
.tk-att { font-size: 0.8125rem; color: var(--tk-blue); text-decoration: none; padding: 5px 8px; border-radius: 8px; background: var(--fill); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-att:hover { text-decoration: underline; }

.tk-tplrow { margin-top: 18px; }
.tk-tplpick { position: relative; display: inline-block; }
.tk-tpl-who { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; font-size: 0.8125rem; font-weight: 500; color: var(--text-2); vertical-align: middle; }

/* ===== aba Usuários (admin) ===== */
.u-table th.u-c, .u-table td.u-c { text-align: center; }
.u-table td { vertical-align: middle; }
.u-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: var(--fill); color: var(--text-2); }
.u-badge.master { background: var(--lemon); color: var(--on-lemon); }
/* ações do usuário numa linha só (antes o "Excluir" caía sozinho para a linha de baixo); em tela estreita pode quebrar */
.u-act { white-space: nowrap; }
.u-act .btn + .btn { margin-left: 6px; }
@media (max-width: 1100px) { .u-act { white-space: normal; } .u-act .btn { margin: 2px 6px 2px 0; } .u-act .btn + .btn { margin-left: 0; } }
.u-msg { min-height: 1.4em; margin: 8px 0; }
.u-checklist { max-height: 230px; overflow: auto; }
.u-areas { display: flex; gap: 16px; flex-wrap: wrap; }
.u-form { grid-template-columns: 80px 1fr; }
.u-form .tk-h { margin: 12px 0 4px; }
.u-table input[type="checkbox"] { width: auto; }

/* ===== meu perfil / foto ===== */
.tk-av.img { background: none; overflow: hidden; }
.tk-av img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.tk-me { cursor: pointer; border-radius: 10px; }
.tk-me:hover { background: var(--fill); }
.pf-photo { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.pf-prev { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; display: inline-grid; place-items: center; flex: none; background: var(--fill); }
.pf-prev img { width: 100%; height: 100%; object-fit: cover; }
.pf-ini { width: 100%; height: 100%; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 700; font-size: 1.6rem; }
.pf-photo-act { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-form { grid-template-columns: 70px 1fr; }
.pf-pw { display: flex; flex-direction: column; gap: 8px; }
.pf-hint { margin: 10px 0 0; font-size: 0.8125rem; }
.pf .err { margin: 8px 0 0; }

/* ===== menu de cima do calendário (abas do admin) ===== */
/* mesmo controle segmentado das abas do admin (.tabs em style.css) */
.tk-topnav { display: flex; gap: 2px; margin-right: 6px; padding: 3px; background: var(--fill); border: var(--hair) solid var(--line); border-radius: var(--r-pill); min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tk-topnav::-webkit-scrollbar { display: none; }
.tk-toplink { flex: none; white-space: nowrap; padding: 5px 13px; border-radius: var(--r-pill); font-size: 0.875rem; font-weight: 600; color: var(--text-2); text-decoration: none; transition: color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease); }
a.tk-toplink:hover { color: var(--text); }
.tk-toplink.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .14), 0 0 0 var(--hair) var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tk-toplink.on { background: var(--surf3); } }
:root[data-theme="dark"] .tk-toplink.on { background: var(--surf3); }

/* ===== subtarefa no estilo Asana: bolinha com o rosto à direita ===== */
.tk-whowrap { position: relative; width: 26px; height: 26px; flex: none; display: inline-block; cursor: pointer; }
.tk-whowrap select.who-ov { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; padding: 0; border: 0; }
.tk-whowrap:hover .tk-av { box-shadow: 0 0 0 2px var(--tk-blue); }
.tk-addatt { width: 24px; height: 24px; font-size: 1.1rem; }
.tk-attrow { display: flex; align-items: center; gap: 6px; }
.tk-attrow .tk-att { flex: 1; min-width: 0; }
.tk-attrow .tk-x { opacity: 0; }
.tk-attrow:hover .tk-x { opacity: 1; }
.tk-sub input.d { width: 112px; }
.tk-chip .tk-av { margin-left: auto; width: 18px !important; height: 18px !important; }

/* ===== projeto em formato de lista (planilha) ===== */
.tk-sq.tbl { background: repeating-linear-gradient(to bottom, var(--c) 0 3px, transparent 3px 5px); border-radius: 2px; }
.tb-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tb-bar .grow { flex: 1; }
.tb-search { width: 220px; padding: 7px 12px; font-size: 0.8125rem; border-radius: 10px; }
.tb-wrap { overflow: auto; border: var(--hair) solid var(--line2); border-radius: var(--r-lg); background: var(--card); max-height: calc(100vh - 230px); }
.tb { border-collapse: separate; border-spacing: 0; width: 100%; min-width: max-content; font-size: 0.8125rem; }
.tb th { position: sticky; top: 0; z-index: 3; background: var(--card); text-align: left; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); padding: 9px 10px; border-bottom: 1px solid var(--sep); border-right: 1px solid var(--sep); white-space: nowrap; }
.tb td { padding: 0; border-bottom: 1px solid var(--sep); border-right: 1px solid var(--sep); height: 36px; vertical-align: middle; }
.tb .tb-name { position: sticky; left: 0; z-index: 2; background: var(--card); min-width: 280px; width: 280px; }
.tb th.tb-name { z-index: 4; }
.tb .tb-act { width: 34px; min-width: 34px; text-align: center; border-right: 0; }
.tb-colbtn { border: 0; background: none; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; padding: 0; }
.tb-colbtn:hover { color: var(--text); text-decoration: underline; }
.tb-addcol { border: 0; background: none; color: var(--text-3); font-size: 1.1rem; cursor: pointer; border-radius: 6px; width: 24px; height: 24px; }
.tb-addcol:hover { background: var(--fill); color: var(--text); }
.tb-in { width: 100%; border: 1px solid transparent; background: none; font: inherit; font-size: 0.8125rem; padding: 8px 10px; color: var(--text); border-radius: 0; height: 35px; }
.tb-in:hover { background: var(--fill); }
.tb-in:focus { outline: none; border-color: var(--tk-blue); background: var(--card); }
.tb-title { font-weight: 500; }
.tb-num { text-align: right; }
.tb-date { color: var(--text-2); }
.tb-c { min-width: 140px; }
.tb-t-number, .tb-t-money { min-width: 120px; }
.tb-t-select, .tb-t-user { min-width: 130px; }
/* caixa de seleção: a coluna só precisa caber o título e a caixinha (o mínimo geral de 140px empurrava as
   últimas colunas para fora da tela) */
.tb .tb-t-checkbox { min-width: 64px; width: 64px; text-align: center; }
.tb td.tb-t-checkbox .tb-check { margin: 0 auto; }
.tb-cellwrap { display: flex; align-items: center; }
.tb-cellwrap .tb-in { flex: 1; min-width: 0; }
.tb-copy, .tb-clip { opacity: 0; border: 0; background: none; color: var(--text-3); cursor: pointer; font-size: 0.8125rem; padding: 4px 6px; border-radius: 6px; flex: none; }
.tb-row:hover .tb-copy, .tb-row:hover .tb-clip, .tb-copy:focus-visible { opacity: 1; }
.tb-clip { opacity: 1; font-size: 0.75rem; }
.tb-copy:hover, .tb-clip:hover { background: var(--fill-hover); color: var(--text); }
.tb-sel { width: 100%; height: 35px; border: 0; background: none; text-align: left; padding: 0 10px; cursor: pointer; display: flex; align-items: center; gap: 8px; font: inherit; color: var(--text); }
.tb-sel:hover { background: var(--fill); }
.tb-badge { display: inline-block; background: var(--c); color: var(--ink); border-radius: 6px; padding: 2px 9px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.tb-check { width: auto; margin: 0 12px; }
.tb-sec td { background: var(--fill); padding: 8px 10px; border-right: 0; font-size: 0.875rem; position: sticky; left: 0; }
.tb-caret { border: 0; background: none; cursor: pointer; color: var(--text-2); font-size: 0.8rem; padding: 0 6px 0 0; transition: transform 0.15s; }
.tb-caret.closed { transform: rotate(-90deg); }
.tb-secmenu { border: 0; background: none; color: var(--text-3); cursor: pointer; margin-left: 8px; border-radius: 6px; padding: 0 6px; font-weight: 700; }
.tb-secmenu:hover { background: var(--fill-hover); color: var(--text); }
.tb-add td { border-right: 0; }
.tb-addbtn { border: 0; background: none; color: var(--text-3); font: inherit; font-size: 0.8125rem; padding: 9px 12px; cursor: pointer; text-align: left; }
.tb-addbtn:hover { color: var(--text); }
.tb-sumrow td { border-bottom: 0; }
.tb-sum { text-align: right; padding: 4px 10px !important; font-weight: 700; color: var(--text-2); font-size: 0.8125rem; white-space: nowrap; }
.tb-row .tk-x { opacity: 0; }
.tb-row:hover .tk-x { opacity: 1; }
.tb-menu .tk-sug { text-decoration: none; }
.tb-opts { display: flex; flex-direction: column; gap: 6px; }
.tb-opt { display: flex; align-items: center; gap: 8px; }
.tb-opt input { flex: 1; padding: 6px 9px; font-size: 0.8125rem; border-radius: 8px; }
.tb-empty { display: inline-block; min-width: 14px; }

/* ===== tela de Tags (master) ===== */
.tg-help { max-width: 760px; margin: 0 0 12px; }
.tg-table .tg-ck { width: 40px; text-align: center; }
.tg-table .tg-ck input { width: auto; }
.tg-table .tg-n { width: 130px; white-space: nowrap; color: var(--text-2); padding: 0 10px; }
.tg-color { width: 24px; height: 24px; border-radius: 6px; border: 0; background: var(--c); cursor: pointer; margin: 0 10px; vertical-align: middle; }
.tg-color:hover { box-shadow: 0 0 0 2px var(--tk-blue); }
.tg-merge { width: 190px; padding: 6px 8px; margin: 0 10px; font-size: 0.8125rem; border-radius: 8px; }
.tg-empty { padding: 20px !important; text-align: center; }
.tg-table .tb-row .tk-x { opacity: 1; }

/* ===== Menções ===== */
.tk-mention-row { align-items: flex-start; padding: 12px 14px; cursor: pointer; }
.tk-mention-row.new { background: var(--acc-t); box-shadow: inset 3px 0 0 var(--tk-blue); }
.tk-mention-main { min-width: 0; }
.tk-mention-head { font-size: 0.875rem; margin-bottom: 4px; display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; }
.tk-mention-head .tk-badge { margin-left: 6px; }
.tk-mention-main .tk-cbody { color: var(--text-2); }

/* ===== subtarefas compactas, como no Asana (~36px por linha) ===== */
.tk-subs .tk-sub { padding: 2px 4px; gap: 8px; min-height: 36px; }
.tk-subs .tk-sub input.t { height: 28px; min-height: 0; padding: 2px 6px; line-height: 1.3; }
.tk-subs .tk-sub input.d { height: 26px; min-height: 0; padding: 0 6px; line-height: 1.2; font-size: 0.75rem; width: 112px; border-radius: 6px; box-sizing: border-box; }
.tk-subs .tk-sub .tk-circ { width: 18px; height: 18px; }
.tk-subs .tk-sub .tk-whowrap { width: 24px; height: 24px; }
.tk-subs .tk-sub .tk-x { padding: 2px 6px; }
.tk-subadd { padding: 6px 6px; }

.tk-notes-view { white-space: pre-wrap; word-break: break-word; border: 1px solid transparent; border-radius: 10px; padding: 10px 12px; font-size: 0.875rem; line-height: 1.5; cursor: text; }

.tk-notes-view a { color: var(--tk-blue); text-decoration: none; word-break: break-all; }
.tk-notes-view a:hover { text-decoration: underline; }
.tk-rel { font-size: 0.8125rem; color: var(--text-2); white-space: nowrap; }

/* ===== balão de comentário fixo na base do painel (fica por cima) ===== */
.tk-panel { padding-bottom: 0; }
.tk-pb { padding-bottom: 0; }
.tk-composer { position: sticky; bottom: 0; z-index: 5; background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); margin: 0 -18px; padding: 10px 18px 14px; border-top: var(--hair) solid var(--line2); box-shadow: 0 -8px 18px rgba(0, 0, 0, 0.08); }
/* abre com uma linha, sem barra de rolagem, e cresce com o texto (js: fit() em renderComments) */
.tk-composer .tk-ctext { min-height: 40px; height: 40px; max-height: 220px; padding: 9px 14px; border-radius: 20px; overflow-y: hidden; resize: none; }
.tk-composer:focus-within .tk-ctext { border-radius: 12px; }
/* a dica tem o espaço sempre reservado (só aparece/some): antes ela entrava com display e a caixa pulava 24px para cima no clique */
.tk-composer .tk-cact { visibility: hidden; opacity: 0; transition: opacity 0.12s; }
.tk-composer:focus-within .tk-cact, .tk-composer.has-text .tk-cact { visibility: visible; opacity: 1; }
.tk-comhost-gap { height: 8px; }

.tk-panel > .tk-composer { margin: 0; }

.tk-open { border: 0; background: none; color: var(--text-3); cursor: pointer; font-size: 1.25rem; line-height: 1; padding: 2px 8px; border-radius: 6px; }
.tk-open:hover { background: var(--fill); color: var(--tk-blue); }
.tk-sug.danger { color: var(--bad); }

/* ----- busca ----- */
/* Busca recolhível: fechada é uma lupa redonda (36px, igual ao botão de concluídas ao lado); aberta, a caixa cresce
   para a esquerda (a largura anima; o espaço vem do .grow da barra) e a lupa vira o ícone dentro do campo. */
/* bloco da direita da barra: ocupa o resto da linha e encosta à direita; se nem o mínimo couber, desce inteiro */
.tk-bar-right { flex: 1 1 0; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
/* A largura anima pela flex-basis (36 → 300px). Aberta, pode encolher até 140px para caber na linha. */
.tk-search { position: relative; flex: 0 0 36px; min-width: 36px; height: 36px; transition: flex-basis var(--dur-3) var(--ease); }
.tk-search.open { flex: 0 1 300px; min-width: 140px; }
.tk-search-btn { position: absolute; left: 0; top: 0; z-index: 2; width: 36px; height: 36px; }
.tk-search.open .tk-search-btn { background: transparent; border-color: transparent; color: var(--text-3); pointer-events: none; }
.tk-search.open .tk-search-btn[data-tip]::after { display: none; }
.tk-search input {
  position: absolute; inset: 0; width: 100%; height: 36px; min-height: 0; padding: 0 30px 0 36px;
  font-size: 0.875rem; border-radius: var(--r-pill); opacity: 0; pointer-events: none;
  transition: opacity var(--dur-2) var(--ease), background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.tk-search.open input { opacity: 1; pointer-events: auto; }
.tk-qx { position: absolute; z-index: 2; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--text-3); cursor: pointer; font-size: 0.8125rem; padding: 4px 6px; border-radius: 6px; display: none; }
.tk-search.open input:not(:placeholder-shown) ~ .tk-qx { display: block; }
.tk-search input::-webkit-search-cancel-button { display: none; }
/* resultados: alinhados à direita da busca (ela mora perto da borda direita), mais largos que o campo */
.tk-qres { position: absolute; left: auto; right: 0; top: calc(100% + 6px); width: min(420px, calc(100vw - 32px)); max-height: 420px; overflow: auto; border-radius: var(--r-lg); padding: 6px; z-index: 40; }
.tk-hit { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; border: 0; background: none; font: inherit; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--text); }
.tk-hit .tk-dot { margin-top: 6px; flex: none; }
.tk-hit.on, .tk-hit:hover { background: var(--fill); }
.tk-hit.done .tk-hit-t { color: var(--text-3); }
.tk-hit-b { display: flex; flex-direction: column; min-width: 0; }
.tk-hit-t { font-size: 0.875rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-hit-t mark { background: var(--acc-t); color: inherit; border-radius: 3px; box-shadow: inset 0 -1.5px 0 var(--tk-blue); }
.tk-hit-m { font-size: 0.75rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-hit-none { padding: 14px; color: var(--text-3); font-size: 0.875rem; }
@media (max-width: 640px) { .tk-search.open { flex-basis: 240px; } }

/* ----- preferências do sistema ----- */
/* Transparência reduzida: o vidro do calendário vira sólido, como em style.css. */
@media (prefers-reduced-transparency: reduce) {
  .tk-pop, .tk-suggest, .tk-tagmenu, .tk-qres, .tk-modal, .tk-panel, .tk-tplcard, .tk-toast {
    background: var(--card); backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .tk-ph, .tk-composer { background: var(--card); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .tk-modal::backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
/* No toque não existe hover: o que só aparecia no hover fica visível, com alvo maior. 36px e não 44 porque
   moram dentro de linhas de 36px (subtarefas, planilha); maior que isso empurraria a linha. */
@media (pointer: coarse) {
  .tk-x, .tk-cog, .tb-copy, .tk-open { opacity: 1; min-width: 36px; min-height: 36px; }
  .tk-circ { width: 24px; height: 24px; }
}

.tk-h .tk-copynotes { margin-left: 10px; border: 0; background: none; font: inherit; font-size: 0.75rem; font-weight: 600; color: var(--text-3); cursor: pointer; padding: 2px 8px; border-radius: 6px; text-transform: none; letter-spacing: 0; }
.tk-h .tk-copynotes:hover { background: var(--fill); color: var(--text); }
.tk-notes-view { user-select: text; }

/* ----- comentários: botão ao lado da caixa e links clicáveis ----- */
.tk-crow { display: flex; gap: 8px; align-items: flex-end; }
.tk-crow .tk-ctext { flex: 1; min-width: 0; width: auto; }
.tk-crow > .btn { flex: none; height: 40px; border-radius: 20px; padding: 0 16px; }
.tk-composer .tk-cact { justify-content: flex-start; padding-left: 4px; }
.tk-cbody a { color: var(--tk-blue); text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.tk-cbody a:hover { text-decoration-thickness: 2px; }

/* ----- descrição com formatação (js/tasks-md.js) ----- */
.tk-notes-view { white-space: normal; }
.tk-notes-view .md > * + * { margin-top: 0.6em; }
.tk-notes-view .md p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.tk-notes-view .md-h { margin: 1em 0 0.2em; font-size: 0.95rem; font-weight: 700; letter-spacing: -0.01em; }
.tk-notes-view .md > .md-h:first-child { margin-top: 0; }
.tk-notes-view ul, .tk-notes-view ol { margin: 0; padding-left: 1.3em; }
.tk-notes-view li { margin: 0.15em 0; }
.tk-notes-view .md-l1 { margin-left: 1.2em; } .tk-notes-view .md-l2 { margin-left: 2.4em; } .tk-notes-view .md-l3 { margin-left: 3.6em; }
.tk-notes-view code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85em; background: color-mix(in srgb, #f8df72 35%, transparent); border-radius: 4px; padding: 1px 5px; }
.tk-notes-view .md-pre { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--fill); overflow-x: auto; }
.tk-notes-view .md-pre code { background: none; padding: 0; white-space: pre; }
.tk-notes-view strong { font-weight: 700; }
.md-bar { display: flex; gap: 2px; margin-bottom: 6px; }
.md-b { border: 0; background: none; font: inherit; font-size: 0.8125rem; color: var(--text-2); min-width: 30px; height: 28px; padding: 0 8px; border-radius: 6px; cursor: pointer; }
.md-b:hover { background: var(--fill); color: var(--text); }
.md-b.b { font-weight: 800; } .md-b.i { font-style: italic; }

/* Investimento em ADS (tarefa de lançamento) */
.tk-ads { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.tk-ads input { flex: 1 1 180px; }
.tk-seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; flex: none; }
.tk-seg button { height: 34px; padding: 0 16px; border: 0; background: var(--fill); color: var(--text); font: inherit; font-size: 0.875rem; cursor: pointer; }
.tk-seg button + button { border-left: 1px solid var(--line); }
.tk-seg button.on { background: var(--grn-t); box-shadow: inset 0 0 0 1px var(--grn-i); color: var(--grn-i); font-weight: 650; }
.tk-adsask .tk-seg { justify-self: start; }
.tk-seg.big button { height: 40px; padding: 0 28px; font-size: 0.9375rem; }
.tk-rel.warn { color: #d97706; }
.tk-adsask { display: grid; gap: 12px; min-width: min(420px, 80vw); }
.tk-adsask input { height: 38px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--fill); color: var(--text); }
.tk-ck { display: flex; align-items: center; gap: 8px; padding-top: 8px; font-size: 0.875rem; cursor: pointer; }
/* Arts: pedir arte na tarefa (js/tasks.js artRow) */
.tk-art { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 4px; }
.tk-art .tk-h { margin: 0; }
/* "Pedir arte": uma coluna, rótulo em cima, campos na largura toda */
.tk-artform { display: flex; flex-direction: column; gap: 14px; }
.tk-art-fields { display: flex; flex-direction: column; gap: 14px; }
.tk-art-fields:empty { display: none; }
.tk-af { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tk-af-k { font-size: 0.8125rem; font-weight: 600; color: var(--text-2); }
.tk-af input, .tk-af select, .tk-af textarea { width: 100%; box-sizing: border-box; }
.tk-af textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.tk-artform .tk-hint { margin: 0; font-size: 0.8125rem; line-height: 1.45; }
.tk-artform .err { margin: 0; }
.tk-artform .err:empty { display: none; }
/* Arte do lançamento (selo, nível, cor do fundo, textura, ideia) */
.tk-relart { margin: 10px 0 4px; }
.tk-relart > .tk-h { display: flex; align-items: center; gap: 8px; }
.tk-relart-grid { display: grid; grid-template-columns: 110px 1fr; gap: 10px 12px; align-items: start; margin-top: 8px; }
.tk-relart-grid > .k { padding-top: 6px; }
.tk-relart-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tk-style { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tk-stylebtn { --sc: #95ff92; position: relative; font: inherit; text-align: left; cursor: pointer; padding: 14px 14px 12px; border-radius: 16px; border: 1px solid var(--line2, #ccc); color: inherit; display: flex; flex-direction: column; gap: 4px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--sc) 16%, transparent), transparent 70%); transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.tk-stylebtn:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--sc) 60%, transparent); }
.tk-stylebtn.st-luna_techno { --sc: #ff5a5a; }
.tk-stylebtn.st-luna_bass_house { --sc: #b07cff; }
.tk-stylebtn.st-luna_deep_house { --sc: #4fc3ff; }
.tk-styleic { font-size: 1.625rem; line-height: 1; margin-bottom: 4px; }
.tk-stylebtn b { font-size: 1rem; }
.tk-styleab { font-size: .75rem; opacity: .7; line-height: 1.35; }
.tk-stylebtn.on { border-color: var(--sc); box-shadow: 0 0 0 2px var(--sc), 0 10px 28px color-mix(in srgb, var(--sc) 30%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--sc) 34%, transparent), transparent 80%); }
.tk-styleok { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 800; color: #0a0a0a; background: var(--sc); }
@media (max-width: 640px) { .tk-style { grid-template-columns: 1fr; } }
.tk-relart .tk-pill { font: inherit; font-size: .8125rem; cursor: pointer; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line2, #ccc); background: none; color: inherit; }
.tk-relart .tk-pill.on { background: var(--tx, #0a0a0a); color: var(--surf, #fff); border-color: transparent; }
.tk-relart .tk-pill:disabled { opacity: .45; cursor: not-allowed; border-style: dashed; }
.tk-relart textarea { width: 100%; margin-top: 8px; }
.tk-relart-bg { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.tk-prev-wrap { display: grid; gap: 4px; justify-items: center; }
.tk-prev { position: relative; width: 132px; height: 132px; border-radius: 10px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .3); transition: background .15s; }
.tk-prev-grain { position: absolute; inset: 0; background-size: 160px; mix-blend-mode: overlay; pointer-events: none; }
.tk-prev-fig { position: absolute; inset: 16%; -webkit-mask: url(../assets/logo-luna-mark.svg) center / contain no-repeat; mask: url(../assets/logo-luna-mark.svg) center / contain no-repeat; }
.tk-prev.lemon .tk-prev-fig { -webkit-mask-image: url(../assets/logo-lemon-mark.svg); mask-image: url(../assets/logo-lemon-mark.svg); }
.tk-relart-hex, .tk-relart-note { font-size: .78rem; margin: 6px 0 0; display: block; }
/* Arte do lançamento: galeria (capas prontas do selo) */
.tk-gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.tk-galit { position: relative; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--surface-2, rgba(127,127,127,.12)); cursor: pointer; aspect-ratio: 1; }
.tk-galit img, .tk-galph { display: block; width: 100%; height: 100%; object-fit: cover; }
.tk-galit.on { border-color: var(--accent, #95ff92); box-shadow: 0 0 0 2px var(--accent, #95ff92); }
.tk-galit:disabled { opacity: .4; cursor: not-allowed; }
.tk-galcap { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 6px; font-size: .6875rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.7)); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-relart .tk-relart-note { margin-top: 6px; }
@media (max-width: 560px) {
  .tk-relart-grid { grid-template-columns: 1fr; gap: 4px; }
  .tk-relart-grid > .k { padding-top: 10px; font-weight: 600; }
}
.tk-galn { margin: 0 0 6px !important; }
.tk-galn:empty { display: none; }

/* Seção Arte da tarefa (2026-11-20, "mais organizado"): um cartão com uma linha por arte, botões à direita */
.tk-artsec { margin-top: 4px; }
.tk-artcard { border: 1px solid var(--line, rgba(127,127,127,.25)); border-radius: 12px; overflow: hidden; }
.tk-artcard > .tk-relart, .tk-artcard > .tk-art { display: block; margin: 0; padding: 12px 14px; }
.tk-artcard > * + * { border-top: 1px solid var(--line, rgba(127,127,127,.25)); }
.tk-arthead { display: flex; align-items: center; gap: 12px; min-height: 32px; }
.tk-arthead-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tk-arthead-t .n { font-size: .875rem; font-weight: 600; }
.tk-arthead-t .muted { font-size: .8125rem; line-height: 1.35; }
.tk-arthead-b { display: flex; gap: 6px; flex-shrink: 0; }
.tk-arthead-b .btn { min-width: 92px; justify-content: center; text-align: center; }
.tk-arthead-b .btn.ghost { background: none; border-color: transparent; color: var(--text-3); min-width: 0; }
.tk-arthead-b .btn.ghost:hover { background: var(--fill); color: var(--text); }
.tk-artcard .tk-relart-grid { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line, rgba(127,127,127,.25)); }
/* Usar template mora no título das Subtarefas, à direita */
.tk-subh .tk-tplpick { margin-left: auto; }
.tk-subh .tk-tplpick > .btn { font-size: .75rem; font-weight: 600; }
.tk-subh .tk-tplpop { left: auto; right: 0; font-weight: 400; }
@media (max-width: 560px) {
  .tk-arthead { flex-wrap: wrap; }
  .tk-arthead-b { width: 100%; }
  .tk-arthead-b .btn:not(.ghost) { flex: 1; }
}

/* Pop-up da arte do template (2026-11-20): cada tipo com o tamanho dele. Capa: formulário largo com a prévia; post: campos + prévia ao lado */
.tk-modal.tk-artpop { max-height: calc(100vh - 40px); overflow: auto; }
.tk-modal.tk-artpop.capa { width: min(680px, calc(100vw - 32px)); }
.tk-modal.tk-artpop.post { width: min(620px, calc(100vw - 32px)); }
.tk-modal.tk-artpop.post.wide { width: min(780px, calc(100vw - 32px)); }
.tk-artpop-body > .tk-hint { margin: -6px 0 14px; font-size: .8125rem; line-height: 1.45; }
.tk-artpop-body .tk-relart { margin: 0; }
.tk-artpop-body .tk-relart-grid { margin-top: 0; }
.tk-artpop-body .err { margin: 10px 0 0; }
.tk-artpop-body .err:empty { display: none; }
.tk-artpop-grid { display: grid; grid-template-columns: 1fr 180px; gap: 20px; align-items: start; }
.tk-pp { position: relative; width: 180px; border-radius: 10px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(127,127,127,.3); display: flex; flex-direction: column; justify-content: flex-end; padding: 14px; box-sizing: border-box; }
.tk-pp-logo { position: absolute; inset: auto; top: 12px; left: 12px; width: 26px; height: 26px; }
.tk-pp-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tk-pp-t1 { font-size: .9375rem; line-height: 1.15; text-transform: uppercase; letter-spacing: .02em; overflow-wrap: anywhere; }
.tk-pp-t2 { font-size: .6875rem; opacity: .8; overflow-wrap: anywhere; }
.tk-pp-dots { position: absolute; bottom: 6px; left: 0; right: 0; display: flex; justify-content: center; gap: 4px; }
.tk-pp-dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .5; }
.tk-pp-dots i:first-child { opacity: 1; }
/* resumo na tarefa */
.tk-artsw { width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(127,127,127,.35); }
.tk-arthead-t:has(> .tk-artsw) { display: grid; grid-template-columns: 22px 1fr; column-gap: 10px; }
.tk-arthead-t:has(> .tk-artsw) > .tk-artsw { grid-row: 1 / span 2; align-self: center; }
.tk-artst { display: block; font-size: .8125rem; margin-top: 6px; }
.tk-artst:empty { display: none; }
@media (max-width: 560px) {
  .tk-artpop-grid { grid-template-columns: 1fr; }
  .tk-artpop-grid > .tk-prev-wrap { order: -1; }
  .tk-modal.tk-artpop .tk-relart-grid { grid-template-columns: 1fr; gap: 6px; }
  .tk-modal.tk-artpop .tk-relart-grid > .k { padding-top: 6px; font-weight: 600; }
}
/* Reserva da tarefa: seções por nível (Luna) e a arte por dentro (Saulo, 2026-11-24) */
.tk-galwrap { display: flex; flex-direction: column; gap: 12px; }
.tk-galsec h4 { margin: 0 0 6px; font-size: .8125rem; font-weight: 650; }
.tk-galsec h4 .muted { font-weight: 500; }
.tk-resdlg { border: 0; padding: 0; border-radius: 18px; max-width: min(1100px, 94vw); width: 100%; background: var(--card, #fff); color: var(--text, inherit); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.tk-resdlg::backdrop { background: rgba(0, 0, 0, .6); }
.tk-res { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; padding: 18px; }
.tk-res-cover img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 12px; background: #000; }
.tk-res-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tk-res-side h3 { margin: 0; font-size: 1.0625rem; }
.tk-res-side p { margin: 0; font-size: .8125rem; }
.tk-res-vids { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tk-res-vids figure { margin: 0; }
.tk-res-vids video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: #000; }
.tk-res-vids figcaption { font-size: .75rem; font-weight: 600; margin-top: 3px; }
.tk-res-btns { margin-top: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@media (max-width: 760px) { .tk-res { grid-template-columns: 1fr; } .tk-res-vids { grid-template-columns: 1fr 1fr; } }
.tk-galit.taken { opacity: .45; }

/* ---------- Tipo da tarefa (cartões; antes era o menu "Usar template") ---------- */
.tk-typebtn { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 12px 0 8px; border-radius: var(--r-sm); background: var(--fill); border: 1px solid var(--line); color: var(--text-3); font: inherit; font-size: 0.875rem; cursor: pointer; text-align: left; transition: border-color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease); }
.tk-typebtn:hover { border-color: var(--line2); background: var(--card); }
.tk-typebtn .ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--card); color: var(--text-3); flex: none; }
.tk-typebtn.on { color: var(--text); font-weight: 600; }
.tk-typebtn.on .ic { background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--c); }
.tk-typebtn .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-typebtn .chev { color: var(--text-3); font-size: 0.75rem; }
.tk-modal.tk-typemodal { width: min(1040px, calc(100vw - 32px)); }
.tk-typepick { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; height: min(560px, calc(100vh - 200px)); }
.tk-typegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; align-content: start; overflow-y: auto; padding: 2px; }
.tk-typecard { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; min-height: 150px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease); }
.tk-typecard:hover { border-color: var(--line2); transform: translateY(-1px); }
.tk-typecard.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 9%, var(--card)); box-shadow: 0 0 0 1px var(--c); }
.tk-typecard .ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; background: color-mix(in srgb, var(--c) 20%, transparent); color: var(--c); margin-bottom: 4px; }
.tk-typecard .nm { font-weight: 700; font-size: 0.9375rem; }
.tk-typecard .ab { color: var(--text-3); font-size: 0.78rem; line-height: 1.35; flex: 1; }
.tk-typecard .mt { color: var(--text-3); font-size: 0.72rem; font-weight: 600; }
.tk-typeprev { display: flex; flex-direction: column; gap: 10px; min-height: 0; padding: 16px; border-radius: var(--r-lg); background: var(--fill); border: 1px solid var(--line); overflow: hidden; }
.tk-typehead { display: flex; gap: 12px; align-items: flex-start; }
.tk-typehead .ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; flex: none; background: color-mix(in srgb, var(--c) 20%, transparent); color: var(--c); }
.tk-typehead b { font-size: 1rem; }
.tk-typehead p { margin: 2px 0 0; font-size: 0.8125rem; }
.tk-typetags { display: flex; flex-wrap: wrap; gap: 6px; }
.tk-typeart { margin: 0; font-size: 0.8rem; color: var(--text); background: var(--card); border-radius: var(--r-sm); padding: 8px 10px; }
.tk-typeprev .tk-h { margin: 4px 0 0; }
.tk-typesubs { list-style: none; margin: 0; padding: 0; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 2px; }
.tk-typesubs li { display: flex; align-items: center; gap: 8px; padding: 6px 4px; font-size: 0.8125rem; border-bottom: 1px solid var(--line); }
.tk-typesubs li:last-child { border-bottom: 0; }
.tk-typesubs .t { flex: 1; min-width: 0; }
.tk-typesubs .d { color: var(--text-3); font-size: 0.75rem; white-space: nowrap; }
@media (max-width: 760px) {
  .tk-typepick { grid-template-columns: 1fr; height: auto; max-height: calc(100vh - 290px); overflow-y: auto; }
  .tk-typegrid { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .tk-typecard { min-height: 0; }
  .tk-typecard .ab { display: none; }
  .tk-typemodal .tk-modal-act { flex-wrap: wrap; }
  .tk-typemodal .tk-modal-act .grow { display: none; }
  .tk-typemodal .tk-modal-act .btn { flex: 1; }
  .tk-typemodal .tk-modal-act .btn.primary { flex-basis: 100%; order: -1; }
}
.tk-typeab { color: var(--text-3); }

/* ---------- Reserva no pop-up da capa (Saulo, 2026-11-26: horizontal no PC, bonita) ---------- */
.tk-galchosen-in { display: grid; grid-template-columns: 88px 1fr; gap: 12px; align-items: center; }
.tk-galchosen-in img, .tk-galchosen-in .tk-galph { width: 88px; height: 88px; border-radius: 12px; object-fit: cover; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.tk-galchosen-in > div { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; }
.tk-galchosen-in b { font-size: .875rem; line-height: 1.3; overflow-wrap: anywhere; }
.tk-galchosen-in .muted { font-size: .75rem; }
.tk-galchosen-in .tk-galready { position: static; }
.tk-galpanel { display: flex; flex-direction: column; min-height: 0; gap: 12px; }
.tk-galtop { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tk-galtop b { font-size: .9375rem; }
.tk-galtop .tk-galn { font-size: .8125rem; margin: 0 !important; }
.tk-galtabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface-2, rgba(127,127,127,.14)); }
.tk-galtabs:empty { display: none; }
.tk-galtab { font: inherit; font-size: .8125rem; border: 0; background: none; color: inherit; cursor: pointer; padding: 6px 14px; border-radius: 999px; display: inline-flex; gap: 7px; align-items: center; opacity: .75; transition: background var(--dur-1, .15s), opacity var(--dur-1, .15s); }
.tk-galtab span { font-size: .6875rem; opacity: .7; font-variant-numeric: tabular-nums; }
.tk-galtab:hover { opacity: 1; }
.tk-galtab.on { background: var(--tx, #0a0a0a); color: var(--surf, #fff); opacity: 1; font-weight: 600; }
.tk-galgrid { min-height: 0; overflow: auto; padding: 2px; margin: -2px; }
.tk-galgrid .tk-gal { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.tk-galgrid .tk-galit { border-radius: 12px; border-width: 2px; transition: transform var(--dur-1, .15s) var(--ease, ease), box-shadow var(--dur-1, .15s); }
.tk-galgrid .tk-galit:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.4); }
.tk-galgrid .tk-galit img { transition: transform .3s var(--ease, ease); }
.tk-galgrid .tk-galit:hover img { transform: scale(1.04); }
.tk-galready { position: absolute; left: 6px; bottom: 6px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 999px; font-size: .6875rem; font-weight: 650; color: #0a0a0a; background: var(--accent, #95ff92); box-shadow: 0 2px 8px rgba(0,0,0,.35); pointer-events: none; }
.tk-galready i { font-style: normal; font-size: .5625rem; }
.tk-galok { position: absolute; top: 6px; right: 6px; z-index: 2; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 800; color: #0a0a0a; background: var(--accent, #95ff92); }
.tk-galgrid .tk-galcap { text-align: center; font-weight: 600; }
@media (min-width: 900px) {
  .tk-modal.tk-artpop.capa.gal { width: min(1280px, calc(100vw - 48px)); height: min(860px, calc(100vh - 40px)); display: flex; flex-direction: column; overflow: hidden; }
  .tk-modal.tk-artpop.capa.gal .tk-artpop-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .tk-modal.tk-artpop.capa.gal .tk-relart { flex: 1; min-height: 0; display: flex; }
  .tk-relart-split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(320px, 380px) 1fr; gap: 24px; }
  .tk-relart-split > .tk-relart-grid { align-content: start; overflow: auto; padding-right: 20px; border-right: 1px solid var(--line, rgba(127,127,127,.22)); grid-template-columns: 82px 1fr; }
  .tk-modal.tk-artpop.capa.gal .tk-modal-act { margin-top: 16px; }
}
@media (max-width: 899px) {
  .tk-relart-split { display: flex; flex-direction: column; gap: 14px; }
}
img.dual { object-fit: cover !important; object-position: left center !important; aspect-ratio: 1; }
.tk-res-vids figure img { width: 100%; border-radius: 10px; display: block; }
.tk-res-info { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 4px 0 14px; font-size: .8125rem; }
.tk-res-info dt { opacity: .6; }
.tk-res-info dd { margin: 0; overflow-wrap: anywhere; }
.tk-res-notes { margin: -6px 0 14px; font-size: .75rem; opacity: .75; }
.tk-res-notes summary { cursor: pointer; }
.tk-res-notes p { margin: 6px 0 0; line-height: 1.45; }

/* Sugestão de tema do Claude no pop-up da capa (js/tasks.js themePanel). PC: painel ao lado do formulário, 3 ideias lado a lado; celular: em coluna. */
.tk-theme { display: flex; flex-direction: column; gap: 14px; min-height: 0; flex: 1; }
.tk-themepanel { overflow: auto; }
.tk-theme-tema { margin: 0; font-size: 14px; line-height: 1.45; padding: 12px 14px; border-radius: var(--r-lg); background: var(--card); border: var(--hair) solid var(--line2); }
.tk-theme-tema .tk-theme-k { display: block; margin-bottom: 4px; }
.tk-theme-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tk-theme-card { border: var(--hair) solid var(--line2); border-radius: var(--r-lg); background: var(--card); padding: 16px; display: flex; flex-direction: column; gap: 12px; font-size: 13.5px; line-height: 1.45; transition: border-color .15s, box-shadow .15s; }
.tk-theme-card:hover { border-color: var(--tx, #0a0a0a); }
.tk-theme-card.on { border-color: var(--tx, #0a0a0a); box-shadow: 0 0 0 1px var(--tx, #0a0a0a) inset; }
.tk-theme-card h4 { margin: 0; font-size: 16px; line-height: 1.25; }
.tk-theme-part p { margin: 2px 0 0; }
.tk-theme-k { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; opacity: .55; font-weight: 600; }
.tk-theme-btns { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.tk-theme-btns .btn { flex: 1; padding: 6px 10px; font-size: 12.5px; }
.tk-theme-more { align-self: flex-start; }
.tk-theme-err { display: flex; gap: 10px; align-items: center; }
@media (max-width: 760px) { .tk-theme-cards { grid-template-columns: 1fr; } }
