/* Tarefas (tarefas.html): calendário + lista + painel de detalhes com subtarefas. Usa os tokens de style.css. */
.tk-body { --tk-blue: #4573d2; --tk-done: #3fa66a; }
.tk-app { display: flex; align-items: stretch; min-height: calc(100vh - 64px); }
.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(--text); }
.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; }
.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; background: var(--card); border-radius: 14px; box-shadow: var(--shadow-lift); padding: 6px; z-index: 30; }
.tk-pop .tk-row { border-radius: 8px; }
.tk-pop .tk-empty { padding: 14px; }

/* ----- calendário ----- */
.tk-cal { border: 1px solid var(--sep); border-radius: 14px; 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: 1px solid var(--sep); border-radius: 14px; 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: color-mix(in srgb, var(--tk-blue) 14%, transparent); 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; }
.tk-cell.today .tk-daynum { background: var(--tk-blue); color: #fff; border-radius: 12px; }
.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: #1d1d1f; cursor: pointer; background: var(--chip, #c6e830); }
.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: 1px solid var(--sep); border-radius: 14px; overflow: hidden; }
.tk-sec { padding: 12px 14px 6px; font-size: 0.75rem; font-weight: 700; color: var(--text-3); letter-spacing: 0.04em; 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: color-mix(in srgb, var(--tk-blue) 12%, transparent); }
.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; }
.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, #c6e830); 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(--tk-done); color: var(--tk-done); }
.tk-circ.on { background: var(--tk-done); border-color: var(--tk-done); color: #fff; }
.tk-circ svg { width: 12px; height: 12px; }

/* ----- painel da direita ----- */
.tk-panel { width: min(460px, 100vw); flex: none; border-left: 1px solid var(--sep); background: var(--card); padding: 0 0 80px; position: sticky; top: 64px; height: calc(100vh - 64px); overflow: auto; }
.tk-ph { position: sticky; top: 0; background: var(--card); z-index: 2; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--sep); }
.tk-ph .grow { flex: 1; }
.tk-donebtn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--sep); background: none; color: var(--text); border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 0.8125rem; font-weight: 600; cursor: pointer; }
.tk-donebtn:hover { background: var(--fill); }
.tk-donebtn.on { border-color: var(--tk-done); color: var(--tk-done); }
.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); }
.tk-fields { display: grid; grid-template-columns: 130px 1fr; gap: 6px 8px; align-items: center; margin: 6px 0 14px; }
.tk-fields label.k { font-size: 0.8125rem; color: var(--text-2); }
.tk-fields input, .tk-fields select { padding: 7px 10px; font-size: 0.875rem; border-radius: 8px; background: var(--fill); border: 0; width: 100%; color: var(--text); }
.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; 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; transition: width 0.25s; }
.tk-danger { margin-top: 28px; }

@media (max-width: 900px) {
  .tk-app { flex-direction: column; }
  .tk-panel { width: 100%; position: static; height: auto; border-left: 0; border-top: 1px solid var(--sep); }
  .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: 64px; height: calc(100vh - 64px); 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: 8px; cursor: pointer; text-align: left; }
.tk-nav:hover { background: var(--fill); }
.tk-nav.on { background: var(--fill-hover); font-weight: 600; }
.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; }
.tk-badge { background: var(--tk-blue); color: #fff; font-size: 0.6875rem; font-weight: 700; border-radius: 10px; padding: 1px 7px; }
.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; }
.tk-whorow select { flex: 1; }
.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: 0; border-radius: 18px; padding: 22px 24px; background: var(--card); color: var(--text); width: min(520px, calc(100vw - 32px)); box-shadow: var(--shadow-lift); }
.tk-modal::backdrop { background: rgba(0, 0, 0, 0.45); }
.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; }
.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; }
.tk-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 0.875rem; box-shadow: var(--shadow-lift); z-index: 100; max-width: min(560px, calc(100vw - 32px)); }

@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); background: var(--card); border-radius: 10px; box-shadow: var(--shadow-lift); 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; background: var(--card); border-radius: 12px; box-shadow: var(--shadow-lift); padding: 12px; }
.tk-tagmenu-t { font-size: 0.75rem; font-weight: 700; 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-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(--card); border: 1px solid var(--sep); border-radius: 14px; 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; }
.tk-tpl-items li { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; }
.tk-tpl-items .t { flex: 1; min-width: 0; }
.tk-tpl-items .meta { font-size: 0.75rem; color: var(--text-3); white-space: nowrap; }
.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 170px 70px 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.55rem; line-height: 1.15; 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: color-mix(in srgb, var(--tk-blue) 14%, transparent); 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); }
.u-act { display: flex; gap: 6px; flex-wrap: wrap; }
.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) ===== */
.tk-topnav { display: flex; gap: 4px; margin-right: 6px; }
.tk-toplink { padding: 6px 12px; border-radius: 9px; font-size: 0.875rem; font-weight: 600; color: var(--text-2); text-decoration: none; }
a.tk-toplink:hover { background: var(--fill); color: var(--text); }
.tk-toplink.on { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }

/* ===== 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: 1px solid var(--sep); border-radius: 14px; 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; }
.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: color-mix(in srgb, var(--tk-blue) 9%, transparent); }
.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:hover, .tk-notes-view:focus-visible { border-color: var(--sep); outline: none; }
.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(--card); margin: 0 -18px; padding: 10px 18px 14px; border-top: 1px solid var(--sep); box-shadow: 0 -8px 18px rgba(0, 0, 0, 0.10); }
.tk-composer .tk-ctext { min-height: 40px; height: 40px; padding: 9px 12px; border-radius: 20px; }
.tk-composer:focus-within .tk-ctext { border-radius: 12px; }
.tk-composer .tk-cact { display: none; }
.tk-composer:focus-within .tk-cact, .tk-composer.has-text .tk-cact { display: flex; }
.tk-comhost-gap { height: 8px; }

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