:root{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#18202a;background:#eef2f6;--card:#fff;--muted:#687382;--line:#dde4ec;--accent:#1769e0;--mine:#e8f2ff;--other:#f3f5f7}
*{box-sizing:border-box}body{margin:0;min-height:100vh;background:var(--bg,#eef2f6)}button,input,textarea{font:inherit}.app{max-width:1180px;margin:0 auto;padding:18px}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.topbar h1{font-size:22px;margin:0 0 3px}.sub{font-size:13px;color:var(--muted);display:flex;align-items:center;gap:7px}.dot{width:8px;height:8px;border-radius:50%;background:#c34}.dot.ok{background:#19a15f}.ghost{border:1px solid var(--line);background:var(--card);border-radius:10px;padding:8px 12px;cursor:pointer}.layout{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:14px}.chat-card,.users-card{background:var(--card);border:1px solid var(--line);border-radius:14px;box-shadow:0 8px 28px rgba(23,38,58,.06)}.chat-card{display:flex;flex-direction:column;min-height:75vh;overflow:hidden}.messages{padding:18px;flex:1;overflow:auto;min-height:0;max-height:calc(100vh - 220px)}.empty{height:100%;display:grid;place-items:center;text-align:center;color:var(--muted)}.msg{max-width:78%;margin:0 0 11px;padding:10px 12px;border-radius:12px;background:var(--other);word-break:break-word}.msg.mine{margin-left:auto;background:var(--mine)}.msg .meta{font-size:12px;color:var(--muted);margin-bottom:4px}.msg .body{white-space:pre-wrap}.composer{border-top:1px solid var(--line);padding:11px;display:flex;gap:8px;align-items:flex-end}.composer textarea{flex:1;resize:none;max-height:130px;border:1px solid var(--line);border-radius:11px;padding:10px 12px;outline:none;background:transparent;color:inherit}.composer textarea:focus{border-color:var(--accent)}.send-btn{border:0;border-radius:10px;padding:10px 14px;background:var(--accent);color:#fff;cursor:pointer}.file-btn{width:41px;height:41px;border:1px solid var(--line);border-radius:10px;display:grid;place-items:center;cursor:pointer;font-size:20px}.hint{font-size:11px;color:var(--muted);padding:0 12px 10px}.users-head{padding:14px;border-bottom:1px solid var(--line)}.users{padding:8px}.user{display:flex;align-items:center;gap:9px;padding:9px;border-radius:9px}.user-dot{width:8px;height:8px;border-radius:50%;background:#19a15f}.self{font-size:11px;color:var(--muted);margin-left:auto}.transfer-box{margin:0 12px 8px;padding:10px;border:1px solid var(--line);border-radius:10px;font-size:13px}.transfer-row{margin:6px 0}.bar{height:7px;background:#e5e9ee;border-radius:20px;overflow:hidden;margin-top:5px}.bar>i{display:block;height:100%;background:var(--accent);width:0}.download{display:inline-block;margin-top:7px;color:var(--accent);text-decoration:none}.hidden{display:none}dialog{border:0;border-radius:14px;padding:0;box-shadow:0 18px 70px rgba(0,0,0,.25)}dialog::backdrop{background:rgba(16,25,38,.52)}dialog form{padding:22px;min-width:310px}dialog h2{margin:0 0 14px;font-size:20px}dialog input{width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:10px}.dialog-actions{display:flex;justify-content:flex-end;margin-top:14px}@media(max-width:760px){.app{padding:8px}.layout{grid-template-columns:1fr}.users-card{order:-1}.users{display:flex;overflow:auto;padding:6px}.user{white-space:nowrap}.chat-card{min-height:72vh}.messages{max-height:none}.msg{max-width:90%}}
@media(prefers-color-scheme:dark){:root{--card:#141a21;--line:#29333e;--muted:#9ba7b4;--accent:#3985ed;--mine:#17385f;--other:#202832;color:#edf3fa;background:#0d1217;--bg:#0d1217}.ghost{color:inherit}.bar{background:#29333e}}
