.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 13px;
  color: var(--color-text-secondary);
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}

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

.clickable-row {
  cursor: pointer;
  transition: background 0.1s;
}

.clickable-row:hover {
  background: var(--color-bg);
}

.cell-bl {
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 13px;
}

.cell-center {
  text-align: center;
}

/* Stays a real table cell (no display:flex) so its bottom border spans the full row height. */
.cell-actions {
  white-space: nowrap;
}

.cell-actions > * + * {
  margin-left: 6px;
}

.data-table td {
  vertical-align: middle;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-orange {
  background: #ffedd5;
  color: #c2410c;
}

/* "Pagado (manual)" (Phase 13): same status as Pagado, its own colour */
.badge-paid-manual {
  background: #ccfbf1;
  color: #0f766e;
  border: 1px dashed #14b8a6;
}

/* "Solo manuales" sub-chip under Pagado */
.filter-btn.filter-btn--sub {
  font-size: 12px;
  padding: 4px 10px;
  border-style: dashed;
  align-self: center;
}

.filter-btn.filter-btn--sub.active {
  background: #0f766e;
  border-color: #0f766e;
  border-style: solid;
}

.badge-red {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-green {
  background: #dcfce7;
  color: #15803d;
}

.badge-gray {
  background: #f1f5f9;
  color: #475569;
}

.cell-reference {
  font-family: var(--font-sans);
  font-style: italic;
  color: var(--color-text-secondary);
}

.status-filter {
  display: flex;
  gap: 4px;
}

.filter-btn {
  padding: 6px 14px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: all 0.15s;
}

.filter-btn:hover {
  background: var(--color-bg);
}

.filter-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* Shipment list toolbar: status buttons, created-date range, Excel export */
.list-toolbar {
  flex-wrap: wrap;
  gap: 12px 16px;
  justify-content: flex-start;
}

.status-filter {
  flex-wrap: wrap;
}

.date-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.date-filter__field {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.date-filter input {
  padding: 5px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  color: var(--color-text);
}

.date-filter input.input-invalid {
  border-color: var(--color-danger);
}

.date-filter .field-error {
  min-height: 0;
}

/* Phase 14 search box: the toolbar's first row, full width */
.list-search {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
}

.list-search input {
  width: 100%;
  max-width: 520px;
  padding: 7px 34px 7px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--color-text);
}

.list-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  display: none;
}

.list-search input:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: -1px;
}

.list-search__clear {
  position: relative;
  left: -30px;
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: var(--color-text-secondary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.list-search__clear:hover {
  color: var(--color-text);
}

.list-search__clear[hidden] {
  display: none;
}

/* Expired ETA tag (PRD §7.3), in the list's ETA column and the detail info grid */
.eta-expired-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.toolbar-tooltip {
  margin-left: auto;
  display: inline-block;
}

.toolbar-tooltip .btn:disabled {
  pointer-events: none;
}

.data-table tbody tr:hover .cell-bl {
  color: var(--color-primary-dark);
}
