body {
  background: url('../img/fondo.jpg') no-repeat center center fixed;
  background-size: cover;
  min-height: 100vh;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

.main-container {
  background: #fff;
  border-radius: 32px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.07);
  border: 2px solid #222;
  width: 95vw;
  max-width: 1400px;
  min-height: 80vh;
  padding: 3.5rem 3rem 2rem 3rem;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
}

.logo {
  position: absolute;
  top: 2rem;
  left: 2rem;
  height: 90px;
  width: 160px;
}

.menu {
  position: absolute;
  top: 2.5rem;
  right: 3rem;
  display: flex;
  gap: 2.5rem;
  font-size: 1.1rem;
  font-family: 'Segoe UI', Arial, sans-serif;
  font-weight: 500;
}
.menu a {
  color: #d10000;
  text-decoration: none;
  letter-spacing: 1px;
  font-weight: bold;
  font-size: 1.1rem;
  font-family: 'Segoe UI', Arial, sans-serif;
  text-transform: uppercase;
  padding: 0.5em 1.2em;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s, transform 0.2s;
  display: inline-block;
  border: none;
}
.menu a.active,
.menu a:hover {
  color: #fff;
  background: #d10000;
  font-weight: bold;
  border-bottom: none;
  transform: scale(1.08);
}

.captacion-form {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  max-width: 100%;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1 1 0;
  max-width: 600px;
  /* Quitar limitador de alto y overflow */
  background: transparent;
}

.form-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

/* Remove multi-column specific styles */
.form-row-2col,
.form-row-3col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.form-group, .form-photo {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  box-sizing: border-box;
  flex: none;
}

.form-photo {
  align-items: center;
  justify-content: flex-start;
  margin-top: 0.5rem;
  margin-right: 0;
}

.form-group label {
  font-size: 1rem;
  font-weight: 600;
  color: #222;
  margin-bottom: 0.2rem;
}

input[type="text"], input[type="date"], input[type="time"], input[type="email"], input[type="tel"], input[type="number"], select, textarea {
  background: #f6f6f6;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  font-size: 0.95rem;
  color: #222;
  outline: none;
  margin-bottom: 0.1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  min-height: 40px;
  height: 40px;
  width: 100%;
  box-sizing: border-box;
}

input[type="text"]:disabled, input[type="email"]:disabled, input[type="tel"]:disabled, input[type="number"]:disabled, select:disabled, textarea:disabled {
  background: #e9e9e9;
  color: #999;
  cursor: not-allowed;
  opacity: 0.5;
}

select {
  appearance: none;
  background: #f6f6f6 url("data:image/svg+xml,%3Csvg width='16' height='16' fill='gray' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 1rem center/1.2em;
  border: 2px solid #d10000;
  font-weight: 600;
  color: #222;
  padding-right: 2.5em;
}

.form-group label span {
  color: #d10000;
  font-weight: bold;
  margin-left: 0.2em;
}

textarea {
  min-height: 80px;
  height: 80px;
  max-height: 120px;
  font-size: 0.95rem;
  padding: 0.5rem 0.7rem;
  resize: vertical;
  width: 100%;
  box-sizing: border-box;
}

input[type="radio"] {
  accent-color: #d10000;
  margin-right: 0.3rem;
}

.radio-group {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

.form-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  margin-top: 1.7rem;
  margin-right: 1rem;
}
.photo-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  background: #d10000;
  color: #fff;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 0.3rem;
  box-shadow: 0 2px 8px rgba(209,0,0,0.15);
  transition: background 0.2s;
}
.photo-label:hover {
  background: #ff9000;
}
.photo-icon {
  font-size: 2.1rem;
  margin-bottom: 0.1rem;
}

.file-drop {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  background: #fafafa;
  display: flex;
  align-items: center;
  min-height: 48px;
  margin-top: 0.2rem;
}
.file-drop-label {
  width: 100%;
  color: #888;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.add-files-btn {
  background: #ededed;
  color: #d10000;
  border: none;
  border-radius: 8px;
  padding: 0.3rem 1.2rem;
  font-size: 0.98rem;
  font-weight: bold;
  margin-left: 1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.add-files-btn:hover {
  background: #d10000;
  color: #fff;
}

.form-actions {
  text-align: center;
  margin-top: 2.2rem;
}
.continue-btn {
  background: #d10000;
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 0.9rem 2.5rem;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(209,0,0,0.09);
  transition: background 0.2s, transform 0.2s, opacity 0.2s;
}
.continue-btn:hover:not(:disabled) {
  background: #ff9000;
  transform: scale(1.05);
}
.continue-btn:disabled {
  background: #ccc;
  color: #999;
  cursor: not-allowed;
  transform: none;
  opacity: 0.5;
}

.creditos {
  position: absolute;
  bottom: 0.5rem;
  left: 7rem;
  width: 100%;
  text-align: center;
  font-size: 1.1rem;
  color: #888;
  font-family: 'Segoe UI', Arial, sans-serif;
  letter-spacing: 1px;
}

.defecto-container {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  justify-content: flex-start;
}

.defecto-row {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.defecto-row-margin {
  margin-left: 0;
}

.input-defecto {
  width: 100%;
  min-width: auto;
  max-width: none;
  box-sizing: border-box;
}

/* Remove all specific input width overrides */
#tipo_defecto.input-defecto {
  width: 100% !important;
  max-width: none !important;
  min-width: auto !important;
}

#metros_defecto.input-defecto,
#metros_instalado.input-defecto {
  max-width: none;
  width: 100% !important;
}

