.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
}

.table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 2px solid var(--color-gray-80);
}

.table td {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background: var(--color-gray-05);
}

.table a {
  font-weight: 700;
  text-decoration: none;
}

.table a:hover {
  text-decoration: underline;
}

.table .table__muted {
  color: var(--color-text-muted);
  font-size: 13px;
}

.table--compact {
  font-size: 14px;
}

.table--compact th,
.table--compact td {
  padding: var(--space-md) 5px;
}

.table--compact td {
  white-space: nowrap;
}

.cell-trunc {
  display: inline-block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.address-cell {
  white-space: nowrap;
}

.client-cell__name {
  font-weight: 600;
}

.table a.account-cell__name {
  font-weight: inherit;
  color: inherit;
}

.table a.account-cell__name.client-cell__name {
  font-weight: 600;
}

.table a.account-cell__name:hover {
  color: var(--color-primary);
}

.table .admin-icon-link {
  display: inline-flex;
  vertical-align: middle;
  margin-left: var(--space-sm);
  color: var(--color-text-muted);
  opacity: 0;
  transition: opacity 0.12s ease, color 0.12s ease;
}

.table tbody tr:hover .admin-icon-link {
  opacity: 1;
}

.table .admin-icon-link:hover {
  color: var(--color-primary);
}

.suggestion {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  max-width: 260px;
}

.suggestion__label {
  flex: 1;
  min-width: 0;
}

.suggestion__name {
  font-weight: 600;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.suggestion__dot--confident {
  background: var(--color-success-text);
}

.suggestion__dot--unconfident {
  background: var(--color-warning-text);
}

.deadline-hint {
  margin-left: var(--space-xs);
  font-size: 12px;
  white-space: nowrap;
}

.done-check {
  color: var(--color-success-text);
  font-weight: 700;
}

.declined-cross {
  color: var(--color-danger-text);
  font-weight: 700;
}

.ack-cell,
.signoff-cell,
.response-cell {
  white-space: nowrap;
}

.ack-cell form,
.signoff-cell form,
.response-cell form,
.ack-cell .btn,
.signoff-cell .btn,
.response-cell .btn,
.response-cell .split-btn,
.signoff-cell .reply-dot {
  display: inline-flex;
  vertical-align: middle;
}

.peppol-input {
  width: 110px;
  padding: 3px var(--space-sm);
  font-size: 13px;
}

.person-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  vertical-align: 1px;
}

.person-dot--account_manager {
  background: var(--color-primary);
}

.person-dot--success_owner {
  background: var(--color-success);
}

.person-dot--both {
  background: linear-gradient(135deg, var(--color-primary) 50%, var(--color-success) 50%);
}

.people-cell .tooltip + .tooltip {
  margin-left: var(--space-md);
}

.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 10;
  white-space: pre-line;
  width: max-content;
  max-width: 240px;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-text-primary);
  color: var(--color-surface);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-2px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  pointer-events: none;
}

.tooltip:hover::after,
.tooltip:focus-within::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.th-action {
  margin-left: var(--space-sm);
  text-transform: none;
  letter-spacing: normal;
  vertical-align: middle;
}
