body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    margin: 0;
    padding: 0;
    color: #333;
  }
  
  #contenido_exportable {
    flex: 1;
  }
  
  .header {
    background-color: #f4f6f9;
    padding: 15px 0;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .logo-group {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }
  
  .logo-ajuste {
    height: 55px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
  }
  
  .logo-group img:hover {
    transform: scale(1.05);
  }
  
  .container {
    flex: 1;
    width: 90%;                  
    max-width: 1200px;           
    margin: 40px auto;           /* ← Centra horizontalmente */
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 1;
  }
  
  
  .title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8em;
    color: #2c3e50;
  }
  
  .form-reporte {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
  
  .form-group {
    display: flex;
    flex-direction: column;
  }
  
  label {
    font-weight: 600;
    margin-bottom: 5px;
  }
  
  input[type="text"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
  }
  
  .btn-submit {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: fit-content;         /* Esto ajusta el ancho al contenido */
    align-self: flex-start;     
  }  
  
  .btn-submit:hover {
    background-color: #0056b3;
  }
  
  .resultado {
    max-height: none !important;
    overflow: visible !important;
    page-break-inside: auto; /* permite que se corte de forma natural si es largo */
  }
  .resultado table {
    page-break-inside: avoid;
  }  
  .resultado tr {
    page-break-inside: avoid;
  }  
  .background-logo {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);  /* Centrar */
    width: 300px;
    height: 300px;
    background-image: url('img/movsbck.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.05;              /* puedes subir a 0.1 si deseas más visibilidad */
    z-index: 50;
    pointer-events: none;       /* evita que bloquee clics o selección de texto */
  }  
  footer {
    background-color: #1a1a1a;
    color: #fff;
    text-align: center;
    padding: 20px 10px;
    font-size: 0.85em;
    line-height: 1.4;
  }
  
  @media (max-width: 600px) {
    .container {
      margin: 20px;
      padding: 20px;
    }
  
    .logo-ajuste {
      max-height: 45px;
      max-width: 100px;
    }
  
    .title {
      font-size: 1.5em;
    }
  
    footer {
      font-size: 0.75em;
    }
  }
  @media print {
    .background-logo {
        position: fixed;
        top: 50%;
        left: 50%;
        width: 300px;
        height: 300px;
        transform: translate(-50%, -50%);
        background-image: url('img/movsbck.png');
        background-repeat: no-repeat;
        background-size: contain;
        background-position: center;
        opacity: 0.05;
        z-index: 1;
        pointer-events: none;
      }
    body {
        transform: scale(0.95);
        transform-origin: top center;
        font-size: 11px;
        -webkit-print-color-adjust: exact; /* Chrome / Safari */
        print-color-adjust: exact;         /* Estándar */
      }

    .header, footer {
      position: fixed;
      left: 0;
      right: 0;
      background-color: #f4f6f9 !important;
      color: #000;
      z-index: 999;
    }
  
    .header {
      top: 0;
      padding: 10px 0;
      border-bottom: 1px solid #ccc;
    }
  
    footer {
      bottom: 0;
      padding: 10px 0;
      font-size: 10px;
      border-top: 1px solid #ccc;
    }
  
    .container {
      margin-top: 140px;
      margin-bottom: 100px;
    }
  
    .btn-submit,
    #btnExportarPDF {
      display: none !important;
    }

    .resultado {
      page-break-inside: avoid;
    }
  }  
  #contenido_exportable {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  @media screen {
    .background-logo {
      display: block;
    }
  }

  @media print {
    .background-logo {
      display: none;
    }
  }
