/* Layout base y tarjetas */
body {
  font-family: 'Poppins', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #ffffff;
}
.container { max-width: 1040px; width: 100%; padding: 20px; margin: 0 auto; }
.panels { display: flex; gap: 24px; flex-direction: row; }
.panel-card {
  flex: 1;
  background: #ffffff;
  border-radius: 24px;
  padding: 28px 24px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
  min-width: 0;
}
.panel-heading { font-size: 1.35rem; font-weight: 600; margin: 0 0 8px; color: #111827; }
.panel-description { font-size: 0.95rem; color: #4b5563; margin: 0 0 20px; }
.hero { margin-bottom: 20px; text-align: left; }
@media (max-width: 600px) {
  body { align-items: flex-start; }
  .container { max-width: 100%; padding: 24px 16px; }
  .panels { flex-direction: column; }
}

/* Formulario manual */
.manual-form { display: flex; flex-direction: column; height: 100%; }
.section-title {
  margin-top: 20px; font-size: 0.9rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: #111827;
}
.field-row { display: flex; gap: 12px; margin-top: 10px; }
@media (max-width: 800px) {
  .field-row { flex-direction: column; }
}
.field-group { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0;}
.field-label {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: #6b7280;
}
.field-input {
  border-radius: 10px; border: 1px solid #d1d5db; padding: 10px 12px;
  font-size: 0.95rem; font-family: 'Poppins', Arial, sans-serif;
}
.field-input:focus {
  outline: none; border-color: #111827; box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}
.field-error { margin-top: 8px; font-size: 0.8rem; color: #b91c1c; }
.btn-quote {
  margin-top: 28px; align-self: flex-start; background-color: #000000; color: #ffffff;
  border: none; border-radius: 999px; padding: 12px 22px; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  max-width: 100%; box-sizing: border-box; text-align: center;
}
.btn-quote span { font-size: 1.1rem; }
.btn-quote:hover { opacity: 0.9; }
.btn-quote:disabled { background-color: #6b7280; opacity: 1; cursor: not-allowed; }
.manual-debug-wrapper { margin-top: 16px; display: flex; align-items: center; gap: 8px; }
.debug-refresh-btn {
  width: 28px; height: 28px; border-radius: 999px; border: 1px solid #d1d5db;
  background: #f9fafb; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
}
.debug-refresh-btn:hover { background: #e5e7eb; }
.manual-debug-link { font-size: 0.85rem; color: #111827; word-break: break-all; }

/* Chips de unidades */
.units-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.unit-chip {
  min-width: 64px; height: 40px; padding: 0 12px; border-radius: 999px;
  border: 1px solid #d1d5db; background: #ffffff; font-size: 0.85rem; cursor: pointer;
  color: #111827; display: flex; align-items: center; justify-content: center;
}
.unit-chip.active { background: #000000; color: #ffffff; border-color: #000000; }
.units-custom { display: flex; flex-direction: column; align-items: center; }
.units-input {
  width: 120px;
  height: 40px;
  border-radius: 999px;
  text-align: center;
  padding: 0 12px;
  font-size: 0.85rem;
  border: 1px solid #d1d5db;
  background: #ffffff;
  font-family: 'Poppins', Arial, sans-serif;
  box-sizing: border-box;
}
.units-help { margin-top: 4px; font-size: 0.8rem; color: #4b5563; }
.units-input-active { background: #000000; color: #ffffff; border-color: #000000; }

/* Área de dropzone y overlay */
.dropzone {
  border: 2px dashed #2e6bd9; border-radius: 20px; background: #ccdfff;
  min-height: 200px; padding: 30px 20px; margin: 20px 0;
  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.dropzone.processing { background: #0047bb; }
.dropzone .dz-message {
  font-weight: 400; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center;
}
.pdf-icon { width: 50px; height: auto; }
.select-btn { cursor: pointer; }
.dz-hint { font-size: 0.95rem; color: #4a4a4a; margin: 0; }
.dz-hint.blue { color: #2e6bd9; }
.dz-hints { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.btn-analizar { background-color: #0087F7; color: white; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; font-size: 16px; margin-top: 10px; }
.btn-analizar:hover { background-color: #0069c0; }
.hidden { display: none; }
.dropzone .dz-preview.dz-error .dz-error-message { display: block !important; opacity: 1 !important; pointer-events: auto; top: 170px !important; }
.dropzone .dz-preview { padding-bottom: 28px; }
.dropzone .dz-preview .dz-details { position: static !important; opacity: 1 !important; padding: 8px 6px !important; text-align: center; }
.dropzone .dz-preview .dz-details .dz-filename { white-space: normal !important; word-break: break-word; }
.dropzone .dz-preview .dz-progress { top: auto !important; bottom: 6px !important; left: 8px !important; right: 8px !important; width: auto !important; margin: 0 !important; z-index: 5 !important; -webkit-transform: none !important; transform: none !important; }
.dropzone .dz-preview .dz-image { display: none !important; }
.dropzone .dz-preview { min-height: 0 !important; }
.dz-feedback { margin-top: 12px; font-size: 0.95rem; border-radius: 8px; padding: 8px 12px; border: 1px solid transparent; background: #ffffff; display: block; }
.dz-feedback.hidden { display: none; }
.dz-feedback.error { color: #be2626; border-color: #be2626; background: #fff7f7; }
.dz-feedback.info { color: #2e6bd9; border-color: #2e6bd9; background: #f2f6ff; }
.analysis-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 10; background: transparent; pointer-events: none; }
.analysis-overlay.hidden { display: none; }
.analysis-content { background: #0047bb; border-radius: 0; width: 100%; height: 100%; max-width: none; box-shadow: none; text-align: center; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 0 24px; box-sizing: border-box; pointer-events: all; }
.dropzone.overlay-active .dz-message, .dropzone.overlay-active #dzFeedback, .dropzone.overlay-active .fallback { visibility: hidden; }
.analysis-text { font-size: 1.3rem; color: #fff; margin-top: 18px; }
.analysis-spinner { width: 56px; height: 56px; border: 5px solid rgba(255,255,255,0.35); border-top-color: #ffffff; border-radius: 50%; animation: spin 0.9s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Bloque de errores en panel derecho */
.error-wrap { text-align: center; max-width: 640px; }
.error-title { font-size: 1.2rem; font-weight: 600; color: #be2626; margin: 0 0 10px; }
.error-item { font-size: 0.95rem; color: #111827; margin: 6px 0; }
.error-actions { margin-top: 14px; }
.btn-primary {
  background-color: #000000; color: #ffffff; border: none; border-radius: 999px;
  padding: 10px 18px; font-size: 0.95rem; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
}
