/* O app Tarefas e a peça de Tarefas da área de trabalho (a de Indicadores fica em metricas.css). Materiais do sistema (cosmos.css). */

.janela.j-tarefas:not(.cheia) { max-width: 820px; }
.tf { flex: 1; min-height: 0; display: grid; grid-template-columns: 196px minmax(0, 1fr); }
.tf > * { min-width: 0; min-height: 0; }
.tf-lado { display: flex; flex-direction: column; gap: 4px; padding: 2px 10px 12px; overflow-y: auto; }
.tf-lista { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 34px; padding: 4px 8px; border-radius: 7px; text-align: left; font-size: 14px; color: var(--tinta-2); transition: background-color .14s ease, color .14s ease; }
.tf-lista .ico { color: var(--laranja-claro); }
.tf-lista span { flex: 1; }
.tf-lista small { font-size: 12px; color: var(--tinta-3); }
.tf-lista.on { color: var(--tinta); background: rgba(var(--f), .13); }
.tf-centro { display: flex; flex-direction: column; margin: 0 10px 10px 0; border-radius: 8px; background: var(--poco); overflow: hidden; }
.tf-topo { flex: none; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 12px 0 18px; }
.tf-topo h2 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.tf-rolo { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 10px 8px; }
.tf-rolo h3 { margin: 14px 8px 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--tinta-3); }
.tf-rolo h3:first-child { margin-top: 4px; }
.tf-vazio { padding: 48px 0; text-align: center; font-size: 14px; color: var(--tinta-3); }
.tf-tarefa { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 3px 8px; border-radius: 7px; transition: background-color .14s ease; }
.tf-marca { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; }
.tf-marca i { display: block; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.500px rgba(var(--f), .45); transition: background-color .16s ease, box-shadow .16s ease, transform .16s var(--ease-out); }
.tf-marca:active i { transform: scale(.86); }
.tf-tarefa.feita .tf-marca i, .w-tarefa.feita .tf-marca i { background: var(--laranja) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.400' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6.500 12.500 3.500 3.500 7.500-8'/%3E%3C/svg%3E") center / 13px no-repeat; box-shadow: none; }
.tf-titulo { flex: 1; min-width: 0; padding: 4px 0; font-size: 15px; overflow-wrap: anywhere; cursor: text; border-radius: 4px; }
.tf-tarefa.feita .tf-titulo { color: var(--tinta-3); text-decoration: line-through; }
.tf-campo { flex: 1; min-width: 0; height: 30px; padding: 0 8px; border: 0; border-radius: 6px; font-size: 15px; color: var(--tinta); background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 1px rgba(var(--f), .14); }
.tf-data { flex: none; display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: 6px; font-size: 12.5px; color: var(--tinta-2); background: rgba(var(--f), .08); cursor: pointer; transition: background-color .14s ease, opacity .14s ease; }
.tf-data[aria-expanded="true"], .tf-data:focus-visible { outline: none; opacity: 1; color: var(--tinta); background: rgba(var(--f), .16); }
.tf-data.vazia { color: var(--tinta-3); background: none; opacity: 0; }
.tf-tarefa.atrasada .tf-data { color: var(--erro); }
.tf-apagar { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; color: var(--tinta-3); opacity: 0; transition: opacity .14s ease, background-color .14s ease; }
.tf-tarefa:focus-within .tf-apagar, .tf-tarefa:focus-within .tf-data.vazia, .tf-data.vazia[aria-expanded="true"] { opacity: 1; }
.tf-nova { flex: none; display: flex; align-items: center; gap: 10px; margin: 0 10px 10px; height: 42px; padding: 0 12px; border-radius: 8px; background: rgba(var(--f), .07); }
.tf-nova-mais { display: grid; place-items: center; width: 22px; color: var(--laranja-claro); }
.tf-nova input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; font-size: 15px; background: none; box-shadow: none; }
@media (hover: hover) and (pointer: fine) {
  .tf-lista:not(.on):hover, .tf-tarefa:hover { background: rgba(var(--f), .06); }
  .tf-tarefa:hover .tf-apagar, .tf-tarefa:hover .tf-data.vazia { opacity: 1; }
  .tf-data:hover { color: var(--tinta); background: rgba(var(--f), .14); }
  .tf-apagar:hover { background: rgba(var(--f), .12); color: var(--erro); }
  .tf-marca:hover i { box-shadow: inset 0 0 0 1.500px var(--laranja); }
}
:root[data-tema="claro"] .janela .tf-campo { background: #fff; }

/* ------------------------------------------------------------ a peça de tarefas da área de trabalho */
.w-tarefas-lista { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 -6px; }
.w-tarefa { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 1px 6px; border-radius: 6px; }
.w-tarefa .tf-marca { width: 24px; height: 24px; }
.w-tarefa span { flex: 1; min-width: 0; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-tarefa.feita span { color: var(--tinta-3); text-decoration: line-through; }
.w-tarefa small { flex: none; font-size: 12px; color: var(--erro); }
.w-tarefas-nova { flex: none; margin-top: 6px; }
.w-tarefas-nova input { width: 100%; height: 30px; padding: 0 9px; border: 0; border-radius: 6px; font-size: 14px; color: var(--tinta); background: rgba(var(--f), .09); box-shadow: none; }
.w-tarefas-nova input::placeholder, .tf-nova input::placeholder { color: var(--tinta-3); opacity: 1; }
.w-solto .w-tarefas-nova input { text-shadow: none; }

@media (max-width: 860px) {
  .tf { grid-template-columns: minmax(0, 1fr); }
  .tf > * { grid-area: 1 / 1; }
  .tf[data-vista="tarefas"] .tf-lado, .tf[data-vista="listas"] .tf-centro { display: none; }
  .tf-centro { margin: 0; border-radius: 0; background: none; }
  .tf-lista { min-height: 46px; font-size: 16px; }
  .tf-tarefa { min-height: 48px; }
  .tf-marca { width: 38px; height: 38px; }
  .tf-marca i { width: 22px; height: 22px; }
  .tf-titulo, .tf-nova input, .tf-campo { font-size: 16px; }
  .tf-data.vazia, .tf-apagar { opacity: 1; }
  .tf-apagar { width: 38px; height: 38px; }
  .tf-data { height: 36px; }
  .tf-nova { height: 48px; margin-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .w-tarefa .tf-marca { width: 36px; height: 36px; }
  .w-tarefas-nova input { height: 40px; font-size: 16px; }
}
