/* =========================
   VARIABLES DE ESTILO
   ========================= */
:root {
  --bg-main: #7f9fc9;
  --bg-card: #ffffff;
  --primary: #ffffff;
  --accent: #5f7fb0;
  --border-soft: rgba(255,255,255,0.6);
  --text-dark: #1f2a44;
}

/* =========================
   RESET BÁSICO
   ========================= */
* {
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

/* =========================
   BODY FLEX (FOOTER AL PIE)
   ========================= */
html, body {
  height: 100%;
}

body {
  margin: 0;
  padding: 40px 24px;
  background: var(--bg-main);
  color: var(--primary);

  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =========================
   TÍTULOS PRINCIPALES (PORTADA)
   ========================= */
h1 {
  text-align: center;
  font-size: 3rem;
  letter-spacing: 2px;
  margin: 0;
}

h1 + h1 {
  font-size: 1.5rem;
  font-weight: 300;
  margin-top: 12px;
}

/* =========================
   BOTONES PRINCIPALES (PORTADA)
   ========================= */
#btnTarjeta,
#btnProrrateo {
  display: block;
  margin: 40px auto 0 auto;
  padding: 18px 40px;
  font-size: 1.3rem;
  font-weight: 600;
  background: transparent;
  color: white;
  border: 2px solid var(--border-soft);
  border-radius: 60px;
  cursor: pointer;
  transition: all 0.25s ease;
  min-width: 320px;
}

#btnTarjeta:hover,
#btnProrrateo:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

/* =========================
   SECCIONES (TARJETA / PRORRATEO)
   ========================= */
section {
  background: var(--bg-card);
  color: var(--text-dark);
  margin: 40px auto;
  padding: 30px;
  max-width: 1200px;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* =========================
   SUBTÍTULOS
   ========================= */
h2, h3 {
  color: var(--accent);
  margin-top: 0;
}

h2 {
  text-align: center;
  font-size: 2rem;
}

/* =========================
   FIELDSETS (CARDS)
   ========================= */
fieldset {
  border: 1px solid #ddd;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}

legend {
  padding: 0 10px;
  font-weight: 600;
  color: var(--accent);
}

/* =========================
   LABELS & INPUTS
   ========================= */
label {
  display: inline-flex;
  flex-direction: column;
  margin-right: 16px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

input, textarea, select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 0.9rem;
}

/* quitar flechas number */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
}

/* =========================
   BOTONES INTERNOS
   ========================= */
button {
  margin-top: 16px;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover {
  background: #4e6ea3;
}

/* =========================
   TABLAS
   ========================= */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 0.85rem;
}

th, td {
  border: 1px solid #bbb;
  padding: 6px 8px;
  text-align: center;
}

th {
  background: #eef2f9;
}

/* =========================
   CÉDULA 4 
   ========================= */

.panel{
  border: 1px solid #d0d0d0;
  border-radius: 10px;
  padding: 12px;
  margin: 12px 0;
  background: #fff;
}

.fila{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.campo{
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
}

.campo.ancho{
  flex: 1;
  min-width: 280px;
}

.nota{
  font-size: 0.9rem;
  opacity: 0.85;
}

.alerta{
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #f0c36d;
  background: #fff4d6;
  margin: 10px 0;
}

.checklist{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 0;
}

.checkItem{
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  padding: 6px 10px;
  background: #fafafa;
}

.tablaWrap{
  overflow-x: auto;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
}

.tabla{
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.tabla th, .tabla td{
  border-bottom: 1px solid #eee;
  padding: 10px;
  text-align: right;
  white-space: nowrap;
}

.tabla th:first-child,
.tabla td:first-child{
  text-align: left;
  font-weight: 600;
}

.tabla thead th{
  background: #f6f7f8;
  font-weight: 700;
}

.resaltado{
  font-weight: 800;
  border-top: 2px solid #333;
}

/* =========================
   CÉDULA 5 Y 6 (EXTRA)
   ========================= */
.c56Header{
  text-align: center;
  margin-bottom: 10px;
}

.c56Volver{
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  border: 2px solid rgba(95,127,176,0.35);
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.2s ease;
}

.c56Volver:hover{
  background: rgba(95,127,176,0.10);
}

/* =========================
   PASO FINAL PDF
   ========================= */
#finalPDFStep {
  background: #f6f8fc;
  border-radius: 16px;
  padding: 20px;
}

#btnDescargarReportePDF {
  background: #2f4f85;
  font-size: 1rem;
  padding: 12px 28px;
}

#btnDescargarReportePDF:hover {
  background: #243b66;
}

/* =========================
   FOOTER ACADÉMICO (AL PIE)
   ========================= */
#appFooter {
  margin-top: auto;        /* ← empuja al fondo */
  text-align: center;
}

.footer-bar {
  height: 14px;
  background: #6f8fb8;
}

.footer-content {
  background: #ffffff;
  color: #3a4f73;
  padding: 14px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1.5;
}

/* =========================
   FOOTER EN PDF / IMPRESIÓN
   ========================= */
@media print {
  #appFooter {
    page-break-inside: avoid;
  }
}
