:root {
    --color-principal: #4a1010;
    --color-secundario: #ffffff;
    --text-color: #333;
    --card-bg: #fff;
    --border-color: #ccc;
    --border-radius: 10px;
    --input-padding: 10px;
    --section-spacing: 20px;
  }
  
  body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
  }
  
  header {
    background: var(--color-principal);
    padding: 20px 10px;
    text-align: center;
    color: white;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }
  
  header img {
    max-width: 500px;
    height: auto;
    margin-bottom: 15px;
  }
  
  h1 {
    margin: 0;
    font-size: 1.8rem;
  }
  
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
  }
  
  form {
    background: var(--color-secundario);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 40px;
  }
  
  .form-section {
    margin-bottom: var(--section-spacing);
    padding-bottom: var(--section-spacing);
    border-bottom: 1px dashed #eee;
  }
  
  .form-section h2 {
    color: var(--color-principal);
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.3rem;
  }
  
  .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
  }
  
  .form-group {
    flex: 1 1 calc(50% - 20px);
    min-width: 250px;
  }
  
  .form-group.full-width {
    flex: 1 1 100%;
  }
  
  label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 0.9rem;
  }
  
  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="date"],
  input[type="tel"],
  input[type="file"],
  select,
  textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-sizing: border-box;
    font-size: 1rem;
    transition: border-color 0.3s;
    background-color: #f9f9f9;
  }
  
  input:focus,
  select:focus,
  textarea:focus {
    border-color: var(--color-principal);
    outline: none;
    background-color: #fff;
  }
  
  textarea {
    resize: vertical;
    min-height: 100px;
  }
  
  .btn-container {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
  }
  
  button {
    background: var(--color-principal);
    color: var(--color-secundario);
    border: none;
    padding: 14px 25px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    font-weight: bold;
    flex: 1;
    min-width: 200px;
  }
  
  button:hover {
    background: #aa0404;
    transform: translateY(-2px);
  }
  
  button.secondary {
    background: #666;
  }
  
  button.secondary:hover {
    background: #555;
  }
  
  .signature-container {
    margin-top: 20px;
    text-align: center;
  }
  
  canvas {
    width: 100%;
  max-width: 400px;   /* o el máximo que quieras */
  height: 150px;      /* altura fija o relativa */
  border: 1px solid #ccc;
  touch-action: none; /* importante para evitar scroll en móvil */
  display: block;
  }


  
  .photo-container {
    margin: 20px 0;
    text-align: center;
  }
  
  #video, #canvas {
    max-width: 100%;
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
  }
  
  #canvas {
    display: none;
    margin-top: 10px;
  }
  
  .checkbox-container {
    display: flex;
    align-items: center;
    margin: 10px 0;
  }
  
  .checkbox-container input {
    width: auto;
    margin-right: 10px;
  }
  /* Estilos para el PDF */
@media print {
  body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    padding: 20px;
  }
  
  .container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
  }
  
  header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #333;
    padding-bottom: 20px;
  }
  
  #logo-empresa {
    max-width: 150px;
    height: auto;
  }
  
  .form-section {
    margin-bottom: 25px;
    page-break-inside: avoid;
  }
  
  h2 {
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    margin-bottom: 15px;
  }
  
  .form-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
  }
  
  .form-group {
    flex: 1;
    margin-right: 15px;
  }
  
  .form-group:last-child {
    margin-right: 0;
  }
  
  label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
  }
  
  .signature-container canvas, 
  .photo-container canvas {
    border: 1px solid #ddd;
    margin-top: 10px;
  }
  
  button {
    display: none;
  }
}

/* Estilo para el PDF generado */
.pdf-template {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.pdf-template header {
  text-align: center;
  margin-bottom: 30px;
  border-bottom: 2px solid #333;
  padding-bottom: 20px;
}

.pdf-template .section {
  margin-bottom: 25px;
}

.pdf-template h2 {
  color: #2c3e50;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
  margin-bottom: 15px;
}

.pdf-template .row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.pdf-template .field {
  flex: 1;
  margin-right: 15px;
}

.pdf-template .field:last-child {
  margin-right: 0;
}

.pdf-template .label {
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
}

.pdf-template .value {
  padding: 5px;
  border-bottom: 1px dotted #ccc;
  min-height: 20px;
}

.pdf-template .signature-box, 
.pdf-template .photo-box {
  border: 1px solid #ddd;
  margin-top: 10px;
  text-align: center;
  padding: 10px;
}

.pdf-template .signature-box img,
.pdf-template .photo-box img {
  max-width: 100%;
  height: auto;
}
  
  @media (max-width: 768px) {
    .form-group {
      flex: 1 1 100%;
    }
    
    .form-row {
      gap: 15px;
    }
    
    button {
      flex: 1 1 100%;
    }
  }