/*-------------------------------------------------------*/
input[type="date"],
input[type="datetime-local"],
input[type="time"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}


/* Configuración de fuente y estilos base */
body {
  margin: 0px;
  font-family: Arial, sans-serif;
  background-color: #f4f7f9;
}

/* Pantalla de carga */
#pantalla_de_carga {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  display: flex;
  /* ✅ corregido */
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.img-carga {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

button {
  padding-inline: 0px;
}

/* Clase para mostrar el contenido */
.cargado {
  margin: auto;
  display: block !important;
  width: 100%;
  text-align: center;
  font-size: 0.9em;
}

/* Clase para ocultar la pantalla de carga */
.oculto {
  display: none !important;
}

/* ESTOS SON LOS NUEVO ESTILOS PERO DEL BUSCADOR*/

.el_modal_img {
  position: fixed;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.contener_div {
  max-width: 80%;
  position: relative;
  background: rgb(255, 255, 255);
  padding: 10px;
  border-radius: 10px;
  box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 10px;
}

.imagen_final {
  width: auto;
  max-width: 100%;
  max-height: 500px;
  border-radius: 8px;
}

.la_x_img {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 20px;
    border: 2px solid white;
    background: black;
    cursor: pointer;
    color: white;
    padding: 5px 10px;
    border-radius: 25px;
}

.nav {
    position: fixed;           /* Siempre visibles en pantalla */
    z-index: 9999;             /* Por encima de todo */
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, .5);
    color: #fff;
    border: none;
    font-size: 6em;
    padding: 10px 10px 22px 10px;
    cursor: pointer;
}

.nav.prev { left: 15%; }
.nav.next { right: 15%; }

.titulo_pag {
  color: white;
  background: black;
  font-weight: bold;
  font-size: 1.6em;
  padding: 10px;
  margin-bottom: 5px;
  align-items: center;
  display: flex;
  vertical-align: middle;
  line-height: 1.2;
}

.el_titulo {
  flex: 4;
  text-align: center;
}

.notificaciones {
  width: 36px;
  cursor: pointer;
}

.atras {
  width: 36px;
  cursor: pointer;
  filter: brightness(0) invert(1);
}

.tablatitulo {
  color: black;
  text-align: left;
  font-weight: bold;
  font-size: 1.6em;
  padding: 8px 0px;
  margin-bottom: 5px;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 15px;
}

th,
td {
  border: 1px solid #000;
  padding: 6px 8px;
  text-align: left;
  vertical-align: middle;
  /* centra verticalmente */
}

th {
  background: #33A7C4;
  color: white;
}

.acciones {
  text-align: center;
  padding: 0px;
}

.acciones span {
  /*      margin: 0 3px;*/
  /*      padding: 5px 8px;*/
  cursor: pointer;
  border: none;
  border-radius: 4px;
  /*     color: white;*/
}

.ver {
  display: block;
}

.editar {
  display: block;
}

.eliminar {
  display: block;
}

.paginador {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-collapse: separate;
  gap: 14px;

}

.espaciador {
  width: 50%;
}

.espacer {
  display: none;
}

.paginador {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0px;
  box-sizing: border-box;
}

.paginador button {
  padding: 10px 15px;
  border: none;
  background: #007bff;
  color: white;
  border-radius: 4px;
  cursor: pointer;
}

.paginador button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.paginador select {
  padding: 10px;
  border-radius: 4px;
}

.paginador button,
.paginador select {
  font-size: 1.4em;
}

#buscador {
  width: 100%;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 1.2em;
  padding: 10px 15px;
}

.btnImagenSubir{
  border: none;
  background: none;
  height: 21px;
  cursor: pointer;
}

#btnNuevo {
  color: white;
  border: none;
  cursor: pointer;
  background: #1ED053;
}

#btnNuevo::before {
  content: "NUEVO";
}

#btnNext::before {
  content: "SIGUIENTE";
}

#btnPrev::before {
  content: "ANTERIOR";
  /* muestra el símbolo */
}

.encabezado {
  display: flex;
  justify-content: center;
  /* centra el texto */
  align-items: center;
  /* centra verticalmente */
  position: relative;
}

