/* DarkTask — modais da Produtividade (template 09/2026)
 *
 * Receita única de DarkTask v2.dc.html: véu rgba(0,0,0,.32), cartão reto com
 * fio de 19% e a sombra do sistema, topo de 72px (ícone de 22px, título 17/700
 * e a célula de fechar de 72px), corpo com rótulos em caixa alta e campos de
 * 44px, rodapé de 64px com Cancelar e a ação cheia.
 *
 * Os diálogos de seção, ambiente e projeto usam as classes .dtm-*. O editor de
 * tarefa, a tarefa aberta e o Kanban mantêm a marcação que os contratos prendem
 * e ganham o desenho por aqui. Carrega depois de produtividade.css.
 */

/* =========================================================================
   VÉU — todos os modais do app
   ========================================================================= */
html body #dc-root .dt-modal-backdrop {
  background: rgba(0, 0, 0, .32) !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  animation: none !important;
}
html body #dc-root .dtm-fundo {
  position: fixed; inset: 0; z-index: 72;
  display: flex; align-items: center; justify-content: center;
  padding: 32px;
}
@media (max-width: 879px) { html body #dc-root .dtm-fundo { padding: 0; align-items: stretch; } }

/* =========================================================================
   DIÁLOGOS SIMPLES — seção, ambiente, projeto
   ========================================================================= */
html body #dc-root .dtm {
  width: 100%; max-width: 520px; max-height: 100%;
  display: flex; flex-direction: column;
  margin: 0; padding: 0 !important;
  border: 1px solid color-mix(in srgb, var(--text) 19%, var(--bg)) !important; border-radius: 0 !important;
  background: var(--bg) !important; color: var(--text);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .22) !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  animation: none !important;
  font-family: var(--font-ui);
}
html body #dc-root .dtm.e-largo { max-width: 560px; }
@media (max-width: 879px) { html body #dc-root .dtm { max-width: none; max-height: none; border: 0 !important; } }

html body #dc-root .dtm-cabeca {
  height: 72px; flex: none;
  display: flex; align-items: stretch;
  border-bottom: 1px solid var(--line);
}
html body #dc-root .dtm-titulo {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
}
html body #dc-root .dtm-titulo svg { flex: none; color: var(--text); }
html body #dc-root .dtm-titulo h3 {
  margin: 0 !important;
  font: 700 17px/1 var(--font-ui) !important; letter-spacing: -.4px !important;
  color: var(--text) !important;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html body #dc-root .dtm-fechar {
  width: 72px; min-width: 72px; height: auto; min-height: 0; flex: none;
  display: flex; align-items: center; justify-content: center;
  margin: 0; padding: 0 !important;
  border: 0 !important; border-left: 1px solid var(--line) !important; border-radius: 0 !important;
  background: transparent !important; color: var(--text) !important; box-shadow: none !important;
  cursor: pointer;
}
html body #dc-root .dtm-fechar:hover { background: var(--surface-2) !important; }

html body #dc-root .dtm-corpo {
  flex: 1; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  padding: 24px 20px;
}
html body #dc-root .dtm-corpo:has(.dtm-grupo) { gap: 20px; }
html body #dc-root .dtm-grupo { display: flex; flex-direction: column; gap: 10px; }

/* Rótulo e campo — valem também para o editor de tarefa. */
html body #dc-root :is(.dtm, .dt-task-editor) .dtm-rotulo,
html body #dc-root .dt-task-editor label:not(.dt-task-anexar) {
  display: block; margin: 0 !important;
  font: 700 10.5px/1 var(--font-ui) !important; letter-spacing: 1.6px !important; text-transform: uppercase;
  color: var(--text-3) !important;
}
html body #dc-root .dtm-campo,
html body #dc-root .dt-task-editor :is(input[type="text"], input[type="date"], input[type="time"], sc-raw-select, select, .dt-task-quando-campo) {
  width: 100%; height: 44px; min-height: 44px;
  margin: 0 !important; padding: 0 14px !important;
  border: 1px solid var(--line) !important; border-radius: 0 !important;
  background: var(--bg) !important; color: var(--text) !important; box-shadow: none !important;
  font: 400 13.5px/1 var(--font-ui) !important;
  outline: none;
}
html body #dc-root :is(.dtm-campo, .dt-task-editor input, .dt-task-editor sc-raw-select, .dt-task-editor select):focus,
html body #dc-root .dt-task-editor .dt-task-rico:focus { border-color: var(--text) !important; box-shadow: none !important; }
html body #dc-root .dtm-campo::placeholder { color: var(--text-3); }
html body #dc-root .dtm-erro {
  display: flex; align-items: center; gap: 6px;
  margin: 0; font: 400 12.5px/1.4 var(--font-ui); color: var(--danger);
}

