/* ===============================
   RESET & BASE
================================ */
* {
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
  }
  
  body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f4f4;
  margin: 0;
  padding: 20px;
}

#informe-nfpa {
  background: white;
  padding: 20px;
  max-width: 900px;
  margin: auto;
}

/* ====== FIX PDF BLANK PAGES ====== */

/*#informe-nfpa {
  width: 100%;
  padding: 0;
  margin: 0;
  margin-top: 10px;
}*/

section, fieldset, table {
  page-break-inside: avoid;
}

h1, h2, h3 {
  page-break-after: avoid;
}

.page-break {
  page-break-before: always;
}

/* Elimina espacios fantasma */
* {
  box-sizing: border-box;
}


/* ===== HEADER PDF ===== */
.pdf-header {
  top: 0;
  left: 0;
  right: 0;
  background: white;
  margin: auto;

}

.header-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #000;
  table-layout: fixed;
}

.header-table td {
  border: 1px solid #000;
  padding: 6px;
  vertical-align: middle;
  font-size: 11px;
}

/* LOGO */
.header-logo {
  width: 20%;
  text-align: center;
}

.header-logo img {
  max-height: 55px;
  margin-bottom: 4px;
}

.ipm {
  font-size: 10px;
}

.ipm input {
  width: 80%;
  border: 1px solid #000;
  font-size: 10px;
  text-align: center;
}

/* TITULO */
.header-title {
  width: 55%;
  text-align: center;
  font-size: 12px;
  line-height: 1.3;
}

/* META */
.header-meta {
  width: 25%;
  font-size: 10px;
}

.header-meta input {
  width: 90%;
  border: none;
  border-bottom: 1px solid #000;
  font-size: 10px;
}

  /* ===============================
     SECTIONS
  ================================ */
  .section {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  }
  
  /* ===============================
     GRIDS
  ================================ */
  .grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }
  
  .grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
  }
  
  @media (max-width: 900px) {
    .grid-2, .grid-3, .grid-4 {
      grid-template-columns: 1fr;
    }
  }
  
  /* ===============================
     LABELS & INPUTS
  ================================ */
  label {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    font-weight: 600;
  }
  
  input,
  select,
  textarea {
    margin-top: 6px;
    padding: 8px 10px;
    border-radius: 5px;
    border: 1px solid #cfd8dc;
    font-size: 13px;
    background-color: #fafafa;
  }
  
  input:focus,
  select:focus,
  textarea:focus {
    outline: none;
    border-color: #d32f2f;
    background-color: #ffffff;
  }
  
  textarea {
    resize: vertical;
  }
  
  /* ===============================
     TABLES
  ================================ */
  .check-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
  }
  
  .check-table th {
    background-color: #263238;
    color: #ffffff;
    font-size: 13px;
    padding: 10px;
    text-align: left;
  }
  
  .check-table td {
    border-bottom: 1px solid #e0e0e0;
    padding: 8px;
    vertical-align: middle;
  }
  
  .check-table tr:nth-child(even) {
    background-color: #f9fafb;
  }
  
  .check-table select,
  .check-table input,
  .check-table textarea {
    width: 100%;
  }
  
  /* ===============================
     STATUS COLORS (Opcional JS)
  ================================ */
  .status-ok {
    background-color: #e8f5e9;
    border-left: 4px solid #2e7d32;
  }
  
  .status-warning {
    background-color: #fff8e1;
    border-left: 4px solid #f9a825;
  }
  
  .status-critical {
    background-color: #ffebee;
    border-left: 4px solid #c62828;
  }
  
  /* ===============================
     BUTTONS (Futuro)
  ================================ */
  .btn {
    background-color: #d32f2f;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
  }
  
  .btn:hover {
    background-color: #b71c1c;
  }
  
  /* ===============================
     PRINT / PDF
  ================================ */
  @media print {
    body {
      background: white;
      padding: 0;
    }
  
    .section {
      box-shadow: none;
      border-radius: 0;
      page-break-inside: avoid;
    }
  
    h3 {
      color: black;
      border-color: black;
    }
  }

  @media print {
    .section {
      page-break-inside: avoid;
    }
  }
  

/* ===== FIRMA DIGITAL ===== */
.firma-canvas {
  border: 1px solid #000;
  width: 100%;
  height: 150px;
  background: #fff;
  touch-action: none;
}

.firma-botones {
  margin-top: 8px;
}

.firma-botones button {
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}

/* ===============================
   SOPORTE FOTOGRÁFICO
================================ */

/* ===============================
   GALERÍA FOTOGRÁFICA
================================ */

.galeria-fotos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 15px;
}

.galeria-fotos img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  border: 1px solid #ccc;
  padding: 5px;
  background: #fff;
}

@media print {
  .galeria-fotos {
    page-break-inside: avoid;
  }
}
/* ===============================
   EVITAR CORTE DE IMÁGENES EN PDF
================================ */

.foto-item {
  page-break-inside: avoid !important;
  break-inside: avoid !important;
  display: block;
}

.foto-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
}



