* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background-color: #1a1a1a;
}

.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background-color: #0f172a;
  color: #ffffff;
  min-height: 60px;
  gap: 12px;
}

.header-bar h2 {
  font-size: 0.9rem;
  line-height: 1.2;
}

.btn-action {
  padding: 8px 14px;
  background-color: #059669;
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap; /* Evita que el texto del botón se rompa en varias líneas */
  font-size: 0.9rem;
  flex-shrink: 0; /* Impide que el botón se aplaste o deforme */
}

.pdf-container {
  width: 100vw;
  height: calc(100vh - 60px);
  display: flex;
  justify-content: center;
}

iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ==========================================
   OPTIMIZACIÓN PARA PANTALLAS MÓVILES
   ========================================== */

@media screen and (max-width: 600px) {
  .header-bar {
    padding: 10px 12px;
    gap: 8px;
  }

  .header-bar h2 {
    font-size: 0.9rem;
  }

  .btn-action {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
}

/* Para pantallas extremadamente estrechas (menos de 360px) */
@media screen and (max-width: 360px) {
  .header-bar {
    flex-wrap: wrap; /* Permite que el botón pase a la línea inferior si no hay espacio */
    justify-content: center;
    text-align: center;
  }

  .pdf-container {
    height: calc(100vh - 90px);
  }
}