html body #dc-root .dtm-rodape {
  height: 64px; flex: none;
  display: flex; align-items: stretch;
  border-top: 1px solid var(--line);
}
html body #dc-root .dtm-vao { flex: 1; }
html body #dc-root .dtm-botao,
html body #dc-root .dt-task-editor-actions > button {
  flex: none; height: auto; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  margin: 0 !important; padding: 0 28px !important;
  border: 0 !important; border-left: 1px solid var(--line) !important; border-radius: 0 !important;
  background: transparent !important; color: var(--text) !important; box-shadow: none !important;
  font: 600 13px/1 var(--font-ui) !important;
  cursor: pointer; filter: none !important;
}
html body #dc-root :is(.dtm-botao, .dt-task-editor-actions > button):hover { background: var(--surface-2) !important; }
html body #dc-root :is(.dtm-botao.e-cheio, .dt-task-editor-actions > .dt-task-save) {
  background: var(--text) !important; color: var(--bg) !important; letter-spacing: .3px;
}
html body #dc-root :is(.dtm-botao.e-cheio, .dt-task-editor-actions > .dt-task-save):hover {
  background: color-mix(in srgb, var(--text) 86%, var(--bg)) !important;
}

/* =========================================================================
   MODAIS FLUTUANTES RESTANTES — .dt-floating-modal (Modo foco, Minhas ideias,
   Minhas notas e outros montados pelo app)
   O primeiro filho é a linha do título: vira o topo de 72px, com as ações e o
   fechar em células. O resto ganha 20px de lado e canto reto.
   ========================================================================= */
html body #dc-root .dt-floating-modal:not(.dtm) {
  padding: 0 !important;
  border: 1px solid color-mix(in srgb, var(--text) 19%, var(--bg)) !important; border-radius: 0 !important;
  background: var(--bg) !important; color: var(--text) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .22) !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  animation: none !important;
  font-family: var(--font-ui);
  overflow: hidden auto;
}
html body #dc-root .dt-floating-modal:not(.dtm) *:not([role="switch"]):not([role="switch"] *) { border-radius: 0 !important; }
html body #dc-root .dt-floating-modal:not(.dtm) > :first-child {
  min-height: 72px; margin: 0 0 24px !important; padding: 0 0 0 20px !important;
  display: flex !important; align-items: stretch !important; gap: 0 !important;
  border-bottom: 1px solid var(--line);
}
html body #dc-root .dt-floating-modal:not(.dtm) > :first-child > :first-child {
  flex: 1; min-width: 0; align-self: center; margin: 0 !important;
}
html body #dc-root .dt-floating-modal:not(.dtm) > :first-child h3 {
  margin: 0 !important; font: 700 17px/1 var(--font-ui) !important; letter-spacing: -.4px !important; color: var(--text) !important;
}
html body #dc-root .dt-floating-modal:not(.dtm) > :first-child h3 svg { color: var(--text) !important; }
html body #dc-root .dt-floating-modal:not(.dtm) > :first-child > :not(:first-child),
html body #dc-root .dt-floating-modal:not(.dtm) > :first-child > div:last-child:not(:first-child) > button {
  align-self: stretch;
  height: auto !important; min-height: 0 !important; max-height: none !important;
  display: flex !important; align-items: center !important; justify-content: center !important; gap: 8px !important;
  margin: 0 !important; padding: 0 20px !important;
  border: 0 !important; border-left: 1px solid var(--line) !important;
  background: transparent !important; color: var(--text) !important; box-shadow: none !important;
  font: 600 13px/1 var(--font-ui) !important;
}
html body #dc-root .dt-floating-modal:not(.dtm) > :first-child > div:last-child:not(:first-child) {
  display: flex !important; align-items: stretch !important; padding: 0 !important; border-left: 0 !important;
}
html body #dc-root .dt-floating-modal:not(.dtm) > :first-child button[aria-label^="Fechar"] { width: 72px !important; padding: 0 !important; }
html body #dc-root .dt-floating-modal:not(.dtm) > :first-child button:hover { background: var(--surface-2) !important; }
html body #dc-root .dt-floating-modal:not(.dtm) > :first-child [data-dt-new-text-idea] { background: var(--text) !important; color: var(--bg) !important; }
html body #dc-root .dt-floating-modal:not(.dtm) > :not(:first-child) { margin-left: 20px !important; margin-right: 20px !important; }
html body #dc-root .dt-floating-modal:not(.dtm) > :last-child { margin-bottom: 24px !important; }
html body #dc-root .dt-floating-modal:not(.dtm) button[style*="background:var(--accent)"] {
  background: var(--text) !important; color: var(--bg) !important; border: 0 !important; filter: none !important;
}
/* Grupos de botões dentro do modal (dias da semana, áudio, pomodoro): colados,
   com o fio compartilhado — sem margem entre eles. */
html body #dc-root .dt-floating-modal:not(.dtm) > :not(:first-child) :is(div, span):has(> button + button) { gap: 0 !important; column-gap: 0 !important; }
html body #dc-root .dt-floating-modal:not(.dtm) > :not(:first-child) :is(div, span) > button + button { margin-left: -1px !important; }
html body #dc-root .dt-floating-modal:not(.dtm) :is(input, select, textarea) {
  border: 1px solid var(--line) !important; background: var(--bg) !important; box-shadow: none !important;
}

/* =========================================================================
   EDITOR DE TAREFA — form.dt-task-editor
   O topo e o rodapé grudam nas bordas do cartão enquanto o corpo rola.
   ========================================================================= */
