/* ------------------------------------
editor-flex (LOTES Y CLIENTES)
------------------------------------- */

.editor-flex {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto 30px auto;
  align-items: flex-start;
}
/* Aplica proporciones 1/3 y 2/3 a los dos formularios hijos directos de .editor-flex */
.editor-flex > form:first-child {
  grid-column: 1;
  min-width: 260px;
}
.editor-flex > form:last-child {
  grid-column: 2;
  min-width: 340px;
}
@media (max-width: 600px) {
  .editor-flex {
    grid-template-columns: 1fr;
  }
  .editor-flex > form {
    min-width: 0;
    grid-column: 1;
  }
}


body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f4f6fa;
    color: #222;
    margin: 0;
    padding: 0;
}


/*---------------------------------------------------
CONTAINER SVG PLANO
-----------------------------------------------------*/
.contenido-flex {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    padding: 20px;
    flex-wrap: wrap;
}

#svg-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    padding: 24px;
    width: 1024px;
    height: 768px;
    overflow: auto;
}

.panel-lateral {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 400px;
    width: 100%;
}

.seccion-panel {
    background: #f9f9f9;
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 12px;
}

.seccion-panel h2 {
    margin-top: 0;
}




/*NO SEEEEEEEEEEEEEEE*/

form {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 10px 10px 10px 10px;
    margin-bottom: 30px;
    width: 100%;
    max-width: none;
}

form h3 {
    color: #004aad;
    margin-bottom: 18px;
    font-size: 1.3rem;
}

label {
    display: flex;
    flex-direction: column;
    margin-bottom: 14px;
    font-weight: 500;
    color: #333;
    gap: 4px;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="tel"],
input[type="url"],
input[type="file"] {
    width: 100%;
    padding: 6px 0;
    margin-top: 2px;
    margin-bottom: 10px;
    background: none;
    font-size: 1rem;
}
select {
    padding: 8px 10px;
    margin-top: 4px;
    margin-bottom: 16px;
    border: 1px solid #cfd8dc;
    border-radius: 5px;
    font-size: 1rem;
    background: #f9fbfd;
    transition: border 0.2s;
}
/* Mejorar visual de inputs de archivo */
input[type="file"]::-webkit-file-upload-button {
    background: #004aad;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 16px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-right: 8px;
    transition: background 0.2s;
}
input[type="file"]:hover::-webkit-file-upload-button {
    background: #00337a;
}
input[type="file"]::file-selector-button {
    background: #004aad;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 16px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-right: 8px;
    transition: background 0.2s;
}
input[type="file"]:hover::file-selector-button {
    background: #00337a;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus {
    border: 1.5px solid #004aad;
    outline: none;
}

button[type="submit"] {
    background: #004aad;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px 22px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
button[type="submit"]:hover {
    background: #00337a;
}

#mensaje-estado {
    text-align: center;
    margin: 18px 0 0 0;
    font-size: 1.1rem;
}

.estado-btn {
    margin: 0 5px;
    padding: 4px 8px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 500;
}
.disponible { background: #27ae60; color: #fff; }
.vendido { background: #e74c3c; color: #fff; }
.no_disponible { background: #7f8c8d; color: #fff; }
.separado { background: #f1c40f; color: #fff; }

a {
    color: #004aad;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    margin: 15px 3px 0 3px;
    text-align: center;
}
a:hover {
    text-decoration: underline;
}


/* -----------------------------
FORMULARIOS 
------------------------------*/
.editor-flex #form-cliente {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
}

.editor-flex #form-cliente div {
  display: flex;
  flex-direction: column;
}

.editor-flex #form-cliente label {
  margin-bottom: 6px;
  font-weight: bold;
}

.editor-flex #form-cliente  input {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

@media (max-width: 600px) {
  .editor-flex {
    flex-direction: column;
  }
  .editor-flex #form-lote,
  .editor-flex #form-cliente {
    max-width: 66.66%;
    min-width: 340px;
  }
  form {
    padding: 18px 8px 14px 8px;
    margin-bottom: 18px;
  }
}

/*-------------------------------------
check-feedback
----------------------------------------*/
#check-feedback {
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translate(10px, -50%);
  z-index: 10;
  display: none;
  pointer-events: none;
}

.check-mark {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid #4CAF50;
  position: relative;
  box-sizing: border-box;
  animation: fadeOut 1.5s forwards;
}

.check-mark::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 0px;
  width: 8px;
  height: 14px;
  border-right: 3px solid #4CAF50;
  border-bottom: 3px solid #4CAF50;
  transform: rotate(45deg);
}

@keyframes fadeOut {
  0% {
    opacity: 1;
    scale: 1;
  }
  80% {
    opacity: 1;
    scale: 1.05;
  }
  100% {
    opacity: 0;
    scale: 1;
  }
}

/*-------------------------------------
CALCULADORA
----------------------------------------*/
section {
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  max-width: 100%;
  margin: auto;
  background: #f9f9f9;
}

label {
  display: block;
  margin-bottom: 0.5rem;
}

input {
  margin-top: 0.2rem;
  margin-bottom: 0.8rem;
  width: 100%;
  padding: 0.4rem;
}

button {
  padding: 0.5rem 1rem;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/*-------------------------------------
BUSCADOR DE LOTES
----------------------------------------*/

#busqueda-lotes {
  display: flex;  
  gap: 12px;
  flex-wrap: wrap;
  align-items: stretch;
  max-width: 600px;
  margin: 0 auto;         /* Centrado horizontal */
  padding: 20px;
  background-color: #ffffff;
  text-align: center;
  font-size: 1.2rem;
  border-radius: 8px;
}

#resultados-busqueda {
  margin-top: 16px;
  max-height: 400px;
  overflow-y: auto;
}

.campos-busqueda {
  display: flex;
  gap: 12px;
  align-items: flex-end; /* Alinea los elementos al mismo nivel inferior */
}

.campos-busqueda label {
  flex: 1;
  min-width: 100px;
}

.boton-buscar {
  flex-shrink: 0; /* Evita que el bot��n se encoja */
}

@media (max-width: 480px) {
  #busqueda-lotes {
    width: 90%;
    font-size: 1rem;
    padding: 15px;
  }
}

@media (min-width: 1024px) {
  #busqueda-lotes {
    font-size: 1.4rem;
  }
}
#barra-herramientas-editor {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center; /* opcional, para alinear verticalmente */
    gap: 12px; /* separacion entre elementos */
    padding: 10px 20px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    margin-bottom: 20px;
}
