/* Régua de prazos, filtros e tabela de documentos. */

/* Régua de prazos: a composição da carteira de documentos. */
.overview {
  display: grid;
  gap: 16px;
  margin-bottom: 36px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.overview-total {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}
.overview-number {
  color: var(--ink);
  font-size: 34px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
}
.deadline-bar {
  display: flex;
  gap: 3px;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}
.deadline-bar span {
  min-width: 0;
  transition: flex-grow 400ms ease;
}
.deadline-bar span:first-child {
  border-radius: 999px 0 0 999px;
}
.deadline-bar span:last-child {
  border-radius: 0 999px 999px 0;
}
.bar-overdue {
  background: var(--overdue);
}
.bar-soon {
  background: var(--soon);
}
.bar-ok {
  background: var(--ok);
}
.bar-none {
  background: var(--line-strong);
}
.overview-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}
.overview-legend > div {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.overview-legend > div::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.legend-overdue::before {
  background: var(--overdue);
}
.legend-soon::before {
  background: var(--soon);
}
.legend-ok::before {
  background: var(--ok);
}
.legend-none::before {
  background: var(--line-strong);
}

/* O painel é papel, com fio fino. O azul fica só na linha selecionada. */
#overview,
#archive-facts,
#archive-panel {
  gap: 3px;
  padding: 8px;
}
.archive-overview .exec-lead:empty,
.archive-overview .exec-lead[hidden] {
  display: none;
}
#overview .deadline-bar {
  height: 6px;
  margin: 6px 12px 0;
  gap: 2px;
  background: var(--menu-field);
}
.exec-label {
  margin: 0;
  padding: 0 12px;
  color: var(--menu-muted);
  font-size: 12px;
  font-weight: 500;
}
.exec-lead {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.exec-fact {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 12px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--menu-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.exec-fact::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background: currentColor;
  opacity: 0.8;
  -webkit-mask: var(--menu-icon) center / contain no-repeat;
  mask: var(--menu-icon) center / contain no-repeat;
}
.exec-fact.is-overdue { --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 8a4.5 4.5 0 0 1 9 0v3.2l1.5 2.6H4l1.5-2.6z'/%3E%3Cpath d='M8.3 16.3a1.9 1.9 0 0 0 3.4 0'/%3E%3C/svg%3E"); }
.exec-fact.is-soon { --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10' cy='10.5' r='6.5'/%3E%3Cpath d='M10 7v3.7l2.4 1.6M7.5 2.5h5'/%3E%3C/svg%3E"); }
.exec-fact.is-boxes { --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='3.5' width='15' height='4' rx='1.2'/%3E%3Cpath d='M4 7.5v8A1.5 1.5 0 0 0 5.5 17h9a1.5 1.5 0 0 0 1.5-1.5v-8M8 11h4'/%3E%3C/svg%3E"); }
.exec-fact.is-documents { --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 2.5h6.5L15 6v11.5H5z'/%3E%3Cpath d='M11.5 2.5V6H15M7.5 10h5M7.5 13h3.5'/%3E%3C/svg%3E"); }
.exec-fact.is-loans { --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10' cy='7' r='3'/%3E%3Cpath d='M4.5 16.5a5.5 5.5 0 0 1 11 0'/%3E%3C/svg%3E"); }
.exec-fact.is-trash { --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 5.5h13M8 5.5V3.8h4v1.7M5.3 5.5l.8 10.7a1 1 0 0 0 1 .9h5.8a1 1 0 0 0 1-.9l.8-10.7M8.5 9v5M11.5 9v5'/%3E%3C/svg%3E"); }
.exec-fact.is-eliminations { --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 2.5h6.5L15 6v11.5H5z'/%3E%3Cpath d='M8 12.5h4'/%3E%3C/svg%3E"); }
.exec-fact.is-ended { --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='4' width='13' height='12.5' rx='1.6'/%3E%3Cpath d='M3.5 8h13M7 2.8v2.6M13 2.8v2.6M8.2 11.2l3.6 3.6M11.8 11.2l-3.6 3.6'/%3E%3C/svg%3E"); }
.exec-fact.is-none { --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='4' width='13' height='12.5' rx='1.6'/%3E%3Cpath d='M3.5 8h13M7 2.8v2.6M13 2.8v2.6M7.2 12.2h5.6'/%3E%3C/svg%3E"); }
.exec-fact.is-overdue {
  position: relative;
}
.exec-fact.is-overdue::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 25px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--menu-alert);
  box-shadow: 0 0 0 2px var(--surface);
}
.exec-fact.is-overdue[aria-pressed="true"]::after {
  box-shadow: 0 0 0 2px var(--brand);
}
.exec-fact-label {
  flex: 1;
  min-width: 0;
}
.exec-fact-count {
  color: var(--menu-muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.exec-fact:hover {
  background: var(--menu-hover);
}
.exec-fact[aria-pressed="true"],
.exec-fact[aria-pressed="true"]:hover {
  background: var(--brand);
  box-shadow: none;
  color: var(--on-brand);
  font-weight: 600;
}
.exec-fact[aria-pressed="true"] .exec-fact-count {
  color: color-mix(in srgb, var(--on-brand) 85%, transparent);
}
.exec-fact[aria-pressed="true"]::before {
  opacity: 1;
  background: var(--on-brand);
}
.exec-clear {
  margin: 0;
  padding: 8px 12px 4px;
  color: var(--menu-muted);
  font-size: 14px;
}
.exec-fact.is-mine {
  --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10' cy='7' r='3'/%3E%3Cpath d='M4.5 16.5a5.5 5.5 0 0 1 11 0'/%3E%3C/svg%3E");
}
.exec-rest {
  margin: 0;
  padding: 0 12px;
  color: var(--menu-muted);
  font-size: 13px;
  line-height: 1.45;
}

.overview-legend dd {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

/* Lista */
.list-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.list-heading-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.list-heading h2 {
  font-size: 18px;
}
.result-count {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 160px;
}
.search-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--faint);
  transform: translateY(-50%);
  pointer-events: none;
}
.search-input,
.category-select {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--surface);
  font-size: 14px;
}
.search-input {
  width: 100%;
  padding: 0 12px 0 36px;
  text-overflow: ellipsis;
}
.search-input::placeholder {
  color: var(--faint);
}
/* Os filtros não crescem com o nome mais longo da lista (uma unidade de
   nome comprido espremia a busca e a tabela). */
.category-select {
  min-width: 170px;
  max-width: 240px;
  padding: 0 10px;
  text-overflow: ellipsis;
}
.list-frame {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.list-more {
  display: flex;
  justify-content: center;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
}
.list-more[hidden] {
  display: none;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th {
  height: 42px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
td {
  padding: 14px 16px;
  vertical-align: middle;
}
tbody tr + tr td {
  border-top: 1px solid var(--line);
}
tbody tr:hover {
  background: var(--surface-2);
}
.doc-name {
  display: block;
  max-width: 340px;
  /* Nomes sem espaços (como os de arquivo) quebram em qualquer ponto, para
     não alargar o cartão nem a página no celular. */
  overflow-wrap: anywhere;
  font-weight: 600;
}
/* O nome do documento não se espreme demais, mas cabe em telas médias. */
tbody td:first-child {
  min-width: 200px;
}
/* O nome do documento é um botão que abre o visualizador. */
.doc-open {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  text-align: left;
}
.doc-open:hover {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.doc-category,
.date-days {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}
.doc-number {
  display: inline-block;
  margin-right: 8px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* Resumo dos arquivos: nome do principal e quantidade de anexos. */
.doc-files {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
/* Cada documento principal numa linha, numa lista com rolagem própria a
   partir de umas 5 linhas; a contagem de anexos vem depois. */
.doc-file-list {
  display: flex;
  flex-basis: 100%;
  flex-direction: column;
  max-height: calc(5 * 1.6em);
  overflow-y: auto;
  overscroll-behavior: contain;
  line-height: 1.6;
}
/* Nome de arquivo que abre o visualizador já nele. */
.doc-file-open {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  text-align: left;
  overflow-wrap: anywhere;
}
.doc-file-open:hover {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.doc-file-open:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}
.doc-file-tag {
  flex: none;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}
.doc-file-list:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.doc-files-count {
  padding: 0 7px;
  /* Pode quebrar em duas linhas no celular: canto suave, não pílula. */
  border-radius: var(--radius-small);
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}
/* Pasta do documento, ao lado da categoria. */
.doc-folder {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 10px;
}
.doc-folder::before {
  content: "";
  width: 12px;
  height: 11px;
  background: currentColor;
  opacity: 0.7;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 14'%3E%3Cpath d='M1.5 2.5A1.5 1.5 0 0 1 3 1h3.3l1.6 1.8H13a1.5 1.5 0 0 1 1.5 1.5v7.2A1.5 1.5 0 0 1 13 13H3a1.5 1.5 0 0 1-1.5-1.5z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 14'%3E%3Cpath d='M1.5 2.5A1.5 1.5 0 0 1 3 1h3.3l1.6 1.8H13a1.5 1.5 0 0 1 1.5 1.5v7.2A1.5 1.5 0 0 1 13 13H3a1.5 1.5 0 0 1-1.5-1.5z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.no-units th:nth-child(2),
.no-units td:nth-child(2) {
  display: none;
}
/* A unidade quebra a linha e o responsável (muitas vezes um e-mail, sem
   espaços) termina em reticências: sobra espaço para o documento. */
.unit-cell,
.owner-cell {
  min-width: 96px;
  color: var(--muted);
}
.owner-cell {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.actions-cell {
  padding-left: 4px;
  padding-right: 8px;
}
.date-cell {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.status-ok {
  background: var(--ok-soft);
  color: var(--ok);
}
.status-soon {
  background: var(--soon-soft);
  color: var(--soon);
}
.status-overdue {
  background: var(--overdue-soft);
  color: var(--overdue);
}
.status-none {
  background: var(--surface-2);
  color: var(--muted);
}
.date-none {
  color: var(--faint);
}
.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}
/* Menu "⋯" com Histórico, Editar e Excluir. */
.row-menu {
  position: relative;
}
.row-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  font-size: 18px;
  line-height: 1;
  list-style: none;
}
.row-menu-toggle::-webkit-details-marker {
  display: none;
}
.row-menu[open] .row-menu-toggle {
  background: var(--brand-soft);
}
.row-menu-list {
  position: fixed;
  z-index: 50;
  display: grid;
  min-width: 150px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface);
  box-shadow: var(--shadow-dialog);
}
/* Invisível até ser posicionado junto ao botão (evita piscar fora do lugar). */
.row-menu-list:not([data-placed]) {
  visibility: hidden;
}
.row-menu-item {
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  text-align: left;
}
.row-menu-item:hover,
.row-menu-item:focus-visible {
  background: var(--surface-2);
}
.row-menu-item.delete {
  color: var(--overdue);
}
.row-menu-item:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}
.row-action {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  font-size: 13px;
  font-weight: 550;
}
.row-action:hover {
  background: var(--brand-soft);
}
.row-action.delete {
  color: var(--muted);
}
.row-action.delete:hover {
  background: var(--overdue-soft);
  color: var(--overdue);
}
.row-action:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}
.empty-state {
  padding: 56px 24px;
  text-align: center;
}
.empty-symbol {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 22px;
}
.empty-state h3 {
  margin-bottom: 6px;
  font-size: 16px;
}
.empty-state p {
  max-width: 42ch;
  margin: 0 auto 20px;
  color: var(--muted);
}

@media (max-width: 1279px) {
  .overview {
    padding: 18px;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .search-wrap {
    flex-basis: 100%;
  }
  .category-select {
    flex: 1;
    min-width: 0;
    max-width: none;
  }
  .list-frame {
    overflow: visible;
    border: 0;
    background: transparent;
  }
  table,
  tbody {
    display: block;
  }
  thead {
    display: none;
  }
  tbody {
    display: grid;
    gap: 10px;
  }
  tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
  }
  tbody tr:hover {
    background: var(--surface);
  }
  tbody tr + tr td {
    border-top: 0;
  }
  td {
    padding: 0;
  }
  /* Documento | Unidade | Responsável | Vencimento | Situação | Ações */
  td:nth-child(1) {
    grid-column: 1 / -1;
  }
  td:nth-child(2),
  td:nth-child(3) {
    grid-column: 1 / -1;
    font-size: 13px;
  }
  td:nth-child(4) {
    grid-column: 1;
  }
  td:nth-child(5) {
    grid-column: 2;
    grid-row: 4;
    align-self: start;
  }
  td:nth-child(6) {
    grid-column: 1 / -1;
    padding-top: 6px;
    border-top: 1px solid var(--line);
  }
  .unit-cell:empty {
    display: none;
  }
  .unit-cell::before {
    content: "Unidade: ";
  }
  /* No cartão há largura de sobra: o responsável aparece inteiro. */
  .owner-cell {
    max-width: none;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .owner-cell::before {
    content: "Responsável: ";
  }
  .doc-name {
    max-width: none;
  }
  .row-actions {
    justify-content: flex-start;
  }
  .empty-state {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
  }
}

@media (prefers-reduced-motion: reduce) {
  .deadline-bar span {
    transition: none;
  }
}

/* Celular: resumo em grade, busca e filtros em coluna, e cada documento
   num cartão com a situação no canto e as ações na mesma linha da data. */
@media (max-width: 720px) {
  .overview {
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px;
  }
  .overview-number {
    font-size: 28px;
  }
  .overview-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
  }
  .list-heading {
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }
  .list-heading-actions {
    flex-wrap: wrap;
    width: 100%;
    gap: 8px;
  }
  .list-heading-actions .button {
    flex: 1 1 auto;
    min-height: 40px;
    white-space: normal;
    text-align: center;
  }
  .list-heading-actions .result-count {
    flex: 1 1 100%;
    margin-left: 0;
  }
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .search-wrap,
  .category-select {
    width: 100%;
    max-width: none;
  }
  .search-input,
  .category-select {
    min-height: 44px;
    font-size: 16px;
  }
  tbody tr {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "doc status"
      "unit unit"
      "owner owner"
      "when when"
      "actions actions";
    gap: 6px 10px;
    padding: 12px 14px;
  }
  td:nth-child(1) {
    grid-area: doc;
  }
  td:nth-child(2),
  td:nth-child(3) {
    grid-column: auto;
  }
  td:nth-child(2) {
    grid-area: unit;
  }
  td:nth-child(3) {
    grid-area: owner;
  }
  td:nth-child(4) {
    grid-area: when;
  }
  td:nth-child(5) {
    grid-area: status;
    grid-row: auto;
    align-self: start;
    justify-self: end;
  }
  td:nth-child(6) {
    grid-area: actions;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }
  .date-cell {
    white-space: normal;
  }
  .row-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 4px;
  }
  .row-action {
    min-height: 40px;
  }
  .empty-state {
    padding: 36px 16px;
  }
}

.trash-note {
  margin: 0;
  padding: 14px 16px 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
#trash-table .trash-item strong {
  display: block;
  overflow-wrap: anywhere;
}
#trash-table .trash-when,
#trash-table .trash-left {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.trash-kind,
.trash-detail {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.trash-detail {
  margin-top: 2px;
}

/* A lista de documentos vira cartão abaixo de 1280px e esconde o cabeçalho.
   A lixeira tem outras colunas: cada uma ganha o próprio lugar e o rótulo. */
@media (max-width: 1279px) {
  .trash-note {
    padding: 0 2px 12px;
  }
  #trash-table tbody tr {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "item"
      "place"
      "when"
      "left"
      "actions";
  }
  #trash-table td:nth-child(1) {
    grid-area: item;
  }
  #trash-table td:nth-child(2),
  #trash-table td:nth-child(3),
  #trash-table td:nth-child(4) {
    font-size: 13px;
  }
  #trash-table td:nth-child(2) {
    grid-area: place;
  }
  #trash-table td:nth-child(3) {
    grid-area: when;
  }
  #trash-table td:nth-child(4) {
    grid-area: left;
  }
  #trash-table td:nth-child(5) {
    grid-area: actions;
    align-self: stretch;
    justify-self: stretch;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }
  #trash-table .trash-place:empty {
    display: none;
  }
  #trash-table .trash-place::before {
    content: "Onde estava: ";
  }
  #trash-table .trash-when::before {
    content: "Excluído: ";
  }
  #trash-table .trash-left::before {
    content: "Prazo: ";
  }
}

/* Marcar documentos para transferir o responsável em lote. */
.row-select {
  width: 16px;
  height: 16px;
  margin: 0 8px 0 0;
  vertical-align: -3px;
  cursor: pointer;
}
.selection-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 12px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  font-size: 13px;
}
.selection-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.selection-count {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.selection-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.transfer-summary {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-small);
  background: var(--brand-soft);
  color: var(--ink);
  font-size: 14px;
}
.transfer-summary:empty {
  display: none;
}
.transfer-summary.error {
  background: var(--overdue-soft);
  color: var(--overdue);
}
@media (max-width: 720px) {
  .row-select {
    width: 20px;
    height: 20px;
  }
  .selection-actions {
    width: 100%;
    margin-left: 0;
  }
  .selection-actions .button {
    flex: 1 1 auto;
    min-height: 40px;
  }
}