html body #dc-root .dt-task-editor {
  max-width: 720px !important; max-height: calc(100dvh - 64px) !important;
  margin: 0; padding: 0 !important;
  border: 1px solid color-mix(in srgb, var(--text) 19%, var(--bg)) !important; border-radius: 0 !important;
  background: var(--bg) !important; color: var(--text);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .22) !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  animation: none !important;
  font-family: var(--font-ui);
}
@media (max-width: 879px) {
  html body #dc-root .dt-task-editor { max-height: 100dvh !important; height: 100dvh; border: 0 !important; }
}
/* Topo: o primeiro filho do form é a linha do título com o X. */
html body #dc-root .dt-task-editor > div:first-child {
  position: sticky; top: 0; z-index: 3;
  height: 72px; margin: 0 0 24px !important; padding: 0 0 0 20px !important;
  display: flex !important; align-items: stretch !important; gap: 12px !important;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
html body #dc-root .dt-task-editor > div:first-child h3 {
  align-self: center;
  font: 700 17px/1 var(--font-ui) !important; letter-spacing: -.4px !important; color: var(--text) !important;
}
html body #dc-root .dt-task-editor > div:first-child > button {
  width: 72px !important; height: auto !important; flex: none;
  margin: 0 !important; padding: 0 !important;
  border: 0 !important; border-left: 1px solid var(--line) !important; border-radius: 0 !important;
  background: transparent !important; color: var(--text) !important;
}
html body #dc-root .dt-task-editor > div:first-child > button svg { width: 22px; height: 22px; }
html body #dc-root .dt-task-editor > div:first-child > button:hover { background: var(--surface-2) !important; }

/* Corpo: 20px de lado, 20px entre os grupos. */
html body #dc-root .dt-task-editor > :not(:first-child):not(.dt-task-editor-actions) {
  margin-left: 20px !important; margin-right: 20px !important;
}
/* O :not() entra só pelo peso: a regra geral dos rótulos do editor
   (label:not(.dt-task-anexar), margin:0) pesa (1,2,3) e vencia esta, que pesava
   (1,2,2) — o TÍTULO ficava colado no campo, sem os 10px dos outros rótulos. */
html body #dc-root .dt-task-editor > label.dt-task-rotulo:not(.dt-task-anexar) { margin-bottom: 10px !important; }
/* A calha de rolagem reservada (styles.css: scrollbar-gutter:stable) comia 17px
   à direita mesmo sem rolagem: o topo e o pé paravam antes da borda. A calha só
   existe quando a rolagem existe. */
html body #dc-root .dt-task-editor { scrollbar-gutter: auto !important; }
html body #dc-root .dt-task-editor > #dt-task-titulo,
html body #dc-root .dt-task-editor > sc-raw-select { margin-bottom: 20px !important; }
html body #dc-root .dt-task-editor > label { margin-bottom: 10px !important; }
html body #dc-root .dt-task-editor #dt-task-titulo { width: calc(100% - 40px) !important; font-weight: 600 !important; }
html body #dc-root .dt-task-editor > :is(sc-raw-select, select) {
  display: block !important; width: calc(100% - 40px) !important; margin-bottom: 20px !important;
}
/* O form não é bloco comum: sem largura dita, topo e rodapé encolhem até o
   conteúdo e as ações deixam de encostar à direita. */
html body #dc-root .dt-task-editor > div:first-child,
html body #dc-root .dt-task-editor .dt-task-editor-actions {
  width: 100% !important; box-sizing: border-box !important; align-self: stretch !important;
}

html body #dc-root .dt-task-editor .dt-task-text-head {
  display: flex; align-items: flex-end; gap: 12px; margin-bottom: 10px !important;
}
html body #dc-root .dt-task-editor .dt-task-text-head > label { flex: 1; }
html body #dc-root .dt-task-editor .dt-task-format {
  height: 32px; display: flex !important; align-items: stretch !important; gap: 0 !important;
  padding: 0 !important; border: 1px solid var(--line) !important; border-radius: 0 !important;
  background: transparent !important; box-shadow: none !important;
}
html body #dc-root .dt-task-editor .dt-task-format > button {
  width: 34px !important; height: auto !important; min-height: 0 !important;
  margin: 0 !important; padding: 0 !important;
  border: 0 !important; border-right: 1px solid var(--line) !important; border-radius: 0 !important;
  background: transparent !important; color: var(--text) !important;
  font: 400 12.5px/1 var(--font-ui) !important;
}
html body #dc-root .dt-task-editor .dt-task-format > button:last-child { border-right: 0 !important; }
html body #dc-root .dt-task-editor .dt-task-format > button:hover { background: var(--surface-2) !important; }
html body #dc-root .dt-task-editor .dt-task-format-sep { display: none !important; }
html body #dc-root .dt-task-editor .dt-task-campo-rico { margin-bottom: 20px !important; }
html body #dc-root .dt-task-editor .dt-task-rico {
  min-height: 132px;
  padding: 12px 14px !important;
  border: 1px solid var(--line) !important; border-radius: 0 !important;
  background: var(--bg) !important; box-shadow: none !important;
  font: 400 13.5px/1.45 var(--font-ui) !important; color: var(--text) !important;
}

