/* ======== FORM CLIENTES ======== */
.cliente-form {
  margin-top: 15px;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #dcdfe3;
  background: #fdfdfd;
  color: #333;
  font-size: 14px;
  transition: all 0.25s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #007bff;
  box-shadow: 0 0 6px rgba(0, 123, 255, 0.25);
  outline: none;
}

/* ======== CAMPOS SOLO LECTURA ======== */
.readonly {
  background: #f2f3f5;
  color: #777;
  border: 1px solid #ccc;
  cursor: not-allowed;
}

/* ======== VALIDACIÓN ======== */
input:invalid {
  border-color: #e74c3c;
}

input:valid {
  border-color: #28a745;
}

/* ======== INPUT CON DV ======== */
.input-with-dv {
  display: flex;
  align-items: center;
}

.input-with-dv input[type="text"] {
  flex: 1;
}

.dv-field {
  display: none;
  align-items: center;
  margin-left: 5px;
}

.dv-field input {
  width: 60px;
  text-align: center;
}

/* ======== BOTONES ======== */
.btn-primary {
  padding: 12px 22px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(90deg, #28a745, #218838);
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(90deg, #218838, #1e7e34);
  transform: scale(1.03);
}

.btn-action {
  color: #007bff;
  text-decoration: none;
  font-weight: bold;
}

.btn-action:hover {
  text-decoration: underline;
}

/* ======== BOTÓN VOLVER ======== */
.btn-volver {
  background: #6c757d;
  color: #fff;
  font-weight: bold;
  border-radius: 6px;
  padding: 8px 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 15px;
}

.btn-volver:hover {
  background: #5a6268;
  text-decoration: none;
}

/* ======== CARD DEL FORMULARIO ======== */
.card {
  background: #f8fbff;
  border-radius: 12px;
  padding: 25px 30px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  margin-top: 25px;
  border: 1px solid #e3e6ea;
}

/* ======== TÍTULOS ======== */
.page-title {
  font-size: 1.8rem;
  color: #2c3e50;
  margin-bottom: 15px;
  text-align: center;
  font-weight: bold;
}

.card h2 {
  color: #2c3e50;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
}

/* ======== GRID DE FORMULARIO ======== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px 20px;
}

/* ======== CAMPO FULL WIDTH ======== */
.form-group.full-width {
  grid-column: 1 / -1;
}

/* ======== TABLA DE CLIENTES ======== */
.styled-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  background-color: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  font-size: 14px;
}

.styled-table thead {
  background: linear-gradient(90deg, #007bff, #0056b3);
  color: white;
}

.styled-table th, .styled-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #e0e6ed;
}

.styled-table tr:hover {
  background-color: #f8faff;
}

.styled-table td {
  color: #333;
}

/* ======== PAGINACIÓN ======== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 15px;
  gap: 8px;
}

.page-link,
.page-current {
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid #ccc;
  font-weight: 500;
  transition: all 0.3s ease;
  color: #333;
  background-color: #fff;
}

.page-link:hover {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.page-current {
  background: #007bff;
  color: white;
  font-weight: bold;
  border-color: #007bff;
}

/* ======== RESPONSIVE ======== */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 10px;
  }

  .styled-table thead {
    display: none;
  }

  .styled-table tr {
    display: block;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
  }

  .styled-table td {
    display: flex;
    justify-content: space-between;
    padding: 8px;
  }

  .styled-table td::before {
    content: attr(data-label);
    font-weight: bold;
    color: #007bff;
  }
}

/* ======== CONTENEDOR GENERAL ======== */
.dashboard-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 30px;
  box-sizing: border-box;
}

/* ======== CARD CONTENEDOR DE LA TABLA ======== */
.card {
  background: #ffffff;
  border-radius: 14px;
  padding: 25px 25px 35px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  margin-top: 25px;
  border: 1px solid #e3e6ea;
  overflow-x: auto; /* 💡 permite scroll horizontal cuando haya muchas columnas */
}

/* ======== TABLA AJUSTADA AL CONTENEDOR ======== */
.styled-table {
  width: 100%;
  min-width: 900px; /* 💡 evita que se comprima demasiado en pantallas pequeñas */
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.styled-table thead {
  background: linear-gradient(90deg, #007bff, #0056b3);
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.styled-table th,
.styled-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e5e8ef;
  vertical-align: middle;
}

.styled-table tbody tr:hover {
  background-color: #f8faff;
  transition: 0.25s ease-in-out;
}

/* ======== AJUSTE DE ACCIONES ======== */
.acciones-flex {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.btn-icon:hover {
  transform: scale(1.1);
}

.btn-icon.editar { background: #ffc107; }
.btn-icon.reserva { background: #28a745; }
.btn-icon.factura { background: #17a2b8; }

/* ======== BADGES ======== */
.badge-tipo {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.75rem;
  color: #fff;
  text-transform: uppercase;
}

.badge-tipo.NATURAL { background: #6c63ff; }
.badge-tipo.JURIDICA { background: #00b894; }

/* ======== EMAILS ======== */
.email-link {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

.email-link:hover {
  text-decoration: underline;
}

/* ======== PAGINACIÓN AJUSTADA ======== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.page-link,
.page-current {
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid #ccc;
  font-weight: 500;
  transition: all 0.3s ease;
  color: #333;
  background-color: #fff;
}

.page-link:hover {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.page-current {
  background: #007bff;
  color: white;
  font-weight: bold;
  border-color: #007bff;
}

/* ======== RESPONSIVE OPTIMIZADO ======== */
@media (max-width: 992px) {
  .dashboard-container {
    padding: 0 12px;
  }

  .card {
    padding: 20px;
  }

  .styled-table {
    min-width: 750px;
  }
}

@media (max-width: 768px) {
  .styled-table {
    min-width: 650px;
  }
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 20px 0;
}

.page-number, .page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 6px;
  border-radius: 50%;
  border: 1px solid #d3d9df;
  background: #ffffff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}

.page-number:hover, .page-btn:hover {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.page-number.active {
  background: #007bff;
  color: white;
  font-weight: bold;
  border-color: #007bff;
}

.rpp-form {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-bottom: 15px;
  font-size: 14px;
}
.rpp-form select {
  padding: 4px 6px;
  border-radius: 6px;
}


.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.page-number,
.page-btn {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #d0d7de;
  background: #fff;
  color: #0d6efd;
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.page-number:hover,
.page-btn:hover {
  background: #0d6efd;
  color: #fff;
  border-color: #0d6efd;
}

.page-number.active {
  background: #0d6efd;
  color: #fff;
  border-color: #0d6efd;
  font-weight: bold;
}

.page-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.ellipsis {
  padding: 6px 10px;
  color: #6c757d;
  font-size: 1rem;
}

