/* Estilos básicos para que se vea prolijo mientras desarrollamos */

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
  background: #f3f4f6;
  color: #111827;
}

header {
  background: #1f2933;
  color: white;
  padding: 1rem;
  text-align: center;
}

main {
  padding: 1rem;
}

p#estado-app {
  background: white;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

footer {
  text-align: center;
  padding: 0.5rem 1rem 1rem;
  font-size: 0.8rem;
  color: #6b7280;
}
.hidden {
  display: none;
}

.card {
  background: white;
  padding: 1rem;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  margin-top: 1rem;
}

h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.form-group {
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form-group label,
.form-group span {
  font-weight: 600;
  font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group textarea,
.form-group input[type="file"] {
  padding: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  font-size: 1rem;
}

.form-group textarea {
  resize: vertical;
}

.inline-group {
  display: flex;
  gap: 1rem;
  align-items: center;
}

button {
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  border: none;
  font-size: 0.95rem;
  cursor: pointer;
  background: #2563eb;
  color: white;
}

button:hover {
  background: #1d4ed8;
}

.button-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
/* ===== Estilos específicos para el contenido del PDF (4 rectángulos mejorados) ===== */

#pdf-content {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px 24px 24px;
  color: #0f172a;
  font-size: 1.05rem; /* tamaño general mayor */
}

/* ===========================
   RECTÁNGULO 1 – ENCABEZADO
   =========================== */
.pdf-header-banner {
  width: 100%;
  height: 180px;               /* altura sugerida del membrete */
  overflow: hidden;
  margin-bottom: 12px;         /* menos espacio debajo */
}

.pdf-header-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;           /* llena el área sin deformarse */
  display: block;
}

/* ===========================
   RECTÁNGULOS 2 y 3 – TARJETAS
   =========================== */
.pdf-section-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* TÍTULOS DE SECCIÓN */
.pdf-section-title {
  font-size: 1.35rem;     /* +2 puntos */
  font-weight: 700;
  margin: 0 0 16px;
  color: #1e293b;
  letter-spacing: -0.2px;
}


/* CUERPO DE LOS DATOS */
.pdf-section-body {
  font-size: 1.15rem;     /* +2 puntos aprox */
  line-height: 1.6;
  color: #1e293b;
}


.pdf-section-body div {
  margin-bottom: 6px;
}

/* ===========================
   BLOQUE 3 – INFORME
   =========================== */
.pdf-section-box.informe {
  min-height: 650px;          /* MÁS ALTO, realmente protagonista */
  display: flex;
  flex-direction: column;
  padding-top: 28px;
  padding-bottom: 28px;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}


.pdf-body-text {
  flex: 1;
  font-size: 1.15rem;
  text-align: justify;
  line-height: 1.8;        /* más espaciado */
  margin-top: 12px;
  white-space: normal;      /* ahora usamos <p>, no hace falta pre-wrap */
  overflow-wrap: break-word;
  text-indent: 0;           /* sin sangría en la primera línea */
}

/* Márgenes entre líneas del informe */
.pdf-body-text p {
  margin: 0 0 8px 0;        /* espacio entre cada sección */
}



/* ===========================
   RECTÁNGULO 4 – FIRMA
   =========================== */
.pdf-firma {
  margin-top: 32px;
  display: flex;
  justify-content: flex-end;
}

.pdf-firma-inner {
  text-align: right;
  color: #0f172a;
}

.pdf-firma-inner img {
  max-height: 100px;    /* firma más visible */
  margin-bottom: 10px;
  margin-left: auto;
}

/* Línea de firma */
.pdf-firma-line {
  border-top: 1.4px solid #0f172a;
  width: 240px;
  margin: 4px 0 6px auto;
}

/* Texto debajo de la firma */
.pdf-firma-text {
  font-size: 1.05rem;
  font-weight: 500;
}

/* ====== Estado y visualizador de audio ====== */

#estado-audio {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: #374151;
}

.audio-visualizer {
  display: flex;
  align-items: center;
  height: 32px;
  margin: 0.5rem 0 0.75rem;
}

.audio-circle {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #60a5fa;
  opacity: 0.8;
  transform: scale(1);
  transition: transform 0.04s linear, opacity 0.04s linear;
}