html body #dc-root .dt-task-editor .dt-task-quando { margin-bottom: 20px !important; }
html body #dc-root .dt-task-editor .dt-task-quando > label { margin-bottom: 10px !important; }
html body #dc-root .dt-task-editor .dt-task-quando-linha {
  display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 12px !important;
}
html body #dc-root .dt-task-editor .dt-task-quando-linha > button {
  grid-column: 1 / -1; justify-self: start;
  height: 32px; padding: 0 14px !important;
  border: 1px solid var(--line) !important; border-radius: 0 !important;
  background: transparent !important; color: var(--text-2) !important;
  font: 600 12px/1 var(--font-ui) !important;
}
@media (max-width: 879px) {
  html body #dc-root .dt-task-editor .dt-task-quando-linha { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* Prioritária, nota de voz e anexos: caixas de 64px com fio, como no protótipo. */
html body #dc-root .dt-task-editor .dt-task-extras { gap: 12px !important; margin-bottom: 24px !important; }
html body #dc-root .dt-task-editor .dt-task-extra {
  border: 1px solid var(--line) !important; border-radius: 0 !important;
  background: transparent !important; box-shadow: none !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
html body #dc-root .dt-task-editor .dt-task-extra-super,
html body #dc-root .dt-task-editor .dt-task-extra-gatilho {
  min-height: 64px !important; padding: 0 18px !important; gap: 12px !important;
}
html body #dc-root .dt-task-editor .dt-task-extra-super > span:first-child { color: var(--text) !important; }
html body #dc-root .dt-task-editor .dt-task-extra-super > div > div,
html body #dc-root .dt-task-editor .dt-task-extra-gatilho > span:last-child {
  font: 600 13px/1 var(--font-ui) !important; color: var(--text) !important;
}
html body #dc-root .dt-task-editor .dt-task-extra-gatilho {
  width: 100%; border: 0 !important; border-radius: 0 !important; background: transparent !important; color: var(--text) !important;
}
html body #dc-root .dt-task-editor .dt-task-extra-gatilho:hover { background: var(--surface-2) !important; }
html body #dc-root .dt-task-editor .dt-supertask-form-toggle {
  width: 52px !important; height: 28px !important;
  border: 1px solid var(--line) !important;
}
html body #dc-root .dt-task-editor .dt-supertask-form-toggle[aria-pressed="true"] { background: var(--text) !important; border-color: var(--text) !important; }
html body #dc-root .dt-task-editor .dt-supertask-form-toggle[aria-pressed="true"] > span { background: var(--bg) !important; box-shadow: none !important; }
html body #dc-root .dt-task-editor .dt-task-extra-files { border: 0 !important; }
html body #dc-root .dt-task-editor .dt-task-dropzone {
  min-height: 96px;
  border: 1px dashed color-mix(in srgb, var(--text) 23%, var(--bg)) !important; border-radius: 0 !important;
  background: transparent !important;
}
html body #dc-root .dt-task-editor .dt-task-dropzone > div { border-radius: 0 !important; }
html body #dc-root .dt-task-editor .dt-task-anexar {
  min-height: 96px; gap: 10px;
  border: 0 !important; border-radius: 0 !important;
  font: 400 12.5px/1 var(--font-ui) !important; color: var(--text-3) !important;
  text-transform: none !important; letter-spacing: 0 !important;
}
html body #dc-root .dt-task-editor .dt-task-anexar:hover { background: var(--surface-2) !important; color: var(--text) !important; }

/* Rodapé fixo de 64px. */
html body #dc-root .dt-task-editor .dt-task-editor-actions {
  position: sticky; bottom: 0; z-index: 3;
  height: 64px; margin: 0 !important; padding: 0 !important;
  display: flex !important; align-items: stretch !important; justify-content: flex-end !important; gap: 0 !important;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

/* =========================================================================
   TAREFA ABERTA — .dt-view-modal
   Topo 72 com o projeto, corpo com a moldura de 25px e rodapé de 64px com as
   ações em células.
   ========================================================================= */
html body #dc-root .dt-view-modal {
  width: 100% !important; max-width: 760px !important;
  height: min(640px, calc(100dvh - 64px)) !important;
  max-height: calc(100dvh - 64px) !important;
  display: flex !important; flex-direction: column !important;
  margin: 0; padding: 0 !important;
  border: 1px solid color-mix(in srgb, var(--text) 19%, var(--bg)) !important; border-radius: 0 !important;
  background: var(--bg) !important; color: var(--text);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .22) !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  animation: none !important; overflow: hidden !important;
  font-family: var(--font-ui);
}
@media (max-width: 879px) {
  html body #dc-root .dt-view-modal { max-width: none !important; max-height: 100dvh !important; height: 100dvh; border: 0 !important; }
}
html body #dc-root .dt-view-header {
  height: 72px; flex: none;
  display: flex !important; align-items: stretch !important; gap: 0 !important;
  margin: 0 !important; padding: 0 0 0 20px !important;
  border: 0 !important; border-bottom: 1px solid var(--line) !important;
  background: var(--bg) !important;
}
html body #dc-root .dt-view-header > span:first-child {
  align-self: center; gap: 10px !important;
  font: 700 9.5px/1 var(--font-ui) !important; letter-spacing: 1.5px !important; text-transform: uppercase;
  color: var(--text-3) !important;
}
html body #dc-root .dt-view-header > span:first-child svg { width: 18px; height: 18px; color: var(--text) !important; }
/* Raio 0 também no contêiner: ele tinha 10px com overflow:hidden e recortava
   em curva o fundo do hover do botão de fechar. */