/* Dos columnas: imagen y formulario */
.form-image-side {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: flex-start;
  gap: 3rem;
  margin-top: 2rem;
  width: 100%;
}

.image-denuncia {
  width: 350px;
  min-width: 350px;
  max-width: 350px;
  height: auto;
  object-fit: cover;
  object-position: center center;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
  background: #eee;
  flex: 0 0 350px;
  display: block;
}

.captacion-form {
  flex: 1;
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: transparent;
}

/* Responsive: stack vertical en pantallas pequeñas */
@media (max-width: 900px) {
  .main-container {
    padding: 2rem 1rem;
    min-height: 90vh;
  }
  .form-image-side {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    min-height: unset;
  }
  .image-denuncia {
    width: 100%;
    max-width: 350px;
    height: 200px;
    min-width: auto;
    flex: none;
  }
  .captacion-form {
    max-width: 100%;
    padding: 0;
  }
}

@media (max-width: 700px) {
  .main-container {
    padding: 1.2rem 0.8rem;
    width: 95vw;
  }
  .captacion-form {
    max-width: 100%;
    padding: 0;
  }
  .form-row {
    flex-direction: column;
    gap: 0.7rem;
  }
  .form-group, .form-photo {
    width: 100%;
  }
  .defectos-row {
    flex-direction: column;
    gap: 0.7rem;
  }
  
  .defectos-box {
    padding: 1rem;
  }
}

@media (max-width: 1200px) {
  .main-container {
    width: 95vw;
    max-width: 1400px;
    padding: 2rem 1.5rem;
  }
  .captacion-form {
    max-width: 100%;
    padding: 0;
  }
  .form-row {
    flex-direction: row;
    gap: 1rem;
  }
  .form-group, .form-photo {
    width: 100%;
  }
}

.form-group label[for="marca"]::after,
.form-group label[for="estado"]::after,
.form-group label[for="tipo_defecto"]::after,
.form-group label[for="distribuidor"]::after,
.form-group label[for="sucursal"]::after,
.form-group label[for="producto_reclamado"]::after {
  content: " ▼";
  font-size: 0.9em;
  color: #d10000;
  margin-left: 0.1em;
  vertical-align: middle;
}

.autocomplete-group {
  position: relative;
  width: 100%;
}
.autocomplete-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  z-index: 10;
  max-height: 180px;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}
.autocomplete-options li {
  padding: 0.6em 1em;
  cursor: pointer;
  font-size: 0.98em;
}
.autocomplete-options li:hover {
  background: #f6f6f6;
  color: #d10000;
}

.defectos-box {
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
  background: #fafafa;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.defectos-row {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
  width: 100%;
}

.defectos-row:last-child {
  margin-bottom: 0;
}

.defectos-row .form-group {
  flex: 1;
  width: auto;
}

/* Etiqueta styles */
.etiqueta-row {
  display: flex;
  align-items: center;       /* centrado vertical entre imagen y caja */
  gap: 1.2rem;
  margin-bottom: 1rem;
}

.etiqueta-ejemplo {
  text-align: center;
  flex: 0 0 200px; /* antes 220px */
  display: flex;             /* centra contenido dentro de la columna */
  flex-direction: column;
  align-items: center;
}
.etiqueta-ejemplo img {
  max-width: 200px; /* antes 220px */
  max-height: 140px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 0.5rem;
}
.etiqueta-ejemplo p {
  font-size: 0.85rem;
  color: #666;
  margin: 0;
}

.etiqueta-uploader {
  flex: 1 1 auto;            /* usar todo el ancho restante */
  min-width: 0;              /* evitar cortes en flexbox */
}

.etiqueta-drop {
  position: relative;
  min-height: 180px;         /* un poco más alta para balancear con la imagen */
}
.etiqueta-drop .file-drop-label {
  position: absolute;
  inset: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;   /* centrar el contenido de la caja */
  text-align: center;
  padding: 0.75rem;
}
#preview_etiqueta_producto.file-preview {
  width: 100%;
  min-height: 180px;         /* igual a la caja para evitar recortes iniciales */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  box-sizing: border-box;
}

/* Responsive: apilar en móviles */
@media (max-width: 700px) {
  .etiqueta-row {
    flex-direction: column;
    align-items: stretch;    /* ocupar el ancho completo en columna */
  }
  .etiqueta-uploader,
  .etiqueta-ejemplo {
    flex: 1 1 auto;
  }
}