:root{--azul:#0f2f5f;--azul2:#1d4ed8;--oro:#f5b942;--fondo:#f4f7fb;--texto:#172033;--muted:#64748b;--ok:#0f766e;--warn:#b45309;--bad:#b91c1c;--card:#ffffff;--line:#dbe3ef;--shadow:0 14px 35px rgba(15,47,95,.12)}*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--fondo);color:var(--texto)}a{color:inherit;text-decoration:none}.app-shell{display:grid;grid-template-columns:280px 1fr;min-height:100vh}.sidebar{background:linear-gradient(180deg,#0f2f5f,#08203f);color:white;padding:1.2rem;position:sticky;top:0;height:100vh;overflow:auto}.brand{display:flex;gap:.8rem;align-items:center;margin-bottom:1.2rem}.brand-mark{width:54px;height:54px;border-radius:16px;background:linear-gradient(135deg,#f5b942,#fff2c7);color:#0f2f5f;display:grid;place-items:center;font-weight:900;font-size:1.25rem;box-shadow:0 10px 25px rgba(0,0,0,.2)}.brand h1{font-size:1rem;margin:0;line-height:1.15}.brand p{margin:.2rem 0 0;color:#c7d2fe;font-size:.72rem}.nav{display:grid;gap:.45rem}.nav a{padding:.75rem .85rem;border-radius:.8rem;color:#dbeafe;font-weight:700;font-size:.92rem}.nav a:hover,.nav a.active{background:rgba(255,255,255,.13);color:#fff}.side-note{margin-top:1.2rem;padding:.9rem;border:1px solid rgba(255,255,255,.18);border-radius:1rem;color:#dbeafe;font-size:.78rem;line-height:1.45}.main{padding:1.4rem;min-width:0}.topbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}.topbar h2{margin:0;font-size:1.6rem;color:#0f2f5f}.filters{display:flex;gap:.6rem;flex-wrap:wrap;align-items:center}.select,input{border:1px solid var(--line);border-radius:.8rem;background:white;padding:.65rem .8rem;color:var(--texto);font-weight:650;min-width:150px}.grid{display:grid;gap:1rem}.cards{grid-template-columns:repeat(4,minmax(0,1fr))}.card{background:var(--card);border:1px solid var(--line);border-radius:1.05rem;padding:1rem;box-shadow:var(--shadow)}.metric-label{color:var(--muted);font-size:.78rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.metric-value{font-size:2rem;font-weight:900;color:#0f2f5f;margin:.25rem 0}.metric-sub{font-size:.8rem;color:var(--muted)}.section-title{font-size:1rem;text-transform:uppercase;letter-spacing:.08em;color:#475569;margin:1.4rem 0 .7rem;font-weight:900}.panel-title{display:flex;justify-content:space-between;gap:.7rem;align-items:center;margin-bottom:.75rem}.panel-title h3{margin:0;color:#0f2f5f}.pill{display:inline-flex;align-items:center;gap:.25rem;padding:.3rem .55rem;border-radius:999px;background:#e0ecff;color:#1e40af;font-size:.73rem;font-weight:800}.pill.ok{background:#d1fae5;color:#065f46}.pill.warn{background:#fef3c7;color:#92400e}.pill.bad{background:#fee2e2;color:#991b1b}.table-wrap{overflow:auto;border-radius:.8rem;border:1px solid var(--line)}table{width:100%;border-collapse:collapse;background:white}th,td{padding:.65rem .75rem;border-bottom:1px solid #edf2f7;text-align:left;font-size:.87rem}th{background:#f8fafc;color:#475569;text-transform:uppercase;font-size:.72rem;letter-spacing:.04em}td.num,th.num{text-align:right}.bar{height:10px;background:#e5e7eb;border-radius:999px;overflow:hidden}.bar span{display:block;height:100%;background:linear-gradient(90deg,#1d4ed8,#0f766e)}.chart{display:flex;gap:.7rem;align-items:end;height:220px;padding:1rem;border-radius:1rem;background:#f8fafc;border:1px solid var(--line)}.chart-col{flex:1;display:grid;align-items:end;gap:.35rem;text-align:center;min-width:54px}.chart-bar{background:linear-gradient(180deg,#1d4ed8,#0f2f5f);border-radius:.7rem .7rem .2rem .2rem;min-height:4px}.chart-label{font-size:.72rem;color:#64748b;font-weight:800}.chart-value{font-size:.78rem;color:#0f2f5f;font-weight:900}.two{grid-template-columns:1.2fr .8fr}.three{grid-template-columns:repeat(3,minmax(0,1fr))}.notice{background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;border-radius:1rem;padding:1rem;font-weight:650}.empty{color:#64748b;text-align:center;padding:2rem;border:1px dashed #cbd5e1;border-radius:1rem;background:#fff}.btn{border:0;border-radius:.8rem;padding:.72rem .95rem;font-weight:850;cursor:pointer;background:#0f2f5f;color:white}.btn.secondary{background:#e2e8f0;color:#0f172a}.btn.ok{background:#0f766e}.btn:disabled{opacity:.45;cursor:not-allowed}.recommendation{border-left:5px solid #1d4ed8;background:#f8fafc;padding:.9rem;border-radius:.75rem;margin-bottom:.7rem}.recommendation h4{margin:.1rem 0 .35rem;color:#0f2f5f}.footer{margin-top:2rem;padding:1rem;text-align:center;color:#64748b;font-size:.8rem}.print-area{background:white;color:#111;padding:1rem}.cert-preview{border:10px solid #0f2f5f;border-radius:1rem;background:linear-gradient(135deg,#fff,#f8fbff);padding:2rem;text-align:center;min-height:430px;display:grid;align-content:center;gap:.7rem}.cert-preview h1{font-family:Georgia,serif;color:#0f2f5f;font-size:2rem;margin:0}.cert-preview .school{font-size:1.6rem;font-weight:900;color:#111}.cert-preview .award{color:#0f766e;font-size:1.1rem;font-weight:900}.hide{display:none!important}@media(max-width:1050px){.app-shell{grid-template-columns:1fr}.sidebar{position:relative;height:auto}.cards,.two,.three{grid-template-columns:1fr}.topbar{align-items:flex-start;flex-direction:column}.main{padding:1rem}}@media print{.sidebar,.filters,.btn,.nav,.side-note{display:none!important}.app-shell{display:block}.main{padding:0}.card{box-shadow:none;border:0}.footer{display:none}.no-print{display:none!important}}

/* Ajustes PAM v1.1 */
.brand-logo{width:74px;height:74px;object-fit:contain;filter:drop-shadow(0 8px 18px rgba(0,0,0,.28));flex:0 0 auto}
.brand-mark{display:none}
.brand-mark-text{display:none}
.brand h1{font-size:.95rem;text-transform:uppercase;letter-spacing:.02em}.brand p{color:#e0f2fe}.sidebar{background:linear-gradient(180deg,#00584a,#003b34 55%,#062d2b)}.topbar h2{color:#00584a}.nav a:hover,.nav a.active{background:rgba(255,255,255,.16);border-left:4px solid #f5b942}.metric-value,.panel-title h3{color:#00584a}.btn{background:#00584a}.chart-bar{background:linear-gradient(180deg,#14b8a6,#00584a)}

.certificate{position:relative;overflow:hidden;background:#fffdf8;border:7px solid #00584a;outline:2px solid #c6942f;outline-offset:-18px;border-radius:.35rem;min-height:560px;padding:2rem 2.1rem 1.35rem;text-align:center;box-shadow:0 16px 45px rgba(0,0,0,.18);font-family:Georgia,'Times New Roman',serif;color:#172033}
.cert-corner{position:absolute;width:190px;height:190px;background:linear-gradient(135deg,#00584a,#008a7a);z-index:0}.cert-corner-left{left:-98px;top:-98px;transform:rotate(45deg)}.cert-corner-right{right:-98px;bottom:-98px;transform:rotate(45deg)}.certificate::before{content:'';position:absolute;inset:24px;border:1px solid rgba(198,148,47,.42);pointer-events:none}.cert-header,.cert-body,.cert-footer{position:relative;z-index:1}.cert-header{display:flex;align-items:center;justify-content:center;gap:1rem;margin-bottom:1.2rem}.cert-logo{width:92px;height:92px;object-fit:contain}.cert-small{text-transform:uppercase;letter-spacing:.16em;font-family:Inter,system-ui,sans-serif;font-size:.72rem;font-weight:900;color:#00584a}.cert-header h1{margin:.15rem 0 0;font-size:1.85rem;line-height:1;text-transform:uppercase;color:#152238}.cert-header h2{margin:.35rem 0 0;font-size:1.35rem;color:#a66f00;font-style:italic}.cert-body p{font-size:1rem;max-width:620px;margin:.65rem auto;line-height:1.45}.cert-body h3{font-size:2rem;margin:.5rem 0;color:#111827}.cert-semesters{display:flex;justify-content:center;gap:.45rem;flex-wrap:wrap;margin:1rem auto .5rem}.cert-semesters div{border:1px solid #ead8a3;background:#fff9e8;border-radius:.65rem;padding:.45rem .65rem;min-width:92px}.cert-semesters strong{display:block;color:#00584a;font-size:1.15rem}.cert-semesters span{display:block;font-family:Inter,system-ui,sans-serif;font-size:.68rem;color:#64748b;font-weight:800;text-transform:uppercase}.cert-footer{display:grid;grid-template-columns:1fr 1.4fr 1fr;align-items:end;gap:1rem;margin-top:1.1rem}.cert-depr{text-align:left}.cert-depr img{max-width:150px;max-height:60px;object-fit:contain}.cert-signature{text-align:center}.cert-signature img{height:58px;max-width:220px;object-fit:contain;display:block;margin:0 auto -6px}.sig-line{height:1px;background:#111827;width:250px;max-width:90%;margin:0 auto .35rem}.cert-signature strong{display:block;font-size:.9rem}.cert-signature span{display:block;font-family:Inter,system-ui,sans-serif;font-size:.72rem;color:#475569}.cert-seal{justify-self:end;width:78px;height:78px;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle,#ffe8a3,#c6942f);border:4px double #8a5a00;color:#8a5a00;font-size:2rem;box-shadow:0 8px 18px rgba(0,0,0,.16)}
@media print{.certificate{box-shadow:none;border-radius:0;break-inside:avoid;page-break-inside:avoid}.card:has(.certificate){display:block}.certificate{width:100%;min-height:95vh}.topbar,.grid.cards,.table-wrap,.panel-title,select,#btnCert,.btn{display:none!important}}


/* Ajustes PAM v1.2 */
.sidebar .brand{align-items:center}.brand h1{font-size:1.35rem;line-height:1.12}.brand p{font-size:.92rem;line-height:1.18;color:#eefcf9}.brand-logo{width:92px;height:92px}.data-warning{background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;border-radius:1rem;padding:.9rem 1rem;margin-bottom:1rem;font-weight:750}.cert-page-actions{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:.7rem}.cert-depr img{background:#fff;padding:.2rem;border-radius:.25rem;max-width:170px;max-height:70px}.certificate{width:10.35in;min-height:7.65in;margin:0 auto;aspect-ratio:11/8.5;padding:.55in .6in .35in}.cert-header h1{font-size:2.05rem}.cert-body h3{font-size:2.15rem}
@page{size:letter landscape;margin:.25in}
@media print{html,body{background:white!important;width:11in;height:8.5in;margin:0!important}.app-shell{display:block!important}.sidebar,.topbar,.filters,.nav,.side-note,.footer,.no-print,.grid.cards,.table-wrap,.panel-title,select,#btnCert,.btn,.cert-page-actions{display:none!important}.main{padding:0!important}.main>*:not(#content){display:none!important}#content{display:block!important}.grid.two{display:block!important}.grid.two>.card:first-child{display:none!important}.grid.two>.card:nth-child(2){display:block!important;border:0!important;box-shadow:none!important;padding:0!important}.grid.two>.card:nth-child(2)>*:not(#certBox){display:none!important}#certBox{display:block!important;margin:0!important}.certificate{display:block!important;width:10.5in!important;height:8in!important;min-height:8in!important;margin:0 auto!important;box-shadow:none!important;border-radius:0!important;page-break-inside:avoid!important;break-inside:avoid!important}.cert-footer{position:absolute;left:.6in;right:.6in;bottom:.35in}.cert-semesters{margin-top:.25in}}

/* Ajustes PAM v1.3 */
:root{--verde-pam:#00584a;--verde-pam-2:#00806f;--oro-pam:#c6942f}.sidebar{width:100%;padding:1rem .95rem;background:radial-gradient(circle at 20% 8%,rgba(20,184,166,.18),transparent 34%),linear-gradient(180deg,#00584a,#003f37 62%,#062d2b)}.brand{display:grid;grid-template-columns:86px minmax(0,1fr);gap:1rem;align-items:center;margin-bottom:1rem}.brand-logo{width:82px!important;height:82px!important;object-fit:contain;filter:drop-shadow(0 10px 24px rgba(0,0,0,.25))}.brand h1{font-size:1.18rem!important;line-height:1.06!important;letter-spacing:.015em!important;margin:0;max-width:13rem}.brand p{font-size:.78rem!important;line-height:1.25!important;margin:.35rem 0 0;color:#ecfffb}.nav a{font-size:.87rem}.side-note{font-size:.75rem}.data-warning strong{color:#7c2d12}.baseline-note{background:#ecfdf5;border:1px solid #99f6e4;color:#064e3b;border-radius:1rem;padding:.8rem 1rem;margin-bottom:1rem;font-weight:750}.chart-label{line-height:1.1}.chart-col.baseline .chart-bar{background:linear-gradient(180deg,#c6942f,#8a5a00)}

.certificate-preview{width:100%;overflow:auto;background:#f8fafc;border-radius:1rem;border:1px solid var(--line);padding:1rem}.certificate-image{display:block;width:100%;max-width:980px;margin:0 auto;background:white;box-shadow:0 14px 32px rgba(0,0,0,.15)}.cert-page-actions{margin-bottom:.8rem}.cert-print-frame{display:none}
@media print{body>*{display:none!important}}
@media(max-width:1050px){.brand{grid-template-columns:72px minmax(0,1fr)}.brand-logo{width:70px!important;height:70px!important}.brand h1{font-size:1.02rem!important;max-width:none}.brand p{font-size:.72rem!important}}

/* PAM v1.4: gráficas contenidas y certificados descargables */
.panel-title{flex-wrap:wrap;align-items:flex-start}.panel-title h3{line-height:1.15;overflow-wrap:anywhere}.chart{height:260px;min-height:260px;overflow:hidden;gap:.45rem;padding:1.2rem .75rem .7rem;align-items:end}.chart-col{min-width:0;grid-template-rows:auto 1fr auto;align-items:end}.chart-value{font-size:.8rem;line-height:1.05;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:clip}.chart-label{font-size:.72rem;line-height:1.05;min-height:2.2em;display:flex;align-items:flex-start;justify-content:center;text-align:center;word-break:normal}.chart-bar{width:100%;max-width:94px;margin:0 auto}.chart-col.baseline .chart-bar{background:linear-gradient(180deg,#c99a2e,#8a5a00)}
.certificate-preview{width:100%;overflow:auto;background:#eef2f7;border:1px solid var(--line);border-radius:1rem;padding:.75rem}.certificate-image{display:block;width:100%;max-width:1100px;height:auto;margin:0 auto;border-radius:.4rem;box-shadow:0 12px 30px rgba(15,47,95,.18)}
@media(max-width:720px){.chart{gap:.25rem;padding:.9rem .45rem}.chart-value{font-size:.68rem}.chart-label{font-size:.62rem}.chart-bar{max-width:62px}.brand-logo{width:74px;height:74px}.brand h1{font-size:1rem}.brand p{font-size:.78rem}}

/* PAM v1.4: encabezado lateral sin recortes */
.sidebar .brand{display:block;text-align:left}.sidebar .brand-logo{display:block;width:118px;height:118px;margin:0 0 .85rem 0}.sidebar .brand h1{font-size:1.12rem;line-height:1.12;letter-spacing:.01em;max-width:100%;overflow-wrap:break-word}.sidebar .brand p{font-size:.82rem;line-height:1.22;max-width:100%;overflow-wrap:break-word}

/* PAM v1.5: ajustes de producción visual */
.sidebar{width:280px}.brand{display:grid;grid-template-columns:86px 1fr;gap:1rem;align-items:center}.brand-logo{width:86px;height:86px}.brand h1{font-size:1.15rem;line-height:1.08;max-width:150px;word-break:normal}.brand p{font-size:.78rem;line-height:1.18;max-width:160px}.chart-safe{height:250px;align-items:end;padding:2.25rem 1rem 1.15rem;overflow:hidden}.chart-safe .chart-col{min-width:64px;position:relative;grid-template-rows:auto auto auto}.chart-safe .chart-value{font-size:.9rem;line-height:1.1;white-space:nowrap}.chart-safe .chart-bar{max-height:138px;background:linear-gradient(180deg,#14b8a6,#00584a)}.chart-safe .chart-col.baseline .chart-bar{background:linear-gradient(180deg,#d5a02b,#9a6500)}.chart-safe .chart-label{font-size:.78rem;line-height:1.05;min-height:2rem;display:flex;align-items:flex-start;justify-content:center;overflow-wrap:anywhere}.hchart{display:grid;gap:.65rem;background:#f8fafc;border:1px solid var(--line);border-radius:1rem;padding:1rem}.hchart-row{display:grid;grid-template-columns:72px minmax(140px,1fr) 72px;gap:.65rem;align-items:center}.hchart-label{font-weight:900;color:#64748b;text-align:right}.hchart-track{height:18px;background:#e5eaf2;border-radius:999px;overflow:hidden;border:1px solid #d9e2ef}.hchart-track span{display:block;height:100%;background:linear-gradient(90deg,#14b8a6,#00584a);border-radius:999px}.hchart-value{font-weight:900;color:#0f2f5f;font-variant-numeric:tabular-nums}.certificate-preview{background:#eef4f8;border:1px solid var(--line);border-radius:1rem;padding:.75rem;overflow:auto}.certificate-image{display:block;width:100%;max-width:980px;margin:0 auto;border-radius:.25rem;box-shadow:0 12px 35px rgba(0,0,0,.16)}.baseline-note{background:#eef8f5;border:1px solid #b7e4da;color:#00584a;border-radius:1rem;padding:.9rem 1rem;margin-bottom:1rem;font-weight:800}.data-warning{background:#f7fbff;border-color:#cfe0f8;color:#163b66}@media(max-width:1050px){.sidebar{width:auto}.brand{grid-template-columns:74px 1fr}.brand-logo{width:74px;height:74px}.brand h1{max-width:none}.brand p{max-width:none}.chart-safe{overflow-x:auto;justify-content:flex-start}.chart-safe .chart-col{min-width:70px}.hchart-row{grid-template-columns:58px minmax(110px,1fr) 64px}.hchart-label{text-align:left}}

/* PAM v2 CRECE */
.crece-grade-card{text-decoration:none;color:inherit}.crece-grade-card:hover{transform:translateY(-2px);box-shadow:0 14px 30px rgba(15,47,95,.1)}
