/* Task properties share Inter and existing semantic colors with the app. */
.tm-editor,.tm-model-selector,.tm-summary{min-width:0;max-width:100%;color:var(--text);font-family:Inter,sans-serif}
.tm-editor{display:flex;flex-direction:column;gap:12px;width:100%;box-sizing:border-box}.tm-editor-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.tm-editor p,.tm-id,.tm-status{overflow-wrap:anywhere;white-space:pre-wrap;line-height:1.5}.tm-id{display:block;font-size:12px;color:var(--text-muted)}
.tm-editor .mb-field,.tm-model-selector .mb-field{display:flex;flex-direction:column;gap:8px;margin:8px 0;min-width:0;width:100%;font-size:13px}.tm-editor input,.tm-editor select,.tm-editor textarea,.tm-model-selector select{box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:44px;padding:10px 12px;font:inherit;border:1px solid var(--border);border-radius:8px;background:var(--bg-card);color:var(--text)}.tm-editor textarea{min-height:100px;resize:vertical}.tm-editor select[multiple]{min-height:120px}.tm-editor small{white-space:pre-wrap;overflow-wrap:anywhere}.tm-editor button,.tm-overlay button,.tm-bulk-properties summary{min-height:44px}.tm-section{display:flex;flex-direction:column;gap:8px;min-width:0}.tm-section h3{font-size:14px;margin:10px 0 0}.tm-status{font-size:13px;color:var(--text-muted)}
.tm-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(125px,100%),1fr));gap:8px;margin-top:8px}.tm-summary .mb-resumo{display:flex;flex-direction:column;gap:4px;min-width:0;padding:6px 0;border-top:1px solid var(--border)}.tm-summary small{font-size:10px;color:var(--text-muted);overflow-wrap:anywhere}.tm-summary span,.tm-summary a{font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--text)}.tm-summary a{color:var(--c-green);text-decoration:underline}.tm-summary .mb-texto-longo{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.tm-overlay .mb-card{display:block}.tm-overlay summary{font-weight:600;min-height:44px}.tm-conflict{border-top:1px solid var(--border);padding:12px 0}.tm-overlay .mb-footer{flex-wrap:wrap}.tm-overlay .mb-footer p{margin:0;flex:1;min-width:180px}.tm-overlay .mb-footer button{flex-shrink:0}.tm-overlay .mb-check{display:flex}.tm-overlay .mb-body>button{margin:8px 8px 8px 0}.tm-bulk-properties{min-width:240px;max-width:360px}.tm-bulk-properties details{min-width:220px}.tm-bulk-properties .mb-field{display:flex;flex-direction:column;gap:8px;margin:8px 0}.tm-bulk-properties input,.tm-bulk-properties select,.tm-bulk-properties textarea{min-height:44px;max-width:100%;box-sizing:border-box;width:100%;background:var(--bg-card);color:var(--text);border:1px solid var(--border);padding:8px;border-radius:6px}.bulk-tabela-wrap{max-width:100%;overflow:auto}
.tm-editor :focus-visible,.tm-overlay :focus-visible,.tm-model-selector :focus-visible{outline:2px solid var(--c-green);outline-offset:3px}.tm-editor [hidden],.tm-overlay [hidden]{display:none!important}
@media(max-width:600px){.tm-overlay .mb-footer{align-items:stretch;flex-direction:column}.tm-overlay .mb-footer button{width:100%}.tm-editor{width:100%}.tm-editor-head{align-items:stretch}.tm-summary{grid-template-columns:minmax(0,1fr)}.tm-overlay .mb-surface-row button{flex:1}.tm-overlay h2{overflow-wrap:anywhere;font-size:20px}}
@media(prefers-reduced-motion:reduce){.tm-editor *,.tm-overlay *{transition:none!important;animation:none!important;scroll-behavior:auto!important}}

.lista-cards:not(.modo-lista) .tm-lista,.lista-cards.modo-lista .tm-quadro{display:none}
/* In list rows the summary takes only the remaining width, never the title's. */
.lista-cards.modo-lista .tm-summary{flex:1 1 0;margin-top:0}
@media(max-width:600px){.lista-cards.modo-lista .lcard-main{flex-wrap:wrap;justify-content:flex-start}.lista-cards.modo-lista .lcard-l1{max-width:100%}.lista-cards.modo-lista .tm-summary{flex-basis:100%}}
/* Library and task dialogs can open in selection mode; the bar must not cover their footers. */
body:has(.mb-overlay) .sel-bar{display:none!important}
/* Card regions: reserved heights keep cards of one model aligned in a column. */
.kanban-card.tm-cartao .kc-titulo{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.5em}
.tm-regioes,.tm-linha-cartao{color:var(--text)}
.tm-regioes{display:grid;grid-template-rows:24px 22px 24px 32px;gap:4px;margin:6px 0}
.tm-r{display:flex;align-items:center;gap:6px;min-width:0;overflow:hidden;white-space:nowrap}
.tm-r-destaque .tm-c-rotulo{font-size:11px;color:var(--text-muted)}
.tm-c-destaque{font-size:16px;font-variant-numeric:tabular-nums;overflow:hidden;text-overflow:ellipsis}
.tm-c-direita{margin-left:auto;font-size:12px;color:var(--text-muted);flex-shrink:0}
.tm-c-etiqueta,.tm-c-chip,.tm-c-mais{font-size:11px;font-weight:600;border-radius:6px;padding:2px 6px;background:var(--bg-soft,rgba(0,0,0,.05));overflow:hidden;text-overflow:ellipsis}
.tm-c-mais{flex-shrink:0}
.tm-r-progresso{flex-direction:column;align-items:stretch;gap:3px}
.tm-c-prog-txt{display:flex;justify-content:space-between;gap:6px;font-size:11px}
.tm-c-barra{height:6px;border-radius:9px;background:var(--border)}
.tm-c-barra i{display:block;height:6px;border-radius:9px;background:#8b5cf6}
.tm-linha-cartao{display:flex;align-items:center;gap:10px;min-width:0;flex:1 1 0;overflow:hidden}
.tm-linha-cartao .tm-r-progresso{min-width:120px}
/* Whole when short; a long highlight stops at 40% (ellipsis) so chips and progress stay visible. */
.tm-linha-cartao .tm-c-destaque{flex-shrink:0;white-space:nowrap;max-width:40%}
.tm-linha-cartao .tm-r-chips{display:flex;gap:6px;min-width:0;overflow:hidden;white-space:nowrap}
/* Task details: tables live in the wide main column, after description and observations. */
.dp-panel-detalhes .tm-tabelas{margin:0 0 14px}.dp-panel-detalhes .tm-tabelas h4{font-size:13px;margin:6px 0 0}
.tm-tabela-wrap{position:relative;max-width:100%;overflow-x:auto;border:1px solid var(--border);border-radius:8px}
.tm-tabela{display:table;border-collapse:collapse;width:100%;min-width:640px;font-size:13px}
.tm-tabela th,.tm-tabela td{border:1px solid var(--border);padding:6px 8px;text-align:left;vertical-align:middle}
.tm-tabela thead th{font-size:11px;text-transform:uppercase;color:var(--text-muted);background:var(--bg-soft,rgba(0,0,0,.03))}
.tm-tabela input,.tm-tabela select{width:100%;min-width:90px;min-height:36px;box-sizing:border-box;border:1px solid var(--border);border-radius:6px;background:var(--bg-card);color:var(--text);padding:4px 6px}
.tm-t-acoes{white-space:nowrap}.tm-t-acoes button{min-height:32px;margin:1px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}
/* Andamento das entregas (Criar Criativos) */
.ent-painel{margin-top:12px}
.ent-painel h5{margin:0 0 6px;font-size:13px;color:var(--text)}
.ent-lista{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.ent-linha{border:1px solid var(--border);border-radius:8px;padding:8px;background:var(--bg-card)}
.ent-cab{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.ent-rotulo{font-size:13px;color:var(--text)}
.ent-status{font-size:11px;font-weight:700;padding:2px 8px;border-radius:999px;background:var(--bg-soft);color:var(--text-muted)}
.ent-entregue{background:rgba(59,130,246,.15);color:#1d4ed8}
.ent-aprovado{background:rgba(34,197,94,.15);color:#15803d}
.ent-correcao{background:rgba(239,68,68,.15);color:#dc2626}
.ent-aplicado{background:rgba(124,58,237,.15);color:#6d28d9}
.ent-texto-correcao{margin:6px 0 0;font-size:12px;white-space:pre-wrap;color:var(--text)}
.ent-texto-correcao.ent-ignorada{color:var(--text-muted);font-style:italic}
.ent-acoes{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.ent-form{display:flex;flex-direction:column;gap:6px;margin-top:6px}
.ent-form textarea{min-height:64px}
[data-theme="dark"] .ent-entregue{color:#93c5fd}
[data-theme="dark"] .ent-aprovado{color:#86efac}
[data-theme="dark"] .ent-correcao{color:#fca5a5}
[data-theme="dark"] .ent-aplicado{color:#c4b5fd}
.ent-form-rotulo{font-size:12px;font-weight:600;color:var(--text)}
.tm-status.ent-aviso{color:var(--text);background:var(--bg-soft);border-left:3px solid var(--c-red,#d14d4d);border-radius:6px;padding:6px 10px}
.tm-tabela .ent-status{white-space:nowrap}
/* Botões das linhas como ícones e atalho de link */
.tm-t-acoes{width:1%}
.tm-t-acoes .tm-t-icone{min-height:30px;min-width:30px;padding:4px;display:inline-flex;align-items:center;justify-content:center}
.tm-t-acoes .tm-t-remover:hover{color:var(--c-red,#d14d4d)}
.tm-t-link{display:flex;align-items:center;gap:4px}
.tm-t-link input{flex:1}
.tm-t-abrir{display:inline-flex;align-items:center;justify-content:center;min-width:30px;min-height:30px;border-radius:6px;color:var(--text-muted)}
.tm-t-abrir:hover{color:var(--text);background:var(--bg-soft)}
.mb-abrir-link{display:inline-block;font-size:12px;margin-top:4px}
