/* ── Reset & Base ── */
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:Arial,sans-serif;background:linear-gradient(160deg,#eef2fa 0%,#e4ebf6 45%,#dde6f3 100%);color:#1e293b;font-size:10.5pt;padding:48px 0}

/* ── Page ── */
.page{
  width:210mm;
  margin:0 auto;
  background:#fff;
  border-radius: 40px;
  box-shadow: 0 50px 50px rgba(30, 45, 69, .3), 0 24px 48px -12px rgba(30, 45, 69, 0.3);
  border-color: #cdcdcd40;
  border-style: solid;
  border-width: 7px;
  overflow:hidden
}



/* ── Header ── */
.hdr{background:#ecf4fb;color:#1a2a4a;padding:10px}
.hdr-top{display:flex;justify-content:space-between;align-items:center}
.hdr-left{display:flex;align-items:center;gap:16px}
.logo-wrap{border-radius:10px;padding:6px 14px;display:flex;align-items:center;justify-content:center;height:52px;margin-top:7px}
.logo-img{height:70px;width:auto}
.hdr-titles{display:flex;flex-direction:column}
.hdr-logo-empresa{margin-left:auto;background: #fff; padding: 10px; border-radius: 10px;}
.hdr-logo-empresa-img{max-height:48px;width:auto;object-fit:contain}
.hdr-meta{font-size:10pt;color:#3a82c4;text-transform:uppercase;letter-spacing:1.5px;margin-bottom:2px}
.hdr-title{font-family:Georgia,'Times New Roman',serif;font-size:17pt;font-weight:800;line-height:1.1;color:#1a2a4a}
.hdr-sub{font-size:10pt;color:#5b7fa6;margin-top:2px}

/* ── Candidate Banner ── */
.cand-banner{background:#f0f6fc;border-bottom:1px solid #d6e8f5;padding:20px 30px;display:flex;align-items:center;gap:30px}
.cand-name{font-size:13pt;font-weight:800;color:#2d5fa6}
.cand-meta{font-size:11pt;color:#6b7280}
.cand-tag{font-size:10pt;font-weight:700;border-radius:20px;padding:3px 10px;display:inline-block}
.cand-tag--elegibilidad{margin-left:auto;background:#d6e8f5;color:#2d5fa6;border:1px solid #c4ddf0}

/* ── Section ── */
.section-block{padding:18px 30px 10px}
.sec{font-size:13pt;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:#3a82c4;margin-bottom:10px;margin-top:30px;padding-bottom:4px;border-bottom:1.5px solid #d6e8f5}

/* ── Perfil Grid ── */
.perfil-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px}
.perfil-card{background:#f0f6fc;border:1px solid #d6e8f5;border-radius:10px;padding:12px 14px}
.perfil-card-title{font-size:11pt;font-weight:800;color:#3a82c4;text-transform:uppercase;letter-spacing:.8px;margin-bottom:8px;padding-bottom:4px;border-bottom:1px solid #d6e8f5}
.perfil-row{display:flex;gap:10px;margin-bottom:5px;font-size:10pt}
.perfil-val{color:#1e293b}

/* ── Pruebas Grid ── */
.pruebas-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;margin-bottom:14px}
.prueba-item{border:1px solid #e5e7eb;border-radius:10px;padding:11px;background:#fff;display:flex;gap:12px;align-items:flex-start}
.prueba-img-wrap{width:48px;height:48px;background:#3679c5;border-radius:10px;display:flex;align-items:center;justify-content:center;padding:6px;flex-shrink:0}
.prueba-img{width:36px;height:36px;object-fit:contain}
.prueba-info{flex:1;min-width:0}
.prueba-nombre{font-size:9.5pt;font-weight:800;color:#2d5fa6;margin-bottom:4px;line-height:1.3}
.prueba-tags{display:flex;gap:6px;flex-wrap:wrap}
.norma-label{display:inline-block;font-size:8.5pt;font-weight:700;color:#3a82c4;background:#edf4fb;border:1px solid #c4ddf0;border-radius:20px;padding:1px 8px}

/* ── Competencias Grid (página 1) ── */
.comp-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px}
.comp-item{border:1px solid #e5e7eb;border-radius:10px;padding:11px;background:#fff;display:flex;gap:12px;align-items:flex-start}
.comp-icon{flex-shrink:0;width:48px;height:48px;border-radius:10px;background:#3679c5;border:none;display:flex;align-items:center;justify-content:center;padding:6px}
.comp-icon svg{stroke:#fff!important;width:28px;height:28px}
.comp-info{flex:1;min-width:0}
.comp-nombre{font-size:9.5pt;font-weight:800;color:#2d5fa6;margin-bottom:4px}

/* ── Conclusion Box ── */
.concl-box{border-radius:10px;padding:12px 14px;font-size:10pt;line-height:1.65}
.concl-box--azul{background:#d6e8f5;border:1px solid #c4ddf0;margin-bottom:20px}
.concl-titulo{color:#2d5fa6;display:block;margin-bottom:4px;font-size:16px}
.concl-texto{font-size:10pt;color:#374151}

/* ── Resumen ── */
.resumen{position:relative;background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:16px 20px;font-size:12pt;color:#1e293b;line-height:1.7;margin-bottom:14px}

/* ── Cards (pruebas psicométricas) ── */
.nb{font-size:10pt;font-weight:700;border-radius:20px;padding:2px 5px;display:inline-block;white-space:nowrap;text-align:center;min-width:60px;background:#d6e8f5;color:#2d5fa6}
.cbox{border:1px solid #e5e7eb;border-radius:10px;padding:10px}
.ctitle{font-size:10pt;font-weight:700;color:#4b5563;margin:20px 0;text-align:center;text-transform:uppercase;letter-spacing:.5px}
.cwrap{position:relative;height:200px}
.cgrid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px;align-items:start}
.card{border:1px solid #e5e7eb;border-radius:10px;padding:11px;background:#fff;margin-bottom:10px;page-break-inside:avoid;break-inside:avoid}
.card-hdr{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:4px}
.card-name{font-size:11pt;font-weight:700;color:#1e293b;line-height:1.2;margin-bottom:10px}
.card-sc{font-size:17pt;font-weight:900;line-height:1;text-align:right}
.card-sl{font-size:10pt;color:#9ca3af;text-align:right}
.card-bw{background:#f1f5f9;border-radius:10px;height:5px;margin:4px 0 6px}
.card-bf{height:5px;border-radius:10px}
.card-desc{font-size:9pt;color:#1e293b;line-height:1.5;margin-top:20px}
.card-desc--mt{margin-top:10px}
.card--wide{grid-row:span 2;align-self:start;margin-bottom:0}
.card--error{border-color:#fca5a5;background:#fff7f7;display:flex;gap:12px;align-items:flex-start;margin-bottom:14px}
.card--error-icon{flex-shrink:0;margin-top:2px}
.card--error-text{font-size:9.5pt;color:#7f1d1d;line-height:1.6}

/* ── Tables ── */
.ptest-tbl{width:100%;border-collapse:collapse;font-size:9pt;margin:20px 0}
.ptest-tbl th{background:#eff6fc;color:#3a82c4;padding:6px;text-align:left}
.ptest-tbl td{padding:8px;border-bottom:1px solid #ccd1d5}
.ptest-tbl .tc{text-align:center}
.ptest-tbl .err{color:#b91c1c}

/* ── Charts ── */
.chart-wrap-center{display:flex;justify-content:center;margin-top:12px}
.chart-radar-wrap{position:relative;max-width:500px;margin:0 auto}
.chart-imd-bar{margin-top:25px}
.chart-peg-sub{margin-top:8px}
.chart-peg-sub canvas{display:block}
.cbox--radar{padding:12px;margin-bottom:12px}
.ctitle--no-margin{margin-bottom:0}

/* ── PEG Section ── */
.peg-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px}
.peg-col-title{font-size:10pt;font-weight:700;color:#2d5fa6;margin-bottom:4px}
.peg-cards-col{display:flex;flex-direction:column;gap:12px}
.peg-tbl-wrap{margin-bottom:8px}

/* ── IA Análisis de Competencias ── */
.ia-resumen{margin-bottom:20px;line-height:1.75;font-size:10.5pt}
.ia-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px}
.ia-card{border:1px solid #d6e8f5;border-radius:10px;padding:14px 16px;background:#fff}
.ia-card-title{font-size:12pt;font-weight:800;color:#2d5fa6;margin-bottom:8px;padding-bottom:6px;border-bottom:1px solid #edf4fb}
.ia-card-niveles{display:flex;gap:6px;margin-bottom:10px;align-items:center;font-size:8pt;color:#6b7280}
.ia-pill-lbl{margin-left:4px}
.ia-pill-req{display:inline-block;font-size:8.5pt;font-weight:700;color:#6b7280;background:#f3f4f6;border:1px solid #e5e7eb;border-radius:20px;padding:2px 10px}
.ia-pill-obt{display:inline-block;font-size:8.5pt;font-weight:700;color:#3a82c4;background:#edf4fb;border:1px solid #c4ddf0;border-radius:20px;padding:2px 10px}
.ia-justificacion{font-size:9.5pt;color:#374151;line-height:1.65;margin-bottom:10px}
.ia-datos{background:#f3f4f6;border-radius:6px;padding:8px 10px;font-size:8.5pt;color:#6b7280;font-style:italic;line-height:1.5;border-left:3px solid #d1d5db}

/* ── Desarrollo Profesional ── */
.dev-full-list{display:flex;flex-direction:column;gap:10px;margin-bottom:16px}
.dev-full-card,.dev-plan-card{border:1px solid #d0e4f7;border-radius:8px;padding:12px 16px;background:#fff}
.dev-full-card{border-left:4px solid #3a82c4}
.dev-plan-card{border-left:4px solid #2d5fa6}
.dev-full-title{font-size:10pt;font-weight:800;color:#2d5fa6;margin-bottom:6px}
.dev-full-body{font-size:9.5pt;line-height:1.6;color:#374151;margin-bottom:6px}
.dev-act-list{margin:6px 0 6px 18px;font-size:9.5pt;line-height:1.7;color:#374151}
.dev-sub-label{font-size:8pt;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:#3a82c4;margin:8px 0 3px}
.dev-plazo{font-size:8.5pt;color:#6b7280;font-style:italic;margin-top:6px}

/* ── Utilities ── */
.no-break{page-break-inside:avoid}.page-break{page-break-before:always;border-top:3px solid #d6e8f5;margin-top:0}
.pbtn{position:fixed;top:16px;right:16px;background:#2d72c8;color:#fff;border:none;border-radius:8px;padding:8px 16px;font-size:10pt;font-weight:700;cursor:pointer;box-shadow:0 4px 12px rgba(29,78,216,.35);z-index:999}

.pg-elegibilidad{display:inline-block;font-size:15pt;font-weight:800;border-radius:10px;padding:10px 22px;margin-bottom:16px;background:#d6e8f5;color:#2d5fa6;border:1.5px solid #c4ddf0}
.pg-elegibilidad--elegible{background:#dcfce7;color:#166534;border-color:#bbf7d0}
.pg-elegibilidad--no-es-elegible{background:#fee2e2;color:#991b1b;border-color:#fecaca}
.pg-bloque{margin-bottom:14px;padding:14px 16px;border:1px solid #d6e8f5;border-radius:8px;background:#fff;border-left:4px solid #3a82c4}
.pg-titulo{font-size:10pt;font-weight:700;text-transform:uppercase;color:#3a82c4;letter-spacing:.6px;margin-bottom:6px}
.pg-texto{font-size:10pt;color:#374151;line-height:1.7}

.entrev-list{display:flex;flex-direction:column;gap:12px}
.entrev-item{border:1px solid #d0d8e8;border-radius:6px;overflow:hidden}
.entrev-hdr{display:flex;align-items:flex-start;gap:12px;padding:12px;background:#f4f7fc}
.entrev-num{min-width:28px;height:28px;background:#3a82c4;color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;flex-shrink:0}
.entrev-text{font-size:13px;font-weight:600;color:#1a2a4a;line-height:1.4}
.entrev-body{display:grid;grid-template-columns:1fr 1fr}
.entrev-col{padding:10px 14px;font-size:12px}
.entrev-col:first-child{border-right:1px solid #d0d8e8}
.entrev-col-title{font-size:10px;font-weight:700;text-transform:uppercase;color:#3a82c4;margin-bottom:4px;letter-spacing:.5px}
.entrev-col-text{color:#3a4a5a;line-height:1.45}
.entrev-notes{border-top:1px dashed #c0cad8;padding:10px 14px}
.entrev-notes-label{font-size:10px;font-weight:700;text-transform:uppercase;color:#8899aa;margin-bottom:8px;letter-spacing:.5px}
.entrev-lines{display:flex;flex-direction:column;gap:30px}
.entrev-line{height:1px;background:#d8e2ee}

/* ── Carta de Presentación ─────────────────────────────────── */
.ii-seccion--carta{page-break-before:always}
.carta-wrap{display:flex;min-height:700px;border:1px solid #d6e8f5;border-radius:6px;overflow:hidden;margin:20px 30px}
.carta-sidebar{width:200px;min-width:200px;background:#edf4fb;border-right:2px solid #d6e8f5;padding:28px 18px;display:flex;flex-direction:column;gap:0}
.carta-sidebar-titulo{font-size:13pt;font-weight:800;line-height:1.2;color:#2d5fa6;margin-bottom:10px}
.carta-sidebar-fecha{font-size:8.5pt;color:#5b7fa6;margin-bottom:4px}
.carta-sidebar-sep{border-top:1px solid #d6e8f5;margin:12px 0}
.carta-sidebar-label{font-size:7.5pt;text-transform:uppercase;letter-spacing:.06em;color:#3a82c4;font-weight:700;margin-bottom:4px}
.carta-sidebar-nombre{font-size:10pt;font-weight:700;color:#1a2a4a;line-height:1.3}
.carta-sidebar-dato{font-size:9pt;color:#374151;line-height:1.4;margin-top:2px}
.carta-sidebar-contacto-wrap{margin-top:auto}
.carta-sidebar-contacto{display:flex;align-items:flex-start;gap:6px;font-size:8.5pt;color:#374151;line-height:1.4;margin-bottom:4px}
.carta-sidebar-contacto svg{flex-shrink:0;margin-top:2px;stroke:#3a82c4}
.carta-sidebar-firma{margin-top:auto;padding-top:16px;border-top:1px solid #d6e8f5}
.carta-firma-logo{height:32px;width:auto;margin-bottom:6px;display:block}
.carta-firma-nombre{font-size:9pt;font-weight:700;color:#2d5fa6}
.carta-firma-cargo{font-size:7.5pt;color:#5b7fa6;line-height:1.4}
.carta-body{flex:1;background:#fff;padding:32px;display:flex;flex-direction:column;justify-content:flex-start}
.carta-body-titulo{font-size:22pt;font-weight:800;color:#3a82c4;text-transform: uppercase; line-height:1.15;margin-bottom:28px}
.carta-body-destinatario{font-size:11pt;font-weight:600;color:#1a2a4a;margin-bottom:20px}
.carta-body-texto{font-size:13px;color:#374151;line-height:1.5}
.carta-body-texto strong{color:#2d5fa6}
.carta-body-firma{margin-top:10px;padding-top:10px;border-top:1px solid #e5e7eb}
.carta-firma-logo-body{height:36px;width:auto;margin-bottom:6px;display:block;filter:brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(800%) hue-rotate(190deg) brightness(90%)}
.carta-firma-nombre-body{font-size:10pt;font-weight:700;color:#2d5fa6}
.carta-firma-cargo-body{font-size:8.5pt;color:#5b7fa6}

@media print{
  @page{margin:0;size:A4}
  body{background:#fff;padding:0}
  .page{margin:0;border-radius:0;box-shadow:none;width:100%}
  .pbtn{display:none!important}
  *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .carta-wrap{break-inside:avoid}
}