html body #dc-root .dt-view-header-menu { display: flex; align-items: stretch; border-radius: 0 !important; }
html body #dc-root .dt-view-header-menu > button {
  width: 72px !important; height: auto !important; margin: 0 !important; padding: 0 !important;
  border: 0 !important; border-left: 1px solid var(--line) !important; border-radius: 0 !important;
  background: transparent !important; color: var(--text) !important;
}
html body #dc-root .dt-view-header-menu > button svg { width: 22px; height: 22px; }
html body #dc-root .dt-view-header-menu > button:hover { background: var(--surface-2) !important; }

html body #dc-root .dt-view-layout { flex: 1; min-height: 0; overflow-y: auto; display: block !important; padding: 0 !important; }
html body #dc-root .dt-view-main {
  display: flex; flex-direction: column; gap: 14px;
  margin: 25px !important; padding: 20px !important;
  border: 1px solid var(--line) !important; border-radius: 0 !important;
  background: transparent !important; box-shadow: none !important;
}
html body #dc-root .dt-view-main .dt-codigo-visor { gap: 10px !important; }
html body #dc-root .dt-view-main .dt-codigo {
  font: 400 10.5px/1 var(--font-ui) !important; letter-spacing: 0 !important;
  color: var(--text-3) !important;
}
html body #dc-root .dt-view-main > div:nth-child(2) {
  font: 700 19px/1.2 var(--font-ui) !important; letter-spacing: -.4px !important; color: var(--text) !important;
}
html body #dc-root .dt-view-main :is(p, li) { font: 400 13.5px/1.55 var(--font-ui); color: color-mix(in srgb, var(--text) 80%, var(--bg)); }
html body #dc-root .dt-view-main [ref], html body #dc-root .dt-view-main div[style*="border-radius:12px"] { border-radius: 0 !important; }
html body #dc-root .dt-view-main button[style*="border-radius:12px"] { border-radius: 0 !important; }

/* Propriedades: linhas de 56px em grade 200px | valor, de borda a borda do
   quadro; no celular o rótulo fica em cima do valor. */
html body #dc-root .dt-view-props {
  display: flex; flex-direction: column;
  margin: 6px -20px 0; border-top: 1px solid var(--line);
}
html body #dc-root .dt-view-prop {
  min-height: 56px;
  display: grid; grid-template-columns: 200px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}
html body #dc-root .dt-view-prop-rotulo {
  display: flex; align-items: center; padding: 0 20px;
  border-right: 1px solid var(--line);
  font: 600 12px/1 var(--font-ui); color: var(--text);
}
html body #dc-root .dt-view-prop-valor {
  display: flex; align-items: center; padding: 0 20px;
  font: 400 13px/1.3 var(--font-ui); color: color-mix(in srgb, var(--text) 80%, var(--bg));
  font-variant-numeric: tabular-nums;
}
html body #dc-root .dt-view-historico {
  min-height: 56px; margin: 0 -20px -20px;
  display: flex; align-items: center; gap: 10px; padding: 0 20px;
  font: 400 11.5px/1.3 var(--font-ui); color: var(--text-3);
}
html body #dc-root .dt-view-historico svg { flex: none; color: color-mix(in srgb, var(--text) 36%, var(--bg)); }
html body #dc-root .dt-view-props:last-child { margin-bottom: -20px; }
@media (max-width: 879px) {
  html body #dc-root .dt-view-prop { grid-template-columns: minmax(0, 1fr); }
  html body #dc-root .dt-view-prop-rotulo { min-height: 40px; border-right: 0; border-bottom: 1px solid var(--line); }
  html body #dc-root .dt-view-prop-valor { min-height: 48px; }
}

html body #dc-root .dt-view-footer {
  height: 64px; flex: none;
  display: flex !important; align-items: stretch !important;
  margin: 0 !important; padding: 0 !important;
  border: 0 !important; border-top: 1px solid var(--line) !important;
  background: var(--bg) !important;
}
html body #dc-root .dt-view-actions {
  flex: 1; display: flex !important; align-items: stretch !important; justify-content: flex-end !important; gap: 0 !important;
  margin: 0 !important; padding: 0 !important;
}
html body #dc-root .dt-view-actions .dt-task-actions {
  display: flex !important; align-items: stretch !important; gap: 0 !important;
  margin: 0 !important; padding: 0 !important;
  border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
