:root{--azul:#082b5b;--celeste:#0b5cab;--fondo:#f4f7fb;--verde:#087f5b;--rojo:#b42318;}
*{box-sizing:border-box} body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;background:var(--fondo);color:#172033;-webkit-font-smoothing:antialiased}
header{background:linear-gradient(135deg,var(--azul),var(--celeste));color:#fff;padding:22px 28px}
header h1{margin:0;font-size:28px} header p{margin:6px 0 0;opacity:.9}
nav{display:flex;gap:8px;flex-wrap:wrap;padding:12px 20px;background:#fff;border-bottom:1px solid #dbe2ea;position:sticky;top:0;z-index:5}
nav button,.btn{border:0;border-radius:8px;padding:10px 14px;cursor:pointer;font-weight:700}
nav button{background:#edf2f7;color:#334155} nav button.active{background:var(--azul);color:#fff}
main{max-width:1400px;margin:auto;padding:20px} .view{display:none} .view.active{display:block}
.card{background:#fff;border:1px solid #dce3eb;border-radius:12px;padding:18px;margin-bottom:18px;box-shadow:0 3px 12px #0f172a0b}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}
.stat{background:#f8fafc;border:1px solid #e5e7eb;border-radius:10px;padding:14px} .stat b{display:block;font-size:28px;margin-top:5px;color:var(--azul)}
input,select{width:100%;padding:11px;border:1px solid #cbd5e1;border-radius:8px;margin:6px 0 12px;font-size:15px}
table{width:100%;border-collapse:collapse;margin-top:12px} th,td{padding:10px;border-bottom:1px solid #e5e7eb;text-align:left} th{background:#f1f5f9;position:sticky;top:56px}
.tablewrap{overflow:auto;max-height:68vh} .btn.primary{background:var(--azul);color:#fff} .btn.green{background:var(--verde);color:#fff} .btn.red{background:var(--rojo);color:#fff} .btn.gray{background:#64748b;color:#fff}
.notice{padding:12px;border-left:4px solid var(--celeste);background:#eff6ff;border-radius:6px;margin:10px 0}
.status{font-weight:700;padding:4px 9px;border-radius:999px;font-size:12px} .out{background:#fff1f0;color:#b42318} .back{background:#ecfdf3;color:#087443}
.credgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:14px}
.cred{border:2px solid var(--azul);border-radius:14px;overflow:hidden;background:#fff;min-height:205px}
.credtop{background:var(--azul);color:#fff;padding:12px 15px;font-weight:800;letter-spacing:.4px}
.credbody{padding:15px;position:relative} .credlogo{position:absolute;top:12px;right:12px;width:58px;height:58px;object-fit:contain} .credbody h3{margin:0 70px 10px 0;color:var(--azul)} .code{font-size:14px;font-weight:800;letter-spacing:1px;margin-top:6px;text-align:center}.barcode{width:100%;height:55px;margin-top:8px;display:block}
.small{font-size:12px;color:#64748b}
.headrow{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.headtitle{display:flex;align-items:center;gap:14px}
.head-logo{width:56px;height:56px;object-fit:contain;background:#fff;border-radius:12px;padding:4px}
.userbadge{background:#ffffff22;border:1px solid #ffffff55;border-radius:999px;padding:8px 14px;font-size:14px}
.userbadge .btn{padding:6px 10px;margin:0}
.login-card{max-width:480px;margin:40px auto}
#login input{margin-bottom:4px}
/* ===== Hero / portal de ingreso (diseño limpio profesional) ===== */
.hero{background:#fff;color:#172033;padding:0 0 64px;border-top:4px solid var(--azul)}
.hero-top{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding:16px 32px;background:#fff;border-bottom:1px solid #e8edf3}
.brand{display:flex;align-items:center;gap:12px}
.brand-logo{width:44px;height:44px;object-fit:contain}
.brand strong{display:block;font-size:16px;color:var(--azul);letter-spacing:.1px}
.brand span{font-size:12px;color:#64748b}
.hero-top .btn{text-decoration:none;border-radius:10px}
.hero-body{max-width:680px;margin:64px auto 0;padding:0 24px;text-align:center}
.hero-logo{width:112px;height:112px;object-fit:contain;margin-bottom:20px}
.eyebrow{font-size:12px;font-weight:700;letter-spacing:3px;text-transform:uppercase;color:var(--celeste);margin:0 0 12px}
.hero-body h1{font-size:clamp(38px,5vw,58px);margin:0 0 14px;line-height:1.05;letter-spacing:-1.5px;color:var(--azul);font-weight:800}
.lede{font-size:19px;color:#475569;max-width:520px;margin:0 auto;line-height:1.5}
.hero-actions{margin:32px 0 16px}
.btn-lg{font-size:17px;padding:15px 34px;text-decoration:none;display:inline-block;border-radius:10px}
.btn.primary.btn-lg{box-shadow:0 10px 24px #082b5b2e}
.hero-note{font-size:13px;color:#94a3b8;margin:0}
.hero-foot{text-align:center;color:#94a3b8;font-size:13px;padding:24px;border-top:1px solid #e8edf3;background:#fff}
/* ===== Hero robusto: funcionalidades ===== */
.hero-main{max-width:1000px;margin:0 auto;padding:36px 24px 8px}
.feat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px}
.feat{display:flex;gap:12px;align-items:flex-start;background:#fff;border:1px solid #e5eaf1;border-radius:14px;padding:16px;box-shadow:0 2px 10px #0f172a08}
.feat-ic{font-size:26px;line-height:1}
.feat b{display:block;font-size:15px;color:var(--azul);margin-bottom:4px}
.feat p{margin:0;font-size:13px;color:#64748b;line-height:1.45}
.hero-cta-bottom{text-align:center;padding:28px 0 8px}
/* ===== Login ===== */
.login-logo{display:block;width:76px;height:76px;object-fit:contain;margin:0 auto 10px}
.login-card h2{text-align:center;margin-top:0}
/* ===== Pulido general ===== */
.btn{transition:filter .15s ease,transform .1s ease}
.btn:hover{filter:brightness(1.07)}
.btn:active{transform:scale(.98)}
nav button{transition:background .15s ease}
input:focus,select:focus{outline:2px solid #0b5cab55;border-color:var(--celeste)}
.login-card{box-shadow:0 10px 30px #082b5b14}
/* ===== Hoja de vida / informe apoderado ===== */
#reportSheet .sheet-head{display:flex;gap:14px;align-items:center;border-bottom:3px solid var(--azul);padding-bottom:12px;margin-bottom:12px}
#reportSheet .sheet-head img{width:64px;height:64px;object-fit:contain}
#reportSheet .sheet-head h2{margin:0;color:var(--azul);font-size:22px}
#reportSheet .sheet-head p{margin:4px 0 0;color:#64748b;font-size:13px}
.sheet-meta{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:6px 16px;background:#f8fafc;border:1px solid #e5eaf1;border-radius:10px;padding:12px 14px;margin-bottom:12px;font-size:14px}
.sheet-table{width:100%;border-collapse:collapse;font-size:14px}
.sheet-table th{background:var(--azul);color:#fff;padding:10px;text-align:left}
.sheet-table td{padding:9px 10px;border-bottom:1px solid #e5eaf1}
.sheet-foot{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:18px;font-size:13px;color:#475569}
.sheet-foot .sign{text-align:center;margin-top:26px}
/* ===== Modal de credencial (mismas medidas que la tarjeta) ===== */
#creds .cred{cursor:pointer;transition:box-shadow .15s ease,transform .1s ease}
#creds .cred:hover{box-shadow:0 8px 22px #082b5b22}
#credModal{display:none;position:fixed;inset:0;background:#0f172acc;z-index:50;align-items:center;justify-content:center;padding:20px}
#credModal.open{display:flex}
.modal-box{background:#fff;border-radius:16px;padding:20px;width:100%;max-width:400px;box-shadow:0 20px 60px #00000055}
.modal-box .cred{width:100%;cursor:default}
.modal-actions{display:flex;gap:8px;margin-top:14px;flex-wrap:wrap}
.modal-actions .btn{flex:1;white-space:nowrap}
@media print{*{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}header,nav,.noPrint{display:none!important}.view{display:none!important}#credenciales{display:block!important}.cred{break-inside:avoid}
body.print-single header,body.print-single #app{display:none!important}
body.print-single #credModal{display:block!important;position:static;background:none;padding:0}
body.print-single .modal-box{box-shadow:none;max-width:none;padding:0}
body.print-single .modal-actions{display:none!important}
body.print-report header,body.print-report #app nav,body.print-report #app .noPrint,body.print-report #informes .card:first-child{display:none!important}
body.print-report #informes{display:block!important}
body.print-report #informes .card:last-child{border:none;box-shadow:none}}
