/* Admisiones UMB · blanco quirúrgico · acento = rojo del logo (#A41814). Sin librerías, sin CDN. */
@font-face{font-family:'Poppins';font-weight:400;font-display:swap;src:url(../fonts/Poppins-Regular.ttf)}
@font-face{font-family:'Poppins';font-weight:500;font-display:swap;src:url(../fonts/Poppins-Medium.ttf)}
@font-face{font-family:'Poppins';font-weight:700;font-display:swap;src:url(../fonts/Poppins-Bold.ttf)}
:root{
  --lienzo:#F4F6FA; --card:#FFFFFF; --tinta:#1B2130; --gris:#5B6475; --gris-2:#6F7788; --linea:#E6E9F0;
  --acento:#A41814; --acento-h:#8C130F; --acento-tinte:rgba(164,24,20,.07);
  --caliente-t:#B42318; --caliente-f:#FEEFEE; --caliente-d:#F04438;
  --tibio-t:#9A5B00;   --tibio-f:#FFF5DC;   --tibio-d:#F59E0B;
  --frio-t:#1D5FBF;    --frio-f:#EAF2FF;    --frio-d:#3B82F6;
  --nuevo-t:#5B6475;   --nuevo-f:#F0F2F6;   --nuevo-d:#A0A8B8;
  --desc-t:#6B7280;    --desc-f:#EEEEF0;    --desc-d:#9CA3AF;
  --ok-t:#1B7A4B; --ok-f:#E7F6EE;
  --sombra:0 1px 2px rgba(20,28,48,.05),0 8px 24px rgba(20,28,48,.07);
  --out:cubic-bezier(.23,1,.32,1); --drawer:cubic-bezier(.32,.72,0,1);
}
*{box-sizing:border-box;margin:0;padding:0}
html{background:var(--lienzo)}
body{font-family:'Poppins',system-ui,sans-serif;color:var(--tinta);background:var(--lienzo);-webkit-font-smoothing:antialiased;font-size:15px;line-height:1.45;min-height:100vh}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;border:0;background:none}
[hidden]{display:none!important}
:focus-visible{outline:2px solid var(--acento);outline-offset:2px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---------- botones ---------- */
.btn{height:42px;border-radius:10px;padding:0 18px;font-weight:500;font-size:15px;display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;text-decoration:none;transition:transform 140ms var(--out),background 160ms var(--out),box-shadow 160ms var(--out),opacity 160ms var(--out)}
.btn:active:not(:disabled){transform:scale(.97)}
.btn:disabled{opacity:.55;cursor:default}
.btn svg,.chip svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.btn.pri{background:var(--acento);color:#fff}
.btn.sec{background:#fff;color:var(--tinta);box-shadow:inset 0 0 0 1.5px var(--linea)}
.btn.ghost{color:var(--gris)}
@media (hover:hover) and (pointer:fine){
  .btn.pri:hover:not(:disabled){background:var(--acento-h)}
  .btn.sec:hover:not(:disabled){box-shadow:inset 0 0 0 1.5px #CBD1DD}
  .btn.ghost:hover{color:var(--tinta);background:#fff}
}

/* ---------- barra superior ---------- */
.top{position:sticky;top:0;z-index:30;height:64px;background:#fff;box-shadow:0 1px 0 var(--linea);display:flex;align-items:center;gap:16px;padding:0 24px}
.top img{height:38px;width:auto;display:block}
.top .sep{width:1px;height:26px;background:var(--linea)}
.top .tt{font-size:17px;font-weight:500;white-space:nowrap}
.top nav{margin-left:auto;display:flex;align-items:center;gap:6px}
.top a.btn{height:38px}

/* ---------- alertas globales ---------- */
.alertas{display:flex;flex-direction:column}
.alerta{display:flex;align-items:flex-start;gap:12px;padding:10px 24px;font-size:14px;line-height:1.4}
.alerta svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none;margin-top:1px}
.alerta.err{background:var(--caliente-f);color:var(--caliente-t)}
.alerta.warn{background:var(--tibio-f);color:var(--tibio-t)}
.alerta.info{background:var(--frio-f);color:var(--frio-t)}

/* ---------- tablero ---------- */
.wrap{max-width:1180px;margin:0 auto;padding:24px}
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.st{text-align:left;background:var(--card);border-radius:14px;box-shadow:var(--sombra);padding:14px 20px 16px;display:flex;flex-direction:column;gap:10px;min-width:0;transition:transform 140ms var(--out),box-shadow 160ms var(--out)}
.st:active{transform:scale(.98)}
.st[aria-pressed=true]:not([data-t=todos]){box-shadow:var(--sombra),0 0 0 1.5px var(--acento)}
.st span{font-size:12px;font-weight:500;color:var(--gris-2);text-transform:uppercase;letter-spacing:.08em;display:flex;align-items:center;gap:8px}
.st span i{width:9px;height:9px;border-radius:50%;flex:none}
.st b{font-size:34px;font-weight:500;line-height:1;font-variant-numeric:tabular-nums}
.st b.tick{animation:tick 240ms var(--out)}
@keyframes tick{from{transform:translateY(-5px);opacity:.3}to{transform:none;opacity:1}}

.barra{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:22px 0 14px}
.seg{display:flex;background:#fff;border-radius:999px;padding:3px;box-shadow:var(--sombra);gap:2px;overflow-x:auto;scrollbar-width:none}
.seg::-webkit-scrollbar{display:none}
.seg button{height:34px;padding:0 11px;border-radius:999px;font-size:14px;font-weight:500;color:var(--gris);white-space:nowrap;transition:background 160ms var(--out),color 160ms var(--out)}
.seg button[aria-pressed=true]{background:var(--acento);color:#fff}
.sel{height:40px;border-radius:999px;background:#fff;box-shadow:var(--sombra);border:0;padding:0 30px 0 14px;font-size:14px;color:var(--tinta);appearance:none;-webkit-appearance:none;max-width:200px;background-image:linear-gradient(45deg,transparent 50%,var(--gris) 50%),linear-gradient(135deg,var(--gris) 50%,transparent 50%);background-position:calc(100% - 18px) 17px,calc(100% - 13px) 17px;background-size:5px 5px;background-repeat:no-repeat}
.chk{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--gris);cursor:pointer;padding:0 4px}
.chk input{width:16px;height:16px;accent-color:var(--acento)}
.barra .btn{margin-left:auto;height:40px}

.lista{list-style:none;display:flex;flex-direction:column;gap:10px}
.fila{display:grid;grid-template-columns:46px 210px minmax(0,1fr) 200px;gap:6px 18px;align-items:center;width:100%;text-align:left;background:var(--card);border-radius:14px;box-shadow:var(--sombra);padding:14px 20px;transition:box-shadow 200ms var(--out),background 900ms var(--out)}
.fila.hot{box-shadow:var(--sombra),inset 4px 0 0 var(--caliente-d)}
.fila.cerrado{opacity:.62}
.fila.nuevo-ent{animation:entra 260ms var(--out)}
.fila.cambio{background:#FFF8F7;transition:none}
@keyframes entra{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (hover:hover) and (pointer:fine){.fila:hover{box-shadow:var(--sombra),0 0 0 1.5px #D5DAE6}}
.ava{width:46px;height:46px;border-radius:50%;background:var(--nuevo-f);display:flex;align-items:center;justify-content:center;font-weight:500;font-size:16px;flex:none}
.who{min-width:0}
.who .n{font-size:17px;font-weight:500;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
.who .n.sin{color:var(--gris-2);font-weight:400}
.who .t{font-size:13px;color:var(--gris);display:block;font-variant-numeric:tabular-nums}
.datos{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,.9fr) minmax(0,.9fr);gap:16px;min-width:0}
.datos label{display:block;font-size:11px;font-weight:500;color:var(--gris-2);text-transform:uppercase;letter-spacing:.08em}
.datos span.v{display:block;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.datos span.v.vac{color:#B3B9C7}
.der{display:flex;flex-direction:column;align-items:flex-end;gap:6px;min-width:0}
.hora{font-size:13px;color:var(--gris)}
.res{grid-column:2 / 4;font-size:14px;color:#2C3445;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.pill{height:30px;border-radius:999px;padding:0 14px 0 11px;display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:500;white-space:nowrap}
.pill i{width:8px;height:8px;border-radius:50%}
.pill.nuevo{background:var(--nuevo-f);color:var(--nuevo-t)}.pill.nuevo i{background:var(--nuevo-d)}
.pill.caliente{background:var(--caliente-f);color:var(--caliente-t)}.pill.caliente i{background:var(--caliente-d)}
.pill.tibio{background:var(--tibio-f);color:var(--tibio-t)}.pill.tibio i{background:var(--tibio-d)}
.pill.frio{background:var(--frio-f);color:var(--frio-t)}.pill.frio i{background:var(--frio-d)}
.pill.descartado{background:var(--desc-f);color:var(--desc-t)}.pill.descartado i{background:var(--desc-d)}
.tags{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}
.tag{height:22px;border-radius:999px;background:var(--nuevo-f);color:var(--gris);font-size:12px;font-weight:500;padding:0 9px;display:inline-flex;align-items:center;white-space:nowrap}
.tag.rojo{background:var(--caliente-f);color:var(--caliente-t)}
.tag.ambar{background:var(--tibio-f);color:var(--tibio-t)}
.tag.verde{background:var(--ok-f);color:var(--ok-t)}
.tag.azul{background:var(--frio-f);color:var(--frio-t)}
.tag.anuncio{background:var(--frio-f);color:var(--frio-t);max-width:260px;overflow:hidden;text-overflow:ellipsis;display:inline-block;line-height:22px}

/* estados vacío / cargando / error */
.estado{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center;color:var(--gris-2);padding:72px 20px;background:var(--card);border-radius:14px;box-shadow:var(--sombra)}
.estado svg{width:44px;height:44px;stroke:#B8BFCD;fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.estado .btn svg{width:18px;height:18px;stroke:currentColor}
.estado h3{font-size:18px;font-weight:500;color:var(--tinta)}
.estado p{font-size:14px;max-width:420px}
.estado .btn{margin-top:8px}
.esq{height:88px;border-radius:14px;background:var(--card);box-shadow:var(--sombra);animation:pulso 1.4s ease-in-out infinite}
.esq:nth-child(2){animation-delay:.12s}.esq:nth-child(3){animation-delay:.24s}
@keyframes pulso{50%{opacity:.55}}

/* ---------- panel de resumen ---------- */
.scrim{position:fixed;inset:0;z-index:40;background:rgba(20,28,48,.28);opacity:0;pointer-events:none;transition:opacity 260ms var(--out)}
.scrim.on{opacity:1;pointer-events:auto}
.drawer{position:fixed;top:0;right:0;bottom:0;z-index:41;width:min(560px,100vw);background:#fff;box-shadow:0 0 0 1px rgba(20,28,48,.04),0 24px 60px rgba(20,28,48,.22);transform:translateX(104%);transition:transform 320ms var(--drawer),visibility 0s linear 320ms;visibility:hidden;display:flex;flex-direction:column}
.drawer.on{transform:none;visibility:visible;transition:transform 320ms var(--drawer)}
.dhd{display:flex;align-items:center;gap:14px;padding:20px 24px 14px}
.dhd .ava{width:56px;height:56px;font-size:20px}
.dhd h2{font-size:22px;font-weight:500;line-height:1.2;overflow-wrap:anywhere}
.dhd .t{font-size:14px;color:var(--gris)}
.dhd .x{margin-left:auto;width:40px;height:40px;border-radius:10px;color:var(--gris);display:flex;align-items:center;justify-content:center;flex:none}
.dhd .x svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round}
@media (hover:hover){.dhd .x:hover{background:var(--lienzo)}}
.dbody{flex:1;overflow-y:auto;padding:0 24px 16px}
.dtags{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:16px}
.dg{display:grid;grid-template-columns:1fr 1fr;gap:14px 18px;margin-bottom:18px}
.dk{font-size:11px;font-weight:500;color:var(--gris-2);text-transform:uppercase;letter-spacing:.08em;margin-bottom:2px}
.dv{font-size:15px;overflow-wrap:anywhere}
.dv.vac{color:#B3B9C7}
.dres{background:var(--lienzo);border-radius:12px;padding:14px 16px;margin-bottom:18px}
.dres p{font-size:15px;line-height:1.5;overflow-wrap:anywhere}
.aviso-of{display:flex;gap:10px;background:var(--tibio-f);color:var(--tibio-t);border-radius:10px;padding:10px 14px;font-size:13px;margin-bottom:18px}
.hist{background:#EFEAE2;border-radius:12px;padding:14px 12px;display:flex;flex-direction:column;gap:8px;margin-top:6px}
.msg{max-width:84%;padding:8px 12px 6px;border-radius:12px;font-size:14px;line-height:1.4;box-shadow:0 1px 1px rgba(0,0,0,.09);overflow-wrap:anywhere;white-space:pre-wrap}
.msg.estudiante{align-self:flex-start;background:#fff;border-top-left-radius:3px}
.msg.agente{align-self:flex-end;background:#D9FDD3;border-top-right-radius:3px}
.msg.asesor{align-self:flex-end;background:#E3EEFF;border-top-right-radius:3px}
.msg .q{display:block;font-size:11px;font-weight:500;color:#667781;margin-bottom:2px;letter-spacing:.02em}
.msg .tm{display:block;text-align:right;font-size:11px;color:#667781;margin-top:2px}
.msg .nota{display:block;font-size:11px;font-weight:500;color:var(--caliente-t);margin-top:3px}
.msg .nota.gris{color:#667781}
.dpie{padding:14px 24px 20px;border-top:1px solid var(--linea);display:flex;flex-direction:column;gap:10px;background:#fff}
.dpie .fila-b{display:flex;gap:8px;flex-wrap:wrap}
.dpie .fila-b .btn{flex:1;min-width:120px;height:40px;font-size:14px}
.dpie .wa{height:50px;font-size:16px;width:100%}
.dbot{font-size:13px;color:var(--gris)}

/* ---------- toast ---------- */
.toast{position:fixed;left:50%;bottom:24px;z-index:60;transform:translate(-50%,12px);background:rgba(27,33,48,.94);color:#fff;border-radius:999px;padding:10px 20px;font-size:14px;opacity:0;pointer-events:none;transition:opacity 200ms var(--out),transform 200ms var(--out);max-width:calc(100vw - 32px);text-align:center}
.toast.on{opacity:1;transform:translate(-50%,0)}
.toast.err{background:var(--caliente-t)}

/* ---------- login ---------- */
.centro{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px}
.lcard{width:100%;max-width:440px;background:var(--card);border-radius:16px;box-shadow:var(--sombra);padding:40px 40px 36px;display:flex;flex-direction:column;align-items:stretch;animation:entra 320ms var(--out)}
.lcard img{width:240px;max-width:70%;height:auto;display:block;margin:0 auto}
.lcard h1{font-size:24px;font-weight:500;text-align:center;margin:22px 0 2px;letter-spacing:-.01em}
.lcard p.sub{font-size:14px;color:var(--gris);text-align:center;margin-bottom:26px}
.lf{margin-bottom:14px}
.lf label{display:block;font-size:12px;font-weight:500;color:var(--gris-2);text-transform:uppercase;letter-spacing:.08em;margin-bottom:6px}
.lf input{width:100%;height:48px;border-radius:10px;border:0;background:var(--lienzo);padding:0 16px;font-size:16px;box-shadow:inset 0 0 0 1.5px transparent;transition:box-shadow 160ms var(--out),background 160ms var(--out)}
.lf input:focus{outline:0;background:#fff;box-shadow:inset 0 0 0 1.5px var(--acento)}
.lcard .btn{width:100%;height:50px;font-size:16px;margin-top:8px}
.msgbox{display:flex;gap:10px;align-items:flex-start;border-radius:10px;padding:12px 14px;font-size:14px;margin-bottom:16px}
.msgbox svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none;margin-top:1px}
.msgbox.err{background:var(--caliente-f);color:var(--caliente-t)}
.msgbox.warn{background:var(--tibio-f);color:var(--tibio-t)}

/* ---------- /probar ---------- */
.pgrid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:20px;align-items:start}
.chat{background:#EFEAE2;border-radius:16px;box-shadow:var(--sombra);display:flex;flex-direction:column;overflow:hidden;height:calc(100vh - 64px - 48px - 70px);min-height:420px}
.chat .hd{height:60px;background:#F0F2F5;display:flex;align-items:center;gap:12px;padding:0 18px;flex:none;box-shadow:0 1px 0 rgba(0,0,0,.06)}
.chat .hd b{font-weight:500;font-size:16px}
.chat .hd small{font-size:12px;color:#667781;display:block;line-height:1.2}
.chat .hd .btn{margin-left:auto;height:34px;font-size:13px}
.hilo{flex:1;overflow-y:auto;padding:16px 16px 8px;display:flex;flex-direction:column;gap:8px}
.b{max-width:80%;padding:8px 12px 6px;border-radius:12px;font-size:15px;line-height:1.4;box-shadow:0 1px 1px rgba(0,0,0,.09);overflow-wrap:anywhere;white-space:pre-wrap;animation:burbuja 200ms var(--out)}
.b.a{align-self:flex-start;background:#fff;border-top-left-radius:3px;transform-origin:left bottom}
.b.p{align-self:flex-end;background:#D9FDD3;border-top-right-radius:3px;transform-origin:right bottom}
.b.err{align-self:center;background:var(--caliente-f);color:var(--caliente-t);box-shadow:none;font-size:13px;max-width:92%}
.b.av{align-self:center;background:#FFF3C4;color:#6B5B1E;box-shadow:none;font-size:12px;max-width:92%}
@keyframes burbuja{from{opacity:0;transform:translateY(8px) scale(.97)}to{opacity:1;transform:none}}
.ty{align-self:flex-start;background:#fff;border-radius:12px;border-top-left-radius:3px;padding:13px 14px;display:flex;gap:5px;box-shadow:0 1px 1px rgba(0,0,0,.09)}
.ty i{width:7px;height:7px;border-radius:50%;background:#9AA3AB;animation:dot 1s ease-in-out infinite}
.ty i:nth-child(2){animation-delay:.15s}.ty i:nth-child(3){animation-delay:.3s}
@keyframes dot{0%,60%,100%{transform:translateY(0);opacity:.55}30%{transform:translateY(-4px);opacity:1}}
.vacio-chat{margin:auto;text-align:center;color:#667781;font-size:14px;max-width:320px;padding:20px}
.compo{display:flex;gap:10px;padding:10px 14px;background:#F0F2F5;flex:none}
.compo input{flex:1;height:46px;border-radius:23px;border:0;padding:0 20px;font-size:15px;background:#fff}
.compo input:focus{outline:2px solid var(--acento)}
.compo .btn{height:46px;border-radius:23px;padding:0 22px}
.ficha{background:var(--card);border-radius:16px;box-shadow:var(--sombra);padding:20px}
.ficha h3{font-size:15px;font-weight:500;margin-bottom:14px}
.ficha .dg{grid-template-columns:1fr;gap:12px;margin-bottom:0}
.ficha .nota{font-size:12px;color:var(--gris-2);margin-top:14px;line-height:1.4}
.nota-prueba{display:flex;gap:10px;align-items:flex-start;background:var(--frio-f);color:var(--frio-t);border-radius:10px;padding:10px 14px;font-size:13px;margin-bottom:16px}
.nota-prueba svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none;margin-top:1px}

/* ---------- móvil ---------- */
@media (max-width:760px){
  body{font-size:14px}
  .top{padding:0 14px;gap:10px;height:56px}
  .top img{height:30px}.top .sep,.top .tt{display:none}
  .top .btn span.t-l{display:none}
  .alerta{padding:10px 14px}
  .wrap{padding:14px}
  .stats{grid-template-columns:repeat(2,1fr);gap:10px}
  .st{padding:12px 14px 14px;gap:8px}.st b{font-size:28px}
  .barra{gap:8px;margin:16px 0 12px}
  .seg{max-width:100%}
  .sel{flex:1;min-width:0;max-width:none}
  .barra .btn{margin-left:0;width:100%}
  .fila{grid-template-columns:42px minmax(0,1fr) auto;padding:12px 14px;gap:8px 12px}
  .ava{width:42px;height:42px;font-size:15px}
  .datos{grid-column:1 / -1;grid-template-columns:1fr 1fr;gap:8px 12px}
  .datos>div:first-child{grid-column:1 / -1}
  .who{grid-column:2 / -1}
  .der{grid-column:1 / -1;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:8px 10px}
  .tags{justify-content:flex-start}
  #selCarrera{flex:1 1 100%}
  .res{grid-column:1 / -1}
  .drawer{width:100vw}
  .dhd{padding:16px 16px 10px}.dbody{padding:0 16px 12px}.dpie{padding:12px 16px 16px}
  .lcard{padding:30px 24px 28px}
  .pgrid{grid-template-columns:1fr}
  .chat{height:calc(100vh - 56px - 28px - 90px);min-height:380px}
}
@media (prefers-reduced-motion:reduce){
  .fila.nuevo-ent,.b,.lcard,.st b.tick{animation:none}
  .drawer,.drawer.on,.scrim,.toast{transition-duration:.01ms}
  .esq,.ty i{animation:none}
}