html body #dc-root .dt-view-actions .dt-task-actions > button {
  width: auto !important; min-width: 64px; height: auto !important; min-height: 0 !important;
  display: flex !important; align-items: center; justify-content: center; gap: 9px;
  margin: 0 !important; padding: 0 22px !important;
  border: 0 !important; border-left: 1px solid var(--line) !important; border-radius: 0 !important;
  background: transparent !important; color: var(--text) !important; box-shadow: none !important;
  font: 600 13px/1 var(--font-ui) !important;
}
html body #dc-root .dt-view-actions .dt-task-actions > button:not(.dt-acao-rotulo) { padding: 0 !important; width: 64px !important; }
html body #dc-root .dt-view-actions .dt-task-actions > button svg { width: 18px; height: 18px; }
html body #dc-root .dt-view-actions .dt-task-actions > button:hover { background: var(--surface-2) !important; }
html body #dc-root .dt-view-actions .dt-task-actions > button.dt-acao-concluir { background: var(--text) !important; color: var(--bg) !important; letter-spacing: .3px; }
html body #dc-root .dt-view-actions .dt-task-actions > button.dt-acao-concluir:hover { background: color-mix(in srgb, var(--text) 86%, var(--bg)) !important; }
/* A célula de fechar ocupa a altura toda do topo. */
html body #dc-root .dt-view-header-menu {
  align-self: stretch !important; flex: none !important;
  width: 72px !important; height: 72px !important; margin: 0 !important; padding: 0 !important;
  display: flex !important;
}
html body #dc-root .dt-view-header-menu > button {
  flex: none !important; width: 72px !important; min-width: 72px !important; height: 71px !important;
  max-height: none !important; min-height: 0 !important; max-width: none !important;
  display: flex !important; align-items: center; justify-content: center;
}
html body #dc-root .dt-view-actions .dt-contagem { flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 20px; border-radius: 0 !important; }
/* A ordem do protótipo: excluir na ponta esquerda, a ação cheia na direita. */
html body #dc-root .dt-view-actions > sc-if:has(.dt-acoes-feito),
html body #dc-root .dt-view-actions .dt-acoes-feito { order: 3; }

/* =========================================================================
   KANBAN — folha montada por app-fixes.js
   ========================================================================= */
html body #dc-root .dt-kanban-overlay {
  background: rgba(0, 0, 0, .32) !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  padding: 32px !important;
}
html body #dc-root .dt-kanban-folha {
  max-width: 1180px !important; height: min(640px, 100%) !important;
  display: flex !important; flex-direction: column !important;
  padding: 0 !important;
  border: 1px solid color-mix(in srgb, var(--text) 19%, var(--bg)) !important; border-radius: 0 !important;
  background: var(--bg) !important; color: var(--text);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .22) !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  animation: none !important;
}
html body #dc-root .dt-kanban-folha.e-cheia { max-width: none !important; height: 100% !important; }
html body #dc-root .dt-kanban-topo {
  height: 72px; flex: none;
  display: flex !important; align-items: stretch !important; gap: 0 !important;
  margin: 0 !important; padding: 0 0 0 20px !important;
  border-bottom: 1px solid var(--line) !important;
  background: var(--bg) !important;
}
html body #dc-root .dt-kanban-topo-nome {
  flex: 1 !important; min-width: 0;
  display: flex !important; flex-direction: column !important; justify-content: center !important; gap: 8px !important;
  padding: 0 !important;
}
html body #dc-root .dt-kanban-eyebrow {
  font: 700 9.5px/1 var(--font-ui) !important; letter-spacing: 1.8px !important; text-transform: uppercase;
  color: var(--text-3) !important;
}
html body #dc-root .dt-kanban-topo h2 {
  margin: 0 !important; font: 700 17px/1 var(--font-ui) !important; letter-spacing: -.4px !important; color: var(--text) !important;
}
html body #dc-root .dt-kanban-topo-acoes {
  display: flex !important; align-items: stretch !important; gap: 0 !important; margin: 0 !important; padding: 0 !important;
}
html body #dc-root .dt-kanban-topo-acoes > button {
  height: auto !important; min-height: 0 !important; max-height: none !important; margin: 0 !important;
  display: flex !important; align-items: center; justify-content: center; gap: 9px;
  border: 0 !important; border-left: 1px solid var(--line) !important; border-radius: 0 !important;
  background: transparent !important; color: var(--text) !important; box-shadow: none !important;
  font: 600 13px/1 var(--font-ui) !important;
}
html body #dc-root .dt-kanban-topo-acoes > .dt-kanban-icone { width: 72px !important; min-width: 72px; padding: 0 !important; }
html body #dc-root .dt-kanban-topo-acoes > .dt-kanban-icone svg { width: 22px; height: 22px; }
html body #dc-root .dt-kanban-topo-acoes > .dt-kanban-icone:hover { background: var(--surface-2) !important; }
html body #dc-root .dt-kanban-topo-acoes > .dt-kanban-botao {
  padding: 0 22px !important; background: var(--text) !important; color: var(--bg) !important;
}
html body #dc-root .dt-kanban-topo-acoes > .dt-kanban-botao svg { width: 20px; height: 20px; }
html body #dc-root .dt-kanban-topo-acoes > .dt-kanban-botao:hover { background: color-mix(in srgb, var(--text) 86%, var(--bg)) !important; }

html body #dc-root .dt-kanban-colunas { flex: 1; min-height: 0; gap: 0 !important; padding: 0 !important; }
html body #dc-root .dt-kanban-coluna {
  display: flex !important; flex-direction: column !important; min-height: 0;
  margin: 0 !important; padding: 0 !important;
  border: 0 !important; border-right: 1px solid var(--line) !important; border-radius: 0 !important;
  background: var(--bg) !important; box-shadow: none !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
