body {
    font-family: Arial, sans-serif;
    background-color: #fff;
    margin: 0;
    padding: 0;  /* Eliminar padding vertical para prevenir scroll */
}

body:not(.upload-page) {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100%;  /* Usar 100% en lugar de 100vh para iframes */
}

body.upload-page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding-top: 50px;
}

body.informe-page {
    display: block;
    height: auto;
    min-height: 100vh;
}
.form-container {
    background: #fff;
    padding: 20px;
    margin: 10px 0;  /* Agregar margen vertical para separación */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgb(0 0 0 / 20%);
    text-align: center;
    width: 330px;
}

.titulo {
    font-size: 18px;
    margin-top:0;
    font-weight: bold;
    color: #333;
}

.logo {
    max-width:210px;
    margin-bottom:5px;
}
form {
    display: flex;
    flex-direction: column;
}
label {
    margin-bottom: 5px;
    text-align: left;
    font-size:13px;
}
input {
    margin-bottom: 10px;
    padding:4px;
    border: 1px solid #ccc;
    border-radius: 5px;
}
button {
    padding: 8px;
    background-color: #D66114;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}
button:hover {
    background-color: #b8520f;
}

.box{
    text-align: left;
    margin-bottom:10px;
    margin-top:5px;
}

  .spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0 0 0 / 50%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
  }
  
  .spinner {
    border: 16px solid #f3f3f3;
    border-top: 16px solid #BC0E0D;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    animation: spin 2s linear infinite;
  }
  
  .spinner-message {
    margin-top: 10px;
    font-size: 18px;
    color: white;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  

.enhorabuena{
  font-size:20px;
  font-weight: bold;
  color: #D66114;
  margin-bottom:20px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0 0 0 / 50%);
  }
  .modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 300px;
    text-align: center;
    border-radius: 4px;
    position: relative;
  }
  .close {
    color: #aaa;
    position: absolute;
    right: 10px;
    top: 10px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
  }
  .modal-btn {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #D66114;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }
  .modal-btn:hover {
    background-color: #b8520f;
  }

  #contact-form p{
    font-size:15px;
    margin:0;
    margin-bottom:10px;
    margin-top:10px;
    text-align: left;
    font-weight: bold;
  }

  .checkboxes{
    font-size:80%;
  }

  .checkboxes input[type="checkbox" i] {
    margin:0;
    margin-right: 2px;
  }

  .box label{
    font-size:12px;
  }

  button.descargar {
    padding: 10px;
    margin-top:20px;
    margin-bottom:50px;
  }

  .informe_completo{
    margin-top: 20px;
    width:100%;
    max-width: 1200px;
    min-height:640px;
    padding-top: 20px;
  }

  .informe-title {
    color: #D66114 !important;
  }

  .informe-title-updated {
    color: #D66114 !important;
  }
  
  .pdf-container {
    margin: 20px auto;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 100%;
  }

  .pdf-container iframe {
    background: #fff;
    border-radius: 4px;
  }

  /* Estilos para la nueva página de subir datos */
  .subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    font-weight: normal;
  }

  /* File Upload Styles */
  .file-upload-section {
    margin-bottom: 20px;
  }

  .file-upload-zone {
    border: 2px dashed #D66114;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fafafa;
    position: relative;
  }

  .file-upload-zone:hover {
    border-color: #b8520f;
    background-color: #fff5f0;
  }

  .file-upload-zone.dragover {
    border-color: #b8520f;
    background-color: #ffe6d6;
    transform: scale(1.02);
  }

  .file-upload-zone.optional {
    border-color: #ccc;
    background-color: #f9f9f9;
  }

  .file-upload-zone.optional:hover {
    border-color: #999;
    background-color: #f5f5f5;
  }

  .file-upload-content {
    text-align: center;
  }

  .file-upload-icon {
    font-size: 32px;
    margin-bottom: 10px;
  }

  .file-upload-zone p {
    margin: 5px 0;
    font-size: 14px;
  }

  .file-upload-browse {
    color: #D66114;
    text-decoration: underline;
    cursor: pointer;
  }

  .file-upload-info {
    text-align: left;
    margin-top: 10px;
  }

  .file-upload-info p {
    margin: 3px 0;
    font-size: 13px;
    color: #666;
  }

  .file-upload-info .file-size-info {
    font-size: 12px !important;
    color: #999;
    margin-top: 8px;
    font-style: italic;
  }

  .file-upload-zone input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    left: 0;
    top: 0;
  }
  
  .file-upload-zone.has-files input[type="file"] {
    pointer-events: none;
    z-index: -1;
  }

  /* File Preview Styles */
  .file-preview {
    background-color: #fdf2f2;
    border: 1px solid #BC0E0D;
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
    text-align: left;
  }

  .file-preview .file-name {
    font-weight: bold;
    color: #BC0E0D;
    margin-bottom: 5px;
  }

  .file-preview .file-size {
    font-size: 12px;
    color: #666;
  }

  .file-preview .remove-file {
    background: #f44336;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 2px 8px;
    font-size: 12px;
    cursor: pointer;
    float: right;
    margin-top: -5px;
  }

  .file-preview .remove-file:hover {
    background: #d32f2f;
  }

  /* Files Preview Styles for Multiple Files */
  .files-preview {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
  }

  .files-list h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
  }

  .file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
  }

  .file-item:last-child {
    border-bottom: none;
  }

  .file-item .file-icon {
    font-size: 20px;
    margin-right: 10px;
  }

  .file-item .file-name {
    flex: 1 1 auto;
    min-width: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-weight: bold;
    color: #BC0E0D;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .file-item .file-size {
    flex: 0 0 auto;
    font-size: 12px;
    color: #666;
    white-space: nowrap;
  }

  .file-item .remove-file {
    flex: 0 0 auto;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1000;
    pointer-events: auto;
  }

  .file-item .remove-file:hover {
    background: #d32f2f;
  }

  .files-summary {
    background-color: #fdf2f2;
    border: 1px solid #BC0E0D;
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
  }

  .files-summary p {
    margin: 2px 0;
    font-size: 14px;
    color: #BC0E0D;
  }

  /* Template Download Section */
  .template-download-section {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
  }

  .template-download-btn {
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  .template-download-btn:hover {
    background-color: #218838;
  }

  /* Form container adjustment for wider content */
  body.upload-page .form-container {
    width: 500px;
    max-width: 90vw;
  }

  /* Responsive adjustments */
  @media (width <= 600px) {
    body.upload-page .form-container {
      width: 95vw;
      padding: 15px;
    }

    .file-upload-zone {
      padding: 15px;
    }

    .file-upload-icon {
      font-size: 24px;
    }
  }

/* Error page styles */
.error-title {
  color: #d32f2f;
  text-align: center;
  margin-bottom: 20px;
}

.error-message {
  background-color: #ffebee;
  border: 1px solid #e57373;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  text-align: center;
}

.error-message p {
  margin: 10px 0;
  color: #424242;
}

.error-actions {
  margin-top: 30px;
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  padding: 12px 24px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s;
}

.btn-primary {
  background-color: #e56209;
  color: white;
}

.btn-primary:hover {
  background-color: #d4580a;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

.success-message {
  background-color: #fdf2f2;
  border: 1px solid #BC0E0D;
  border-radius: 8px;
  padding: 15px;
  margin: 20px 0;
  text-align: center;
  color: #BC0E0D;
}

/* Elegant Popup Styles */
.elegant-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: none;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease-out;
}

.elegant-popup.show {
  display: flex;
  justify-content: center;
  align-items: center;
}

.elegant-popup-content {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  padding: 30px;
  max-width: 450px;
  width: 90%;
  position: relative;
  transform: translateY(-20px);
  animation: slideIn 0.3s ease-out forwards;
}

.elegant-popup-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.elegant-popup-icon {
  font-size: 24px;
  margin-right: 12px;
  color: #D66114;
}

.elegant-popup-icon.warning {
  color: #ff9800;
}

.elegant-popup-icon.error {
  color: #f44336;
}

.elegant-popup-icon.success {
  color: #BC0E0D;
}

.elegant-popup-title {
  font-size: 20px;
  font-weight: bold;
  color: #333;
  margin: 0;
}

.elegant-popup-message {
  color: #666;
  line-height: 1.5;
  margin-bottom: 25px;
  white-space: pre-line;
}

.elegant-popup-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.elegant-popup-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.elegant-popup-btn.primary {
  background-color: #D66114;
  color: white;
}

.elegant-popup-btn.primary:hover {
  background-color: #b8520f;
  transform: translateY(-1px);
}

.elegant-popup-btn.secondary {
  background-color: #f8f9fa;
  color: #666;
  border: 1px solid #dee2e6;
}

.elegant-popup-btn.secondary:hover {
  background-color: #e9ecef;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { 
    transform: translateY(-20px);
    opacity: 0;
  }
  to { 
    transform: translateY(0);
    opacity: 1;
  }
}
