/* Estilos base de la tabla tipo TailAdmin adaptada a tu estructura */
/* Solo dentro de .card-table */
.card-table .alg-5 {
  width: 5%;
}
.card-table .alg-10 {
  width: 10%;
}
.card-table .alg-15 {
  width: 15%;
}
.card-table .alg-20 {
  width: 20%;
}
.card-table .alg-25 {
  width: 25%;
}
.card-table .alg-30 {
  width: 30%;
}
.card-table .alg-35 {
  width: 35%;
}
.card-table .alg-40 {
  width: 40%;
}
.card-table .alg-45 {
  width: 45%;
}
.card-table .alg-50 {
  width: 50%;
}
.card-table .alg-55 {
  width: 55%;
}
.card-table .alg-60 {
  width: 60%;
}
.card-table .alg-65 {
  width: 65%;
}
.card-table .alg-70 {
  width: 70%;
}
.card-table .alg-75 {
  width: 75%;
}
.card-table .alg-80 {
  width: 80%;
}
.card-table .alg-85 {
  width: 85%;
}
.card-table .alg-90 {
  width: 90%;
}
.card-table .alg-95 {
  width: 95%;
}
.card-table .alg-100 {
  width: 100%;
}

/* Controla que el texto no desborde las celdas */
.card-table th,
.card-table td {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.card-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.card-table > :not(caption) > * > * {
  vertical-align: middle;
  margin-bottom: 0 !important;
}

.card-table thead {
  background-color: #f1f5f9;
}

.card-table thead th {
  background-color: #fff; /* Gris más fuerte */
  color: #0f172a; /* Casi negro, muy legible */
  padding: 5px 5px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  border-bottom: 1px solid #cbd5e1;
}

.card-table tbody tr {
  border-bottom: 1px solid #e2e8f0;
  transition: background-color 0.2s ease;
}

.card-table tbody tr:hover {
  background-color: #f8fafc;
}

.card-table tbody td {
  padding: 5px 5px;
  font-size: 14px;
  color: #000;
}

.card-table tr td:first-child,
.card-table tr th:first-child {
  padding-left: 0.5rem;
  border-left: 0;
}

.card-table tr td:last-child,
.card-table tr th:last-child {
  padding-right: 0.5rem;
  border-right: 0;
}

.card-table thead tr:first-child,
.card-table tbody tr:first-child,
.card-table tfoot tr:first-child {
  border-top: 0;
}

.card-table thead tr:first-child td,
.card-table thead tr:first-child th,
.card-table tbody tr:first-child td,
.card-table tbody tr:first-child th,
.card-table tfoot tr:first-child td,
.card-table tfoot tr:first-child th {
  border-top: 0;
}

/* Botones de acciones */
.card-table .btn-list {
  --tblr-list-gap: 0.5rem;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--tblr-list-gap);
}

.card-table .flex-nowrap {
  flex-wrap: nowrap !important;
}

/* Responsive para pantallas chicas */
@media (max-width: 767.98px) {
  .table-mobile-md {
    display: block;
  }
  .table-mobile-md thead {
    display: none;
  }
  .table-mobile-md tbody,
  .table-mobile-md tr {
    display: flex;
    flex-direction: column;
  }
  .table-mobile-md td {
    display: block;
    padding: 0.25rem 0.25rem !important;
    border: none;
    color: var(--tblr-body-color, #475569) !important;
  }
  .table-mobile-md td[data-label]:before {
    font-size: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1rem;
    color: var(--tblr-secondary, #64748b);
    content: attr(data-label);
    display: block;
    margin-bottom: 0.25rem;
  }
  .table-mobile-md tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
  }
  .table-mobile-md .btn {
    display: block;
    margin-top: 0.25rem;
  }
}
