/* ==========================================================================
   Visualização em Lista Detalhada (Windows Explorer style)
   ========================================================================== */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  user-select: none;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

thead th {
  position: sticky;
  top: 3.5rem;
  background: var(--surface);
  z-index: 5;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mid);
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.sort-th-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-mid);
  padding: 0.25rem 0.45rem;
  border-radius: var(--r-sm);
  transition: all 0.1s;
}

.sort-th-btn:hover {
  background: var(--hover);
  color: var(--ink);
}

.sort-th-btn[data-on="1"] {
  color: var(--accent-ink);
}

tbody tr {
  cursor: default;
  transition: background 0.08s ease;
}

tbody td {
  padding: 0 0.75rem;
  height: 2.85rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
  color: var(--ink);
}

tbody tr:hover td {
  background: var(--hover);
}

tbody tr[data-sel="1"] td {
  background: var(--sel) !important;
  color: var(--ink);
}

tbody tr[data-drop="1"] td {
  background: var(--accent-soft) !important;
  box-shadow: inset 0 0 0 2px var(--accent);
}

tbody td:first-child {
  border-top-left-radius: var(--r);
  border-bottom-left-radius: var(--r);
}

tbody td:last-child {
  border-top-right-radius: var(--r);
  border-bottom-right-radius: var(--r);
}

/* Coluna de Nome */
.cell-name {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.cell-name .ico {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cell-name .ico svg {
  width: 1.5rem;
  height: 1.5rem;
  display: block;
}

.cell-name .lbl {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 450;
  color: var(--ink);
}

.cell-name .where {
  font-size: 12px;
  color: var(--ink-faint);
  margin-left: 0.35rem;
}

/* Colunas Numéricas e Datas */
.num {
  font-size: 13px;
  color: var(--ink-mid);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Botões de Ação na Linha */
.acts {
  display: flex;
  gap: 0.2rem;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.1s ease;
}

tr:hover .acts,
tr[data-sel="1"] .acts {
  opacity: 1;
}

.iact {
  width: 1.95rem;
  height: 1.95rem;
  border-radius: var(--r-pill);
  color: var(--ink-mid);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
}

.iact:hover {
  background: var(--active);
  color: var(--ink);
}

.iact.danger:hover {
  color: var(--danger);
  background: var(--danger-soft);
}