.encabezado .titulo {
  flex: 1;
  text-align: center;
  font-weight: bold;
  font-size: 1.4em;
}

.encabezado .orden-botones {
  position: relative;
  right: 10px;
}

.encabezado .orden-botones button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 14px;
}

.diver {
  width: 50%;
  position: relative;
}

.checker {
  position: absolute;
  right: 10px;
  top: 10px;
}

#tablaContainer {
  margin: auto;
  text-align: left;
  width: 65%;
  padding: 10px 0;
}

.flecha {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-size: 0.8em;
  /* ajusta tamaño de flecha */
  color: white;
  cursor: pointer;
  line-height: 1;
}

.flecha:hover {
  color: gray;
  /* opcional: efecto hover */
}

.acom_head {
  padding: 10px 0px;
}


table td>div.truncado {
  display: grid;
  align-items: center;
  /* 🔹 centra verticalmente */
  height: 1.2em;
}

/* texto truncado dentro */
table td>div.truncado>span {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  /* número de líneas visibles */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2em;
  white-space: normal;
}

.semi_ocultable {
  border: 1px solid transparent;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  min-width: 30%;
  max-width: 40%;
  max-height: 80%;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  animation: aparecer 0.25s ease;
}

.contenido {
  grid-template-columns: 1fr 1fr;
  display: grid;
  gap: 10px;
}

.fila_contenedor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 12px;
  grid-column: 1 / -1;
}

.contBotones {
  display: flex;
  justify-content: right;
  margin-top: 10px;
  gap: 10px;
}

.btnCerrar {
  background: #ccc;
}

.btnGuardar {
  background: #4CAF50;
  color: #fff;
}

.btnCerrar,
.btnGuardar {
  padding: 8px 16px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
}

.btn_adicional {
  display: none;
}

.valorDiv {
  padding: 6px 0px;
  border-radius: 5px;
}

.div_img {
  display: flex;
  gap: 10px;
  align-items: center;
  border: none;
  padding-left: 0px;
  padding-right: 0px;
}

.text_area {
  min-height: 80px;
  resize: vertical;
}

.input_estilo {
  font-family: sans-serif;
  border: 1px solid rgb(204, 204, 204);
  padding: 6px 10px;
  border-radius: 5px;
}

.cont_princi {
  font-size: 1.2em;
  display: inline-flex;
  gap: 8px;
}

.btn_edit,
.btn_dele {
  padding: 8px 16px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
}

.btn_edit {
  background: #4c5baf;
  color: #fff;
}

.btn_dele {
  background: #b63939;
  color: #fff;
}

.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #3498db;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  animation: spin 1s linear infinite;
}

.mod_carg{
  min-width: 0% !important;
  max-width: 20% !important;
  gap: 20px;
  align-items: center;
  width: auto !important;
}

#img_subs{
  text-align: center;
}

/*ESTOS SON LOS ELEMENTOS RESTANTES*/

  /* Ocultamos el spinner al completar */
  .spinner.done {
    animation: none;
    border-color: #2ecc71;
  }

  .check {
    inset: 0;
    display: none;
  }

  .spinner.done .check {
    display: block;
  }

  .check svg {
    width: 100%;
    height: 100%;
  }

  .check path {
    fill: none;
    stroke: #2ecc71;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: draw 0.6s ease-out forwards;
  }

  /* ESTADO ERROR */
  .spinner.error {
    animation: none;
    border-color: #e74c3c;
  }

  .cross {
    inset: 0;
    display: none;
  }

  .spinner.error .cross {
    display: block;
  }

  .cross svg {
    width: 100%;
    height: 100%;
  }

  .cross line {
    stroke: #e74c3c;
    stroke-width: 4px;
    stroke-linecap: round;
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: draw 0.4s ease-out forwards;
  }

  .cross line:nth-child(2) {
    animation-delay: 0.15s;
  }

  @keyframes draw {
    to { stroke-dashoffset: 0; }
  }