html body #dc-root .dt-kanban-coluna:last-child { border-right: 0 !important; }
html body #dc-root .dt-kanban-coluna.e-alvo { background: var(--surface-2) !important; }
html body #dc-root .dt-kanban-coluna-topo {
  height: 49px; flex: none;
  display: flex !important; align-items: center !important; gap: 10px !important;
  margin: 0 !important; padding: 0 16px !important;
  border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important;
  background: transparent !important;
  font: 700 11px/1 var(--font-ui) !important; letter-spacing: 1.5px !important; text-transform: uppercase;
  color: var(--text) !important;
}
html body #dc-root .dt-kanban-coluna-topo * { font: inherit !important; letter-spacing: inherit !important; border-radius: 0 !important; background: none !important; }
html body #dc-root .dt-kanban-pilha {
  flex: 1; min-height: 0; overflow-y: auto;
  display: flex !important; flex-direction: column !important; gap: 16px !important;
  margin: 0 !important; padding: 0 25px 0 0 !important;
  border: 25px solid transparent !important; border-radius: 0 !important;
}
html body #dc-root .dt-kanban-pilha > :not(.dt-kanban-card) {
  min-height: 72px; display: flex; align-items: center; justify-content: center;
  border: 1px solid color-mix(in srgb, var(--text) 23%, var(--bg)) !important; border-radius: 0 !important;
  background: transparent !important;
  font: 400 11.5px/1 var(--font-ui) !important; color: var(--text-3) !important;
}
html body #dc-root .dt-kanban-card {
  flex: none;
  display: flex !important; flex-direction: column !important; gap: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--line) !important; border-radius: 0 !important;
  background: var(--bg) !important; box-shadow: none !important; transform: none !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
html body #dc-root .dt-kanban-card:hover { background: color-mix(in srgb, var(--text) 3%, var(--bg)) !important; }
html body #dc-root .dt-kanban-card-topo {
  height: 36px; display: flex !important; align-items: center !important; gap: 8px !important;
  margin: 0 !important; padding: 0 12px 0 0 !important; border-bottom: 1px solid var(--line) !important;
}
html body #dc-root .dt-kanban-card-abrir {
  width: 36px !important; height: 35px !important; min-height: 0 !important;
  margin: 0 !important; padding: 0 !important;
  border: 0 !important; border-right: 1px solid var(--line) !important; border-radius: 0 !important;
  background: transparent !important; color: var(--text) !important;
}
html body #dc-root .dt-kanban-card .dt-codigo {
  font: 400 10.5px/1 var(--font-ui) !important; letter-spacing: 0 !important;
  color: var(--text-3) !important;
}
html body #dc-root .dt-kanban-card-titulo {
  margin: 0 !important; padding: 12px !important;
  font: 600 13px/1.35 var(--font-ui) !important; color: var(--text) !important; text-wrap: pretty;
}
html body #dc-root .dt-kanban-card-pe {
  height: 32px; display: flex !important; align-items: center !important; justify-content: space-between !important;
  margin: 0 !important; padding: 0 12px !important; border-top: 1px solid var(--line) !important;
}
html body #dc-root .dt-kanban-movido {
  font: 400 10.5px/1 var(--font-ui) !important; color: var(--text-3) !important;
}
@media (max-width: 879px) {
  html body #dc-root .dt-kanban-overlay { padding: 0 !important; }
  html body #dc-root .dt-kanban-folha { height: 100% !important; border: 0 !important; }
  html body #dc-root .dt-kanban-topo-acoes > .dt-kanban-botao span { display: none; }
}

/* O rodapé dos modais flutuantes (Nova rotina, Alarme, Nova ideia…): a linha de
   Cancelar/Salvar era um par de botões soltos com margem no canto. Vira banda
   de 64px colada nas três bordas, com as ações em células divididas por fio —
   a mesma banda de rodapé dos outros modais do projeto. */
html body #dc-root .dt-floating-modal:not(.dtm) > :last-child:has(> button + button) {
  min-height: 64px;
  display: flex !important; align-items: stretch !important; justify-content: flex-end !important; gap: 0 !important;
  margin: 24px 0 0 !important; padding: 0 !important;
  border-top: 1px solid var(--line) !important;
}
html body #dc-root .dt-floating-modal:not(.dtm) > :last-child:has(> button + button) > button {
  height: auto !important; min-height: 64px !important; flex: none;
  margin: 0 !important; padding: 0 28px !important;
  border: 0 !important; border-left: 1px solid var(--line) !important; border-radius: 0 !important;
  background: transparent !important; color: var(--text) !important; box-shadow: none !important;
  font: 600 13px/1 var(--font-ui) !important;
}
html body #dc-root .dt-floating-modal:not(.dtm) > :last-child:has(> button + button) > button:last-child {
  background: var(--text) !important; color: var(--bg) !important;
}
html body #dc-root .dt-floating-modal:not(.dtm) > :last-child:has(> button + button) > button:not(:last-child):hover { background: var(--surface-2) !important; }

