:root{--navy:#0a2e50;--red:#d5242f;--ink:#17212b;--muted:#6d7c89;--line:#e2e8ee;--paper:#f3f6fa}*{box-sizing:border-box}html,body,#app{margin:0;height:100%;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);background:var(--paper)}button,input,textarea{font:inherit}button{cursor:pointer}.shell{height:100dvh;max-width:1180px;margin:auto;display:grid;grid-template-rows:68px 1fr;background:#fff}.top{display:flex;align-items:center;gap:12px;padding:0 18px;background:var(--navy);color:white}.brand{font-size:20px;font-weight:800;margin-right:auto}.brand img{width:38px;vertical-align:middle;margin-right:9px;border-radius:11px}.top button{border:1px solid #ffffff55;border-radius:10px;background:#ffffff14;color:white;padding:9px 12px;font-weight:700}.work{min-height:0;display:grid;grid-template-columns:350px 1fr}.side{min-height:0;border-right:1px solid var(--line);display:flex;flex-direction:column}.tabs{display:flex;gap:6px;padding:12px}.tabs button{flex:1;border:0;border-radius:10px;background:#eef2f6;padding:10px 2px;color:#405364;font-weight:700;font-size:13px}.tabs .on{color:var(--navy);background:#e7f0f8;box-shadow:inset 0 -2px var(--red)}.search{margin:0 12px 10px;padding:11px;border:1px solid var(--line);border-radius:10px}.list{overflow:auto;flex:1}.row{width:100%;border:0;border-top:1px solid #eff2f5;background:white;padding:13px;display:flex;gap:10px;text-align:left}.row:hover,.row.sel{background:#f2f7fb}.face{width:42px;height:42px;border-radius:50%;background:#e6edf4;color:var(--navy);display:grid;place-items:center;font-weight:800;flex:none}.rmain{flex:1;min-width:0}.rline{display:flex;justify-content:space-between;gap:8px}.name{font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.preview{color:var(--muted);font-size:12px;margin-top:5px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.time{font-size:11px;color:var(--muted)}.badge{background:var(--red);color:white;border-radius:20px;font-size:11px;padding:2px 7px}.thread{min-height:0;display:grid;grid-template-rows:64px 1fr auto}.threadhead{border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 18px;gap:10px}.title{font-weight:800}.sub{font-size:12px;color:var(--muted);margin-top:3px}.msgs{overflow:auto;background:#f8fafc;padding:20px;display:flex;flex-direction:column;gap:10px}.bubble{max-width:78%;align-self:flex-start;background:white;border:1px solid var(--line);border-radius:15px 15px 15px 4px;padding:11px 13px;white-space:pre-wrap;overflow-wrap:anywhere}.bubble.mine{align-self:flex-end;background:#e8f2fb;border-radius:15px 15px 4px 15px}.meta{font-size:10px;color:var(--muted);margin-top:6px}.composer{display:flex;gap:9px;padding:12px;border-top:1px solid var(--line)}.composer .attach{border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--navy);font-size:20px;font-weight:800;width:44px;flex:none}.composer .attach:disabled{opacity:.5}.message-image{display:block;max-width:min(300px,100%);max-height:280px;border-radius:10px;margin-top:8px}.file-link{display:block;color:var(--navy);font-weight:700;margin-top:7px;overflow-wrap:anywhere}.composer textarea{flex:1;min-height:44px;max-height:120px;resize:vertical;padding:11px;border:1px solid var(--line);border-radius:11px}.send{border:0;border-radius:11px;padding:0 18px;background:var(--red);color:white;font-weight:800}.empty{margin:auto;text-align:center;color:var(--muted);padding:30px}.empty strong{display:block;color:var(--navy);font-size:18px;margin-bottom:6px}.login{min-height:100%;display:grid;place-items:center;padding:20px}.card{width:min(100%,410px);background:white;border:1px solid var(--line);border-radius:18px;padding:25px;box-shadow:0 18px 55px #142a4014}.card h1{color:var(--navy)}.card p{color:var(--muted);line-height:1.5}.card input{width:100%;margin:6px 0;padding:12px;border:1px solid var(--line);border-radius:10px}.card button{width:100%;padding:13px;border:0;border-radius:10px;background:var(--red);color:white;font-weight:800}@media(max-width:700px){.shell{grid-template-rows:60px 1fr}.work{display:block;position:relative}.side,.thread{height:calc(100dvh - 60px)}.thread{display:none;position:absolute;inset:0;background:white}.work.show .side{display:none}.work.show .thread{display:grid}.top{padding:0 12px}.top button{font-size:12px;padding:8px}.msgs{padding:14px 10px}.bubble{max-width:88%}}