:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#18263a;background:#f4f6f8;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}button{cursor:pointer}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.pilot-notice{height:28px;display:grid;place-items:center;background:#17263d;color:#cbd8eb;font-size:10px;font-weight:800;letter-spacing:.12em}.eyebrow{font-size:10px;font-weight:900;letter-spacing:.15em;color:#cb344f}.auth-shell{min-height:calc(100dvh - 28px);display:grid;grid-template-columns:1fr 1fr}.auth-brand{background:linear-gradient(145deg,#152339,#263c59);padding:clamp(32px,8vw,120px);color:#fff;display:flex;flex-direction:column;justify-content:center}.auth-brand img{width:54px;height:54px;object-fit:contain;margin-bottom:18px}.auth-brand>span{font-weight:900;letter-spacing:.1em}.auth-brand h1{font-size:clamp(40px,5vw,70px);line-height:1.04;max-width:590px;letter-spacing:-.045em;margin:36px 0 20px}.auth-brand p{font-size:18px;color:#c2d0e1;max-width:450px}.auth-card{align-self:center;justify-self:center;width:min(440px,calc(100% - 40px));background:#fff;padding:clamp(26px,4vw,50px);border:1px solid #e2e7ed;border-radius:24px;box-shadow:0 25px 70px #14213712}.auth-card h2{font-size:32px;line-height:1.1;letter-spacing:-.04em;margin:15px 0 12px}.auth-card p{line-height:1.5;color:#68768b}.auth-card form{display:grid;gap:17px;margin-top:28px}.auth-card label{display:grid;gap:8px;font-size:13px;font-weight:800}.auth-card input{width:100%;border:1px solid #ccd4de;border-radius:12px;padding:13px 15px;color:#17263d;background:#fff}.auth-card input:focus,.message-form textarea:focus{outline:2px solid #ca344f;outline-offset:2px}.auth-card button{border:0;background:#c92f4d;color:#fff;border-radius:12px;padding:15px 18px;font-weight:800;display:flex;justify-content:space-between;align-items:center}.auth-card small{display:block;margin-top:22px;color:#8390a0;line-height:1.5}.error,.chat-error{color:#a82438!important;font-size:13px!important;margin:0!important}.chat-shell{height:calc(100dvh - 28px);display:grid;grid-template-columns:minmax(280px,350px) minmax(0,1fr);background:#fff}.chat-rail{min-height:0;display:flex;flex-direction:column;border-right:1px solid #e1e6ed;background:#fff}.rail-head{padding:24px 22px 16px;border-bottom:1px solid #edf0f4}.brand{display:flex;align-items:center;gap:9px;margin-bottom:28px;font-size:13px;letter-spacing:.12em}.brand img{width:28px;height:28px;object-fit:contain}.rail-head h1{font-size:28px;letter-spacing:-.04em;margin:8px 0 3px}.rail-head p{color:#7b8797;font-size:12px;margin:0}.conversation-list{flex:1;overflow:auto;padding:12px}.conversation{display:grid;gap:5px;width:100%;text-align:left;border:1px solid transparent;background:transparent;border-radius:15px;padding:15px 14px;color:#25384f;margin-bottom:5px}.conversation:hover{background:#f5f7fa}.conversation.selected{background:#f0f4f9;border-color:#d9e1eb}.conversation strong{font-size:13px;line-height:1.4}.conversation small{color:#8490a0;font-size:11px}.chat-rail footer{padding:14px 20px;border-top:1px solid #edf0f4}.chat-rail footer button{border:0;background:transparent;color:#66788c;font-weight:700;font-size:12px;padding:7px}.chat-main{min-width:0;display:flex;flex-direction:column;background:linear-gradient(#f8fafc,#f5f7fa)}.chat-head{height:70px;flex:none;display:flex;align-items:center;gap:12px;padding:10px 22px;background:#fff;border-bottom:1px solid #e5eaf0}.chat-head strong{display:block;font-size:15px}.chat-head small{display:block;color:#8794a3;font-size:11px;margin-top:3px}.chat-head>button{display:none;border:0;background:#f1f4f8;border-radius:50%;width:34px;height:34px;font-size:20px;color:#344960}.chat-empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#718196;padding:25px}.chat-empty img{width:48px;height:48px;opacity:.5}.chat-empty h2{color:#31465f;font-size:23px;letter-spacing:-.035em;margin:16px 0 0}.chat-empty p{font-size:13px}.message-list{flex:1;min-height:0;overflow:auto;padding:25px clamp(16px,5vw,75px);display:flex;flex-direction:column;gap:11px}.message{align-self:flex-start;max-width:min(75%,580px);background:#fff;padding:12px 15px;border:1px solid #e7ebef;border-radius:17px 17px 17px 4px;box-shadow:0 4px 13px #182b4410}.message.mine{align-self:flex-end;background:#dcebe8;border-color:#c9dfd8;border-radius:17px 17px 4px 17px}.message .sender{font-size:10px;font-weight:900;color:#af344b;letter-spacing:.04em;text-transform:uppercase}.message.mine .sender{color:#21695a}.message p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.5;margin:4px 0 6px}.message time{display:block;text-align:right;color:#8490a0;font-size:10px}.message-form{display:flex;align-items:end;gap:10px;background:#fff;padding:14px clamp(16px,5vw,75px);border-top:1px solid #e6ebf0}.message-form textarea{flex:1;resize:none;max-height:100px;border:1px solid #dce3eb;background:#f6f8fa;border-radius:14px;padding:13px 15px;font-size:14px}.message-form button{flex:none;width:42px;height:42px;border:0;border-radius:12px;background:#c8314e;color:#fff;font-size:18px}.message-form button:disabled{opacity:.55}.chat-error{padding:6px 20px;background:#fff}
/* Aviso efímero dentro de la web: visible, abrible y descartable con gesto. */
.chat-notification-host{position:fixed;z-index:3000;top:calc(12px + env(safe-area-inset-top));left:50%;width:min(420px,calc(100vw - 24px));transform:translateX(-50%);pointer-events:none}
.chat-notification{display:flex;align-items:stretch;gap:4px;border:1px solid #dce5ec;border-radius:17px;background:#fff;color:#1f344d;box-shadow:0 14px 38px #10253d32;overflow:hidden;pointer-events:auto;animation:chatNoticeIn .2s ease-out}
.chat-notification-open{display:grid;gap:3px;flex:1;min-width:0;padding:13px 16px;border:0;background:transparent;text-align:left;color:inherit}
.chat-notification-open strong{font-size:13px}.chat-notification-open span{font-size:12px;color:#607287;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-notification-close{flex:none;width:42px;border:0;background:transparent;color:#7c8a9a;font-size:24px}
.conversation-preview{font-size:11px;color:#65798d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.conversation-unread{justify-self:start;display:grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:50%;background:#c93653;color:#fff;font-size:10px;font-weight:900}
@keyframes chatNoticeIn{from{opacity:0;transform:translateY(-12px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:700px){.auth-shell{display:block}.auth-brand{padding:28px 24px 36px;min-height:220px}.auth-brand img{width:34px;height:34px;margin-bottom:8px}.auth-brand h1{font-size:34px;margin:18px 0 8px}.auth-brand p{font-size:13px;margin:0}.auth-card{width:calc(100% - 28px);margin:-18px auto 35px;position:relative;padding:26px}.chat-shell{display:block;position:relative}.chat-rail,.chat-main{height:100%;width:100%}.chat-main{display:none}.chat-shell.conversation-open .chat-rail{display:none}.chat-shell.conversation-open .chat-main{display:flex}.chat-head{height:61px;padding:9px 13px}.chat-head>button{display:block}.message-list{padding:16px 12px}.message{max-width:88%}.message-form{padding:10px 12px}.pilot-notice{font-size:8px;letter-spacing:.07em}}
.auth-brand img{background:#fff;border-radius:15px;padding:7px}
.conversation-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;margin:12px 11px 2px;padding:3px;background:#edf1f5;border-radius:12px}
.conversation-tabs button{border:0;border-radius:9px;background:transparent;color:#61748b;padding:9px 3px;font-size:11px;font-weight:800}
.conversation-tabs button[aria-pressed=true]{background:#fff;color:#203653;box-shadow:0 2px 7px #1b334019}
.conversation-empty{padding:18px;color:#8592a0;font-size:13px}
.message-meta{display:flex;align-items:center;justify-content:flex-end;gap:5px}
.message-meta time{font-size:10px;color:#8490a0}
.message-receipt{font-size:13px;font-weight:800;letter-spacing:-.18em;padding-right:3px;color:#71858c}
.message-receipt.is-read{color:#167c9d}
.message-form textarea{font-size:16px}
.chat-head>div{min-width:0;flex:1}.chat-head>.chat-sound{display:block;flex:none;width:auto;height:auto;padding:7px 11px;border:1px solid #dce5ec;border-radius:999px;background:#fff;color:#536982;font-size:11px;font-weight:750;white-space:nowrap}.chat-head>.chat-sound[aria-pressed=false]{color:#8d9aa9}.chat-typing{margin:0;padding:6px clamp(16px,5vw,75px);min-height:27px;color:#667c92;font-size:11px;font-weight:750}
@media(max-width:700px){
  body.coord-active .chat-shell{height:calc(100dvh - 28px)}
  body.coord-active .chat-shell.conversation-open{height:100dvh;position:fixed;inset:0;z-index:3}
  body.coord-active .chat-shell.conversation-open .chat-main{height:100dvh}
  body.coord-active .chat-shell.conversation-open .chat-head{height:calc(62px + env(safe-area-inset-top));padding-top:calc(9px + env(safe-area-inset-top))}
  body.coord-active .chat-shell.conversation-open .message-form{padding-bottom:calc(10px + env(safe-area-inset-bottom))}
  .chat-head>.chat-sound{font-size:10px;padding:7px 9px}.chat-typing{padding:6px 13px}
}

/* Vista de conversación: mismo lenguaje visual en alumno, maestro y Coordinación. */
.chat-rail{border-right-color:#dce5e2}
.conversation{padding:13px 14px;border-radius:15px;transition:background .18s ease,transform .18s ease}
.conversation:hover{background:#f0f5f2;transform:translateX(2px)}
.conversation.selected{background:#eaf3ee;border-color:#d5e5db}
.chat-main{background-color:#edf3f1;background-image:radial-gradient(#c9d9d330 1px,transparent 1px);background-size:20px 20px}
.chat-head{height:72px;border-bottom-color:#dce7e3;box-shadow:0 3px 14px #183f3108;z-index:1}
.chat-head strong{font-size:16px;letter-spacing:-.02em}.chat-head small{color:#6e857d}
.message-list{gap:8px;padding-top:24px;padding-bottom:24px}
.message{max-width:min(73%,560px);padding:10px 13px 8px;border-color:#dfe9e4;border-radius:16px 16px 16px 5px;box-shadow:0 3px 8px #173e2d0b}
.message.mine{border-color:#c8e1d5;border-radius:16px 16px 5px 16px;background:#dff0e6}
.message p{margin:3px 0 4px;color:#1a3540;line-height:1.45}
.message .sender{font-size:9px;color:#607b74}.message.mine .sender{color:#39735e}
.message-form{align-items:center;border-top-color:#dce7e3;box-shadow:0 -7px 22px #143b2a08}
.message-form textarea{min-height:46px;padding:12px 17px;border-color:#d9e4df;border-radius:24px;background:#f7faf8;line-height:1.35}
.message-form textarea:focus{outline:2px solid #b8d6c6;outline-offset:1px;background:#fff}
.message-form button{width:46px;height:46px;border-radius:50%;background:#b72e4c}
.chat-typing{background:#edf3f1;color:#4e786c}
@media(max-width:700px){.message{max-width:86%}.message-list{padding:16px 12px 20px}.message-form{padding:9px 12px calc(9px + env(safe-area-inset-bottom))}.chat-head>.chat-sound{display:grid;place-items:center;width:36px;height:36px;padding:0;font-size:0}.chat-head>.chat-sound::after{content:'♪';font-size:18px}.chat-head>.chat-sound[aria-pressed=true]::after{content:'♫'}}
.auth-card input{font-size:16px}
@media(max-width:700px){.auth-shell{min-height:calc(100dvh - 28px);display:flex;flex-direction:column}.auth-brand{min-height:0;padding:clamp(24px,6vh,52px) 22px 44px}.auth-brand h1{font-size:clamp(28px,8vw,38px);max-width:440px}.auth-card{margin:-20px auto 28px;width:calc(100% - 28px);max-width:480px;padding:25px 22px}.auth-card h2{font-size:28px}.auth-card form{gap:15px;margin-top:22px}.auth-card input{min-height:48px}}