@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Modal */
.modal-eliminacion {
  font-family: "Segoe UI", Arial, sans-serif;
  background: #fff;
  padding: 25px 30px;
  border-radius: 10px;
  min-width: 30%;
  max-width: 40%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  text-align: center;
  word-wrap: break-word;
  animation: aparecer 0.25s ease;
}

@keyframes aparecer {
  from {
    transform: scale(0.95);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Encabezado */
.modal-header-eliminacion {
  font-weight: bold;
  font-size: 1.2em;
  text-align: left;
  color: #333;
  margin-bottom: 8px;
}

.modal-eliminacion hr {
  border: none;
  height: 1px;
  background-color: #ddd;
  margin: 10px 0 20px;
}

/* Subtítulo alineado a la izquierda */
.modal-subtitulo-eliminacion {
  font-size: 1.1em;
  color: #444;
  margin-bottom: 20px;
  line-height: 1.4;
  text-align: left;
}

/* Contenedor de botones */
.modal-botones-eliminacion {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

/* Botones */
.modal-eliminacion button{
  padding: 8px 18px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95em;
  transition: background 0.2s ease;
}

.btn-cerrar-eliminacion {
  background: #ccc;
  color: #333;
}

.btn-logico-eliminacion {
  background: #4caf50;
  color: white;
}

.btn-fisico-eliminacion {
  background: #f44336;
  color: white;
}

.btn-aceptar-eliminacion {
  background: #2196f3;
  color: white;
}

.btn-cancelar-eliminacion {
  background: #999;
  color: white;
}

.modal-eliminacion button:hover {
  opacity: 0.9;
}

.super_col {
  padding: 10px 0px;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.super_edit {
  padding-top: 0px;
  padding-bottom: 10px;
}

.visible_mov {
  display: none;
}

@media screen and (max-width: 980px) {

  .nav{    
    font-size: 5em;
    padding: 6px 6px 14px 6px;
  }
.nav.prev { left: 6%; }
.nav.next { right: 6%; }

    .mod_carg{
      text-align: center;
      font-size: 1.3em;
      max-width: 60% !important;
    }
  
    .ocultable {
        display: none !important;
    }

    .visible_mov {
        display: table-cell;
    }

    #tablaContainer {
        width: 90%;
    }

    .cargado {
        font-size: 0.9em;
    }

    #buscador {
        font-size: 1.5em;
    }

    .paginador {
        gap: 10px;
    }

    .encabezado .orden-botones {
        right: 2px;
    }

    #btnNuevo::before {
        content: "+";
    }

    #btnNext::before {
        content: ">";
    }

    #btnPrev::before {
        content: "<";
        /* muestra el símbolo */
    }

    #btnNext::before,
    #btnPrev::before,
    #btnNuevo::before {
        padding: 0px;
        font-size: 2em;
    }

    #btnNext,
    #btnPrev,
    #btnNuevo {
        color: transparent;
        position: relative;
        width: 190px;
        height: 50px;
    }

    #btnNext::before,
    #btnPrev::before,
    #btnNuevo::before {
        position: absolute;
        color: white;
        /* color visible del símbolo */
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    .paginador select {
        padding: 10px;
    }

    .paginador button {
        padding: 12px 0px;
    }


    .paginador button,
    .paginador select {
        font-size: 1.6em;
    }

    table td>div.truncado {
        height: 2.4em;
    }

    table td>div.truncado>span {
        -webkit-line-clamp: 2;
    }

    td {
        padding: 8px;
    }

    .editar {
        display: none;
    }

    .eliminar {
        display: none;
    }

    .cont_princi {
        gap: 0px;
    }

    .btn_adicional {
        display: block;
    }

    .modal {
        width: 80%;
        max-width: 80%;
    }

    .espacer {
        display: block;
    }

    .modal-eliminacion {
        min-width: 75%;
        max-width: 80%;
    }

    .modal-header-eliminacion {
        font-size: 1.1em;
    }

    .modal-subtitulo-eliminacion {
        font-size: 1em;
    }

    .diver {
        width: 100%;
    }

    .checker {
        top: 14px;
    }

    .notificaciones {
        right: 20px;
    }

    .atras {
        left: 20px;
    }
}