/* --- Modo foco: o relógio no idioma do projeto ------------------------------
 * O anel de 180px com o tempo dentro é do desenho antigo — é a única peça
 * redonda que sobrou nos modais, e num app de raio 0 ela fica deslocada. O anel
 * sai; ficam o tempo em 46px com números de mesma largura e o estado embaixo,
 * numa chapa de 132px. As duas fileiras de escolha (Pomodoro/Personalizado e
 * 25/05/15) já são células coladas, e "Iniciar foco" vira a banda de 64px
 * colada nas bordas, como em todo rodapé de ação do projeto. */
html body #dc-root .dt-floating-modal:not(.dtm) svg[viewBox="0 0 130 130"] { display: none !important; }
html body #dc-root .dt-floating-modal:not(.dtm) > div:has(> div > svg[viewBox="0 0 130 130"]) {
  min-height: 132px;
  display: flex !important; align-items: center !important; justify-content: center !important;
  border: 1px solid var(--line) !important; background: var(--chapa) !important;
}
html body #dc-root .dt-floating-modal:not(.dtm) > div > div:has(> svg[viewBox="0 0 130 130"]) {
  width: auto !important; height: auto !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
}
html body #dc-root .dt-floating-modal:not(.dtm) div:has(> svg[viewBox="0 0 130 130"]) > div {
  position: static !important; transform: none !important;
  display: flex !important; flex-direction: column !important; align-items: center !important; gap: 8px !important;
}
html body #dc-root .dt-floating-modal:not(.dtm) div:has(> svg[viewBox="0 0 130 130"]) > div > span:first-child {
  font: 700 46px/1 var(--font-ui) !important; letter-spacing: -1.5px !important; color: var(--text) !important;
  font-variant-numeric: tabular-nums;
}
html body #dc-root .dt-floating-modal:not(.dtm) div:has(> svg[viewBox="0 0 130 130"]) > div > span:last-child {
  font: 400 12.5px/1 var(--font-ui) !important; color: var(--text-2) !important;
}
/* A ação única no pé também é banda colada. */
html body #dc-root .dt-floating-modal:not(.dtm) > button:last-child {
  min-height: 64px !important; height: auto !important; width: 100% !important;
  display: flex !important; align-items: center !important; justify-content: center !important; gap: 9px !important;
  margin: 24px 0 0 !important; padding: 0 24px !important;
  border: 0 !important; border-top: 1px solid var(--line) !important; border-radius: 0 !important;
  background: var(--text) !important; color: var(--bg) !important; box-shadow: none !important;
  font: 600 13.5px/1 var(--font-ui) !important;
}

/* --- Compartilhar ambiente: o último diálogo do desenho antigo ---------------
 * Vinha com raio 20, fechar redondo de 11, rótulo em JetBrains Mono e título em
 * Space Grotesk. Vira o molde dos diálogos do projeto: quadrado, topo de 72px
 * com o fechar numa célula, corpo de 20px e uma fonte só. */
html body .dt-amb-overlay { padding: 20px !important; background: var(--scrim) !important; backdrop-filter: none !important; }
html body .dt-amb-dialogo {
  width: min(560px, 100%) !important;
  border: 1px solid var(--line) !important; border-radius: 0 !important;
  background: var(--bg) !important; color: var(--text) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .22) !important;
  font-family: var(--font-ui) !important;
}
html body .dt-amb-dialogo > header {
  min-height: 72px; align-items: stretch !important; gap: 0 !important;
  padding: 0 0 0 20px !important; border-bottom: 1px solid var(--line) !important;
}
html body .dt-amb-dialogo > header > div:first-child { flex: 1; min-width: 0; align-self: center; }
html body .dt-amb-eyebrow {
  font: 700 10.5px/1 var(--font-ui) !important; letter-spacing: 1.6px !important; text-transform: uppercase;
  color: var(--text-3) !important;
}
html body .dt-amb-dialogo h2 {
  margin: 7px 0 0 !important; font: 700 19px/1 var(--font-ui) !important; letter-spacing: -.4px !important; color: var(--text) !important;
}
html body .dt-app-root .dt-amb-fechar,
html body .dt-amb-fechar {
  width: 72px !important; height: auto !important; align-self: stretch !important;
  border: 0 !important; border-left: 1px solid var(--line) !important; border-radius: 0 !important;
  background: transparent !important; color: var(--text) !important;
}
html body .dt-amb-fechar:hover { background: var(--surface-2) !important; }
html body .dt-amb-corpo { padding: 20px !important; }
html body .dt-amb-corpo label { font: 700 10.5px/1 var(--font-ui) !important; letter-spacing: 1.6px !important; text-transform: uppercase; color: var(--text-3) !important; }
html body .dt-amb-dialogo :is(input, select, textarea) {
  height: 44px !important; border: 1px solid var(--line) !important; border-radius: 0 !important;
  background: var(--bg) !important; color: var(--text) !important; font: 400 13.5px/1 var(--font-ui) !important;
}
html body .dt-amb-dialogo button:not(.dt-amb-fechar) {
  min-height: 44px !important; border-radius: 0 !important; box-shadow: none !important;
  font: 600 13px/1 var(--font-ui) !important;
}
html body .dt-amb-dialogo * { border-radius: 0 !important; }
