.list-shell > * { min-width: 0; }
.list-shell { max-width: 1200px; margin: 0 auto; padding: 32px 24px 64px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.head-actions { display: flex; gap: 8px; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .k { font-size: 12.5px; color: var(--muted); }
.stat .v { font-family: var(--mono); font-size: 24px; font-weight: 600; margin-top: 2px; }

.login { max-width: 400px; margin: 0 auto; padding: 32px 24px; display: grid; gap: 14px; }
.login h2 { margin: 0; font-size: 19px; }
.login p { margin: 0 0 4px; color: var(--text-2); }

.filters { display: flex; gap: 6px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chip {
  min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--text-2); cursor: pointer; font-size: 13.5px;
}
.chip[aria-pressed='true'] { background: var(--panel-2); color: var(--text); border-color: var(--accent); }
.chip .n { font-family: var(--mono); margin-inline-start: 6px; color: var(--muted); }

.table-wrap { overflow-x: auto; position: relative; }
.qtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.qtable th, .qtable td { text-align: start; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.qtable thead th { font-size: 12.5px; font-weight: 500; color: var(--muted); background: #051636; }
.qtable tbody tr:hover { background: #07173A; }
.qtable .amt { text-align: left; font-family: var(--mono); }
.qtable .client { white-space: normal; min-width: 160px; }
.qtable .client small { display: block; color: var(--muted); font-size: 12.5px; }
.qtable .acts { display: flex; gap: 6px; justify-content: flex-end; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.sent { color: var(--warn); }
.pill.viewed, .pill.seen { color: var(--accent); }
.pill.shared { color: var(--text-2); }
.doc-type { display: block; font-size: 12px; color: var(--muted); }
.pill.signed { color: var(--ok); }
.pill.cancelled { color: var(--muted); }
.pill.expired { color: var(--danger); }
.qtable small.until, .qtable small.by { display: block; color: var(--muted); font-size: 12px; }
.pill small { color: var(--muted); font-weight: 400; }
.empty, .state { color: var(--muted); text-align: center; padding: 32px 16px; margin: 0; }
.state:empty { display: none; }

@media (max-width: 760px) {
  .list-shell { padding: 20px 12px 48px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .stat:last-child { grid-column: 1 / -1; }
  .page-head { flex-wrap: wrap; }
  /* Rows become cards so status and actions stay on screen. */
  .qtable thead { display: none; }
  .qtable, .qtable tbody, .qtable tr, .qtable td { display: block; width: 100%; }
  .qtable tr { padding: 12px 14px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  .qtable td { padding: 0; border: 0; white-space: normal; min-width: 0; }
  .qtable td[data-label]::before { content: attr(data-label); display: block; font-size: 11.5px; color: var(--muted); }
  .qtable .client { min-width: 0; }
  .qtable .amt { text-align: start; }
  .qtable .acts-cell { grid-column: 1 / -1; }
  .qtable .acts { justify-content: flex-start; flex-wrap: wrap; }
}
