* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f2f4f7;
  color: #1f2933;
}

.header {
  width: 100%;
  background: #111827;
  padding: 16px 40px;
  display: flex;
  gap: 24px;
  justify-content: flex-end;
}

.header a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
}

.header a:hover {
  text-decoration: underline;
}

.contenedor {
  width: min(1180px, 94%);
  margin: 0 auto;
  padding: 40px 0;
}

.hero {
  text-align: center;
  margin-bottom: 30px;
}

.hero img {
  max-width: 260px;
  margin-bottom: 16px;
}

.hero h1 {
  margin: 0;
  font-size: 34px;
  color: #111827;
}

.hero p {
  max-width: 760px;
  margin: 14px auto 0;
  line-height: 1.6;
  color: #4b5563;
}

.panel,
.resultado {
  background: #ffffff;
  border-radius: 18px;
  padding: 30px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  margin-bottom: 30px;
}

h2 {
  color: #111827;
  margin-top: 24px;
  border-left: 5px solid #2563eb;
  padding-left: 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
}

input,
select,
textarea {
  width: 100%;
  padding: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 15px;
  background: #ffffff;
}

textarea {
  resize: vertical;
  margin-top: 8px;
}

.campo-amplio {
  display: block;
  margin-top: 18px;
  font-weight: 700;
  color: #374151;
}

.cargas {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 18px;
}

.cargas label {
  background: #f8fafc;
  border: 1px dashed #94a3b8;
  padding: 18px;
  border-radius: 14px;
  font-weight: 700;
}

.cargas input {
  margin-top: 10px;
  background: #ffffff;
}

.aceptacion {
  margin: 24px 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.aceptacion input {
  width: auto;
  margin-top: 4px;
}

.boton-principal,
.boton-secundario,
.modal button {
  border: none;
  border-radius: 12px;
  padding: 14px 22px;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
}

.boton-principal {
  background: #2563eb;
  color: #ffffff;
  width: 100%;
}

.boton-secundario {
  background: #111827;
  color: #ffffff;
  margin-top: 20px;
}

.boton-principal:hover,
.boton-secundario:hover,
.modal button:hover {
  opacity: 0.9;
}

.oculto {
  display: none !important;
}

.resultado h3 {
  margin-top: 26px;
  color: #1e3a8a;
}

.resultado p {
  line-height: 1.6;
}

.alerta {
  background: #fff7ed;
  border-left: 5px solid #f97316;
  padding: 14px;
  border-radius: 10px;
  margin-top: 18px;
}

.exito {
  background: #ecfdf5;
  border-left: 5px solid #10b981;
  padding: 14px;
  border-radius: 10px;
  margin-top: 18px;
}

.tabla-contenedor {
  overflow-x: auto;
  margin-top: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #ffffff;
}

th {
  background: #111827;
  color: #ffffff;
  padding: 12px;
  text-align: left;
}

td {
  border: 1px solid #e5e7eb;
  padding: 12px;
  vertical-align: top;
}

tr:nth-child(even) {
  background: #f8fafc;
}

.indice {
  margin-top: 14px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  height: 24px;
}

.indice-barra {
  height: 24px;
  background: #2563eb;
  color: #ffffff;
  text-align: center;
  font-size: 13px;
  line-height: 24px;
  font-weight: 700;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.78);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 20;
  padding: 20px;
}

.modal-contenido {
  width: min(720px, 96%);
  background: #ffffff;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.modal-contenido h2 {
  margin-top: 0;
}

.modal-botones {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.modal button {
  background: #2563eb;
  color: #ffffff;
}

.modal button:nth-child(2) {
  background: #374151;
}

.footer {
  background: #111827;
  color: #ffffff;
  padding: 26px;
  text-align: center;
  margin-top: 40px;
}

.footer img {
  max-width: 170px;
  display: block;
  margin: 0 auto 12px;
}

.footer a {
  color: #ffffff;
  text-decoration: none;
}

@media print {
  .header,
  .footer,
  .boton-secundario,
  .panel,
  .hero,
  .modal {
    display: none !important;
  }

  body {
    background: #ffffff;
  }

  .resultado {
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }
}

@media (max-width: 760px) {
  .grid,
  .cargas {
    grid-template-columns: 1fr;
  }

  .header {
    justify-content: center;
    padding: 14px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .panel,
  .resultado {
    padding: 20px;
  }
}
@media print {
  @page {
    margin: 16mm;
  }

  body {
    background: #ffffff !important;
    color: #111827 !important;
    font-size: 12px;
  }

  .header,
  .footer,
  .hero,
  .panel,
  .boton-secundario,
  .modal {
    display: none !important;
  }

  .contenedor {
    width: 100% !important;
    padding: 0 !important;
  }

  .resultado {
    display: block !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .resultado h2 {
    text-align: center;
    font-size: 22px;
    border-bottom: 2px solid #1e3a8a;
    padding-bottom: 8px;
    margin-bottom: 20px;
  }

  .resultado h3 {
    color: #1e3a8a !important;
    font-size: 15px;
    margin-top: 18px;
    page-break-after: avoid;
  }

  .resultado p,
  .resultado li {
    font-size: 12px;
    line-height: 1.45;
  }

  table {
    font-size: 10.5px !important;
    page-break-inside: avoid;
  }

  th {
    background: #e5e7eb !important;
    color: #111827 !important;
  }

  td,
  th {
    padding: 6px !important;
  }

  .alerta {
    border: 1px solid #f97316;
    background: #fff7ed !important;
    padding: 10px;
    page-break-inside: avoid;
  }

  a[href]::after {
    content: "";
  }
}