.chat-fab,.chat-scrim{--chat-accent:var(--erp-accent,#a46a27);--chat-glow:var(--erp-glow,#c99445);--chat-accent-soft:#f3e6d3;--chat-accent-line:#dcc29d;--chat-mine:#f4e7d4;--chat-bg:var(--erp-bg,#f5efe5);--chat-raised:var(--erp-raised,#fcf9f3);--chat-ink:var(--erp-ink,#251e18);--chat-muted:var(--erp-muted,#756b60);--chat-border:var(--erp-border,#e9dfcf);--chat-hover:#f3ebdf;--chat-sidebar:var(--erp-sidebar,#302016);--chat-danger:var(--erp-danger,#b43540)}.chat-fab{z-index:60;background:var(--chat-accent);color:#fff;cursor:pointer;border:0;border-radius:50%;place-items:center;width:60px;height:60px;transition:transform .18s,box-shadow .18s;display:grid;position:fixed;bottom:24px;right:24px;box-shadow:0 10px 24px #a46a2759,0 2px 6px #0000001f}.chat-fab:hover{transform:translateY(-2px)scale(1.04)}.chat-fab:focus-visible{outline:3px solid var(--chat-glow);outline-offset:3px}.chat-fab-badge{background:var(--chat-danger);color:#fff;border:2px solid #fff;border-radius:11px;place-items:center;min-width:22px;height:22px;padding:0 6px;font-size:12px;font-weight:800;display:grid;position:absolute;top:-2px;right:-2px}.chat-scrim{z-index:70;background:#1e181252;justify-content:flex-end;align-items:flex-end;padding:20px;display:flex;position:fixed;inset:0}.chat-window{width:min(1040px,100%);height:min(760px,100vh - 40px);color:var(--chat-ink);background:#fff;border-radius:20px;grid-template-columns:minmax(280px,360px) minmax(0,1fr);animation:.18s ease-out chat-in;display:grid;position:relative;overflow:hidden;box-shadow:0 24px 64px #00000040}@keyframes chat-in{0%{opacity:0;transform:translateY(12px)}}@media (prefers-reduced-motion:reduce){.chat-window,.chat-fab{transition:none;animation:none}}.chat-list-pane{border-right:1px solid var(--chat-border);background:var(--chat-raised);flex-direction:column;min-width:0;min-height:0;display:flex;overflow:hidden}.chat-list-head,.chat-sheet>header{justify-content:space-between;align-items:center;gap:8px;padding:16px 16px 8px;display:flex}.chat-list-head h2{margin:0;font-size:22px;font-weight:800}.chat-sheet>header{justify-content:flex-start}.chat-sheet>header h3{margin:0;font-size:18px}.chat-head-actions{gap:6px;display:flex}.chat-icon-btn{width:36px;height:36px;color:var(--chat-muted);cursor:pointer;background:0 0;border:0;border-radius:50%;flex:none;place-items:center;display:inline-grid}.chat-icon-btn:hover{background:var(--chat-hover)}.chat-icon-btn:disabled{opacity:.5;cursor:default}.chat-primary-btn{background:var(--chat-accent-soft);color:var(--chat-accent)}.chat-search{background:var(--chat-bg);height:40px;color:var(--chat-muted);border-radius:20px;align-items:center;gap:8px;margin:4px 16px 8px;padding:0 12px;display:flex}.chat-search input{font:inherit;color:var(--chat-ink);background:0 0;border:0;outline:none;flex:1;min-width:0;font-size:14px}.chat-filters{flex-wrap:wrap;gap:6px;padding:0 16px 8px;display:flex}.chat-filters button,.chat-audience button{border:1px solid var(--chat-border);color:var(--chat-muted);cursor:pointer;background:#fff;border-radius:16px;padding:5px 12px;font-size:13px}.chat-filters button.on,.chat-audience button.on{background:var(--chat-accent-soft);border-color:var(--chat-accent-line);color:var(--chat-accent);font-weight:700}.chat-list{flex:1;min-height:0;overflow:hidden auto}.chat-row{white-space:normal;text-align:left;cursor:pointer;width:100%;min-width:0;color:inherit;font:inherit;background:0 0;border:0;align-items:center;gap:12px;padding:10px 16px;display:flex;overflow:hidden}.chat-row:hover{background:var(--chat-hover)}.chat-row.on{background:var(--chat-accent-soft)}.chat-row:disabled{cursor:default}.chat-row-main{flex:1;grid-template-columns:minmax(0,1fr);gap:2px;min-width:0;display:grid}.chat-row-top,.chat-row-bottom{align-items:center;gap:8px;display:flex}.chat-row-top strong{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;font-size:15px;overflow:hidden}.chat-row-top small{color:var(--chat-muted);flex:none;font-size:12px}.chat-row-top small.fresh{color:var(--chat-accent);font-weight:800}.chat-preview{min-width:0;color:var(--chat-muted);text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:13px;display:block;overflow:hidden}.chat-preview svg{vertical-align:-2px;margin-right:3px}.chat-count{background:var(--chat-accent);color:#fff;border-radius:10px;place-items:center;min-width:20px;height:20px;padding:0 6px;font-size:11px;font-weight:800;display:grid}.chat-avatar{background:var(--chat-hover);color:var(--chat-muted);border-radius:50%;flex:none;place-items:center;font-weight:800;display:grid}.chat-role-teacher{background:var(--chat-accent-soft);color:var(--chat-accent)}.chat-role-staff{color:var(--chat-sidebar);background:#ebe2d6}.chat-role-student{color:#98482f;background:#f6e3d9}.chat-role-parent{color:#5f6b4f;background:#ebe8d8}.chat-role-group{color:var(--chat-glow);background:#f6ead2}.chat-text-teacher{color:var(--chat-accent)}.chat-text-staff{color:var(--chat-sidebar)}.chat-text-student{color:#98482f}.chat-text-parent{color:#5f6b4f}.chat-loading,.chat-empty{text-align:center;color:var(--chat-muted);place-items:center;gap:6px;padding:32px 20px;display:grid}.chat-empty strong{color:var(--chat-ink)}.chat-spin{animation:.9s linear infinite chat-spin}@keyframes chat-spin{to{transform:rotate(360deg)}}.chat-cta{background:var(--chat-accent);color:#fff;cursor:pointer;border:0;border-radius:22px;justify-content:center;align-items:center;gap:8px;padding:10px 18px;font-weight:700;display:inline-flex}.chat-cta:disabled{opacity:.55;cursor:default}.chat-thread-pane{background:var(--chat-bg);flex-direction:column;min-width:0;min-height:0;display:flex}.chat-welcome{text-align:center;max-width:340px;color:var(--chat-muted);justify-items:center;gap:8px;margin:auto;display:grid}.chat-welcome svg{color:var(--chat-accent)}.chat-welcome h3{color:var(--chat-ink);margin:4px 0 0}.chat-thread{flex-direction:column;height:100%;min-height:0;display:flex;position:relative}.chat-thread-head{border-bottom:1px solid var(--chat-border);background:#fff;align-items:center;gap:6px;padding:10px 14px;display:flex}.chat-back{display:none}.chat-thread-title{text-align:left;min-width:0;font:inherit;color:inherit;cursor:pointer;background:0 0;border:0;align-items:center;gap:10px;padding:0;display:flex}.chat-thread-title span{min-width:0;display:grid}.chat-thread-title strong,.chat-thread-title small{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.chat-thread-title small{color:var(--chat-muted);font-size:12px}.chat-people{background:var(--chat-raised);border-bottom:1px solid var(--chat-border);flex-wrap:wrap;gap:6px;max-height:120px;padding:8px 14px;display:flex;overflow-y:auto}.chat-person{border:1px solid var(--chat-border);background:#fff;border-radius:14px;align-items:center;gap:6px;padding:2px 8px 2px 2px;font-size:12px;display:inline-flex}.chat-messages{background-color:var(--chat-bg);background-image:radial-gradient(#a46a270f 1px,#0000 1px);background-size:18px 18px;flex:1;min-height:0;padding:12px 18px;overflow-y:auto}.chat-older{color:var(--chat-muted);cursor:pointer;background:#fff;border:0;border-radius:14px;margin:0 auto 8px;padding:5px 12px;font-size:12px;display:block}.chat-day{width:fit-content;color:var(--chat-muted);background:#ffffffe6;border-radius:10px;margin:12px auto 8px;padding:4px 12px;font-size:12px;font-weight:700}.chat-bubble-row{margin:2px 0;display:flex}.chat-bubble-row.mine{justify-content:flex-end}.chat-bubble{background:#fff;border-radius:14px 14px 14px 4px;gap:4px;max-width:min(72%,520px);padding:6px 10px 5px;display:grid;box-shadow:0 1px 2px #00000014}.chat-bubble-row.mine .chat-bubble{background:var(--chat-mine);border-radius:14px 14px 4px}.chat-bubble.failed{outline:1px solid var(--chat-danger)}.chat-bubble p{white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font-size:14.5px;line-height:1.4}.chat-sender{font-size:12.5px;font-weight:800}.chat-meta{color:var(--chat-muted);justify-self:end;align-items:center;gap:4px;font-size:11px;display:inline-flex}.chat-read{color:var(--chat-accent)}.chat-retry{color:var(--chat-danger);cursor:pointer;background:0 0;border:0;padding:0;font-size:11px;font-weight:700}.chat-image{cursor:zoom-in;background:0 0;border:0;padding:0}.chat-image img{object-fit:cover;border-radius:10px;width:260px;max-width:100%;max-height:300px;display:block}.chat-file{color:inherit;background:#ffffffa6;border-radius:10px;align-items:center;gap:10px;min-width:220px;padding:8px 10px;text-decoration:none;display:flex}.chat-file span:nth-child(2){flex:1;min-width:0;display:grid}.chat-file strong{text-overflow:ellipsis;white-space:nowrap;font-size:13.5px;overflow:hidden}.chat-file small{color:var(--chat-muted);font-size:11.5px}.chat-file-icon{background:var(--chat-danger);color:#fff;border-radius:6px;flex:none;place-items:center;width:36px;height:42px;font-size:11px;font-weight:900;display:grid}.chat-voice{align-items:center;gap:6px;min-width:240px;display:flex}.chat-voice-mic{background:var(--chat-sidebar);color:#fff;border-radius:50%;flex:none;place-items:center;width:34px;height:34px;display:grid}.chat-bubble-row.mine .chat-voice-mic{background:var(--chat-accent)}.chat-voice input[type=range]{accent-color:var(--chat-accent);flex:1;min-width:0}.chat-voice small{color:var(--chat-muted);min-width:34px;font-size:11.5px}.chat-composer{background:var(--chat-bg);border-top:1px solid var(--chat-border);align-items:flex-end;gap:8px;padding:10px 12px;display:flex}.chat-composer textarea{resize:none;font:inherit;min-height:40px;max-height:140px;color:var(--chat-ink);field-sizing:content;background:#fff;border:0;border-radius:20px;outline:none;flex:1;padding:10px 14px;font-size:14.5px;box-shadow:0 1px 2px #0000000f}.chat-composer textarea:focus-visible{box-shadow:0 0 0 2px var(--chat-accent-line)}.chat-send{background:var(--chat-accent);color:#fff;cursor:pointer;border:0;border-radius:50%;flex:none;place-items:center;width:44px;height:44px;display:grid}.chat-recording{background:#fff;align-items:center}.chat-rec-dot{background:var(--chat-danger);border-radius:50%;width:12px;height:12px;animation:1s ease-in-out infinite alternate chat-pulse}@keyframes chat-pulse{0%{opacity:.3}}.chat-rec-time{flex:1;font-weight:700}.chat-readonly{text-align:center;color:var(--chat-muted);background:#fff;margin:0;padding:14px;font-size:13px}.chat-viewer{z-index:5;cursor:zoom-out;background:#000000e0;place-items:center;display:grid;position:absolute;inset:0}.chat-viewer img{object-fit:contain;max-width:94%;max-height:88%}.chat-viewer .chat-icon-btn{color:#fff;position:absolute;top:12px;right:12px}.chat-sheet{z-index:4;background:var(--chat-raised);border-right:1px solid var(--chat-border);flex-direction:column;width:min(360px,100%);animation:.16s ease-out chat-sheet-in;display:flex;position:absolute;top:0;bottom:0;left:0;box-shadow:8px 0 24px #00000014}@keyframes chat-sheet-in{0%{opacity:0;transform:translate(-16px)}}.chat-contact{border-bottom:1px solid var(--chat-border)}.chat-parents{gap:2px;padding:0 12px 8px 68px;display:grid}.chat-parent{background:var(--chat-hover);text-align:left;font:inherit;color:inherit;cursor:pointer;border:0;border-radius:10px;align-items:center;gap:8px;padding:6px 8px;display:flex}.chat-parent:disabled{opacity:.6;cursor:default}.chat-parent>span:not(.chat-avatar){flex:1;min-width:0;display:grid}.chat-parent strong{font-size:13px}.chat-parent small{color:var(--chat-muted);font-size:11.5px}.chat-parent svg{color:var(--chat-accent)}.chat-new-group{border-bottom:1px solid var(--chat-border)}.chat-new-group .chat-avatar{width:44px;height:44px}.chat-group-form{gap:12px;padding:4px 16px 20px;display:grid;overflow-y:auto}.chat-group-form label{color:var(--chat-muted);gap:4px;font-size:12px;display:grid}.chat-group-form input:not([type=checkbox]),.chat-group-form select{border:1px solid var(--chat-border);height:38px;font:inherit;color:var(--chat-ink);background:#fff;border-radius:10px;padding:0 10px;font-size:14px}.chat-group-form .chat-check{color:var(--chat-ink);align-items:center;gap:8px;font-size:14px;display:flex}.chat-hint{color:var(--chat-muted);margin:0;font-size:13px}.chat-audience{border:0;flex-wrap:wrap;gap:6px;margin:0;padding:0;display:flex}.chat-audience legend{color:var(--chat-muted);margin-bottom:4px;font-size:12px}@media (max-width:760px){.chat-scrim{padding:0}.chat-window{border-radius:0;grid-template-columns:minmax(0,1fr);width:100%;height:100dvh}.chat-thread-pane,.chat-has-active .chat-list-pane{display:none}.chat-has-active .chat-thread-pane{display:flex}.chat-back{display:inline-grid}.chat-sheet{width:100%}.chat-bubble{max-width:86%}.chat-fab{bottom:16px;right:16px}}
