:root{--ink:#0b141a;--panel:#111b21;--line:#25333b;--muted:#8696a0;--green:#00a884;--green2:#25d366;--paper:#efeae2;--bubble:#005c4b;--white:#f7f9fa;--danger:#f15c6d}*{box-sizing:border-box}body{margin:0;font-family:'DM Sans',system-ui,sans-serif;background:var(--ink);color:var(--white);overflow:hidden}button,input,textarea{font:inherit}.auth-shell{height:100vh;display:grid;grid-template-columns:1.15fr .85fr}.brand-panel{padding:48px 7vw;display:flex;flex-direction:column;justify-content:space-between;background:radial-gradient(circle at 20% 85%,#0c5a4d 0,transparent 38%),linear-gradient(145deg,#0b151a,#101e23);border-right:1px solid #1f3036}.brand{display:flex;align-items:center;gap:10px;font-weight:700;letter-spacing:-.03em}.brand-mark{width:34px;height:34px;border-radius:12px;display:inline-grid;place-items:center;background:var(--green);color:#032e27;font-weight:800;box-shadow:0 0 0 5px #00a8841f}.eyebrow{font-size:.76rem;letter-spacing:.2em;color:var(--green2);font-weight:700}.brand-panel h1{font-size:clamp(3rem,6vw,6rem);line-height:.94;margin:18px 0;letter-spacing:-.07em}.brand-panel em{font-family:Georgia,serif;font-weight:400;color:#99e5d1}.tagline{color:#aebdc4;font-size:1.1rem;line-height:1.7;max-width:510px}.trust-row{display:flex;gap:28px;font-size:.8rem;color:#a6b4ba}.trust-row span::first-letter{color:var(--green)}.auth-panel{display:grid;place-items:center;background:#f5f7f6;color:var(--ink);padding:30px}.auth-card{width:min(420px,100%)}.auth-card h2{font-size:2rem;letter-spacing:-.04em;margin:10px 0}.muted{color:#66747b}.auth-card label{display:block;font-size:.82rem;font-weight:600;margin:16px 0;color:#425159}.auth-card input{display:block;width:100%;margin-top:7px;padding:14px 16px;border:1px solid #d4dedb;border-radius:12px;background:#fff;outline:none}.auth-card input:focus{border-color:var(--green);box-shadow:0 0 0 3px #00a88418}.primary{width:100%;border:0;border-radius:12px;padding:15px 18px;background:var(--green);color:white;font-weight:700;cursor:pointer;box-shadow:0 10px 30px #00a8842c}.text-btn{border:0;background:none;color:var(--green);cursor:pointer;font-weight:600}.auth-card>.text-btn{width:100%;padding:16px}.error{color:#d94354;min-height:20px;font-size:.82rem}.mobile-brand{display:none}.app{height:100vh;display:grid;grid-template-columns:390px 1fr;background:var(--ink)}.sidebar{background:var(--panel);border-right:1px solid var(--line);display:flex;flex-direction:column;min-width:0}.side-head,.chat-head{height:70px;display:flex;align-items:center;padding:0 20px;border-bottom:1px solid var(--line)}.side-head{justify-content:space-between}.head-actions,.chat-actions{display:flex;align-items:center;gap:8px}.icon-btn,.avatar-btn{border:0;background:transparent;color:#aebac1;width:42px;height:42px;border-radius:50%;cursor:pointer;font-size:1.2rem}.icon-btn:hover{background:#202c33}.avatar-btn{background:#27363e;padding:0;overflow:hidden}.avatar-btn img,.avatar img,.contact-avatar img,.call-avatar img{width:100%;height:100%;object-fit:cover}.search-wrap{margin:14px 16px 8px;background:#202c33;border-radius:10px;display:flex;align-items:center;padding:0 13px;color:var(--muted)}.search-wrap input{width:100%;border:0;background:transparent;color:white;padding:11px;outline:0}.filter-row{display:flex;gap:8px;padding:8px 16px}.pill,.new-chat{border:1px solid #33434b;background:transparent;color:#9eafb7;border-radius:999px;padding:7px 12px;cursor:pointer}.pill.active{background:#0a3f35;border-color:#0a3f35;color:#67d9bd}.new-chat{margin-left:auto;color:var(--green2);border:0}.contacts{flex:1;overflow:auto}.contact{display:flex;align-items:center;gap:12px;padding:12px 17px;cursor:pointer;position:relative}.contact:hover,.contact.active{background:#202c33}.contact-avatar,.avatar{width:48px;height:48px;flex:0 0 auto;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#d17a5d,#744656);color:white;font-weight:700;overflow:hidden}.contact-body{flex:1;min-width:0;border-bottom:1px solid #1c292f;padding:2px 0 13px}.contact-top{display:flex;justify-content:space-between}.contact-top strong{font-weight:500}.contact time,.contact-preview{color:var(--muted);font-size:.78rem}.contact-preview{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:5px}.presence-dot{position:absolute;left:51px;bottom:15px;width:11px;height:11px;background:var(--green2);border:2px solid var(--panel);border-radius:50%}.side-foot{padding:13px 18px;border-top:1px solid var(--line);display:flex;justify-content:space-between;font-size:.74rem;color:var(--muted)}.online-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--green2);margin-right:6px}.empty-chat{display:grid;place-content:center;text-align:center;background:radial-gradient(circle at center,#14262a 0,#0b141a 55%);border-bottom:6px solid var(--green)}.empty-chat h2{font-size:2rem;letter-spacing:-.04em;margin:28px 0 8px}.empty-chat p{color:var(--muted)}.empty-orbit{width:170px;height:170px;border:1px solid #25443f;border-radius:50%;display:grid;place-items:center;margin:auto;box-shadow:0 0 0 25px #102326,0 0 0 26px #1b3935}.empty-mark{width:75px;height:75px;background:var(--green);border-radius:26px;display:grid;place-items:center;color:#07382f;font-size:2rem;font-weight:800;transform:rotate(-8deg)}.compact{width:auto;margin:20px auto}.chat-panel{display:flex;flex-direction:column;min-width:0;background-color:#0b141a;background-image:radial-gradient(#213137 1px,transparent 1px);background-size:24px 24px}.chat-head{background:#202c33}.chat-person{display:flex;flex-direction:column;margin-left:12px;flex:1}.chat-person span{font-size:.78rem;color:var(--muted);margin-top:3px}.messages{flex:1;overflow:auto;padding:24px max(5vw,30px);display:flex;flex-direction:column;gap:7px}.day-pill{align-self:center;background:#18282e;color:#9cb0b8;padding:7px 12px;border-radius:8px;font-size:.72rem}.message{max-width:min(70%,620px);padding:8px 10px 6px;border-radius:8px;background:#202c33;box-shadow:0 1px 1px #0004;line-height:1.35;position:relative}.message.mine{align-self:flex-end;background:var(--bubble)}.message.theirs{align-self:flex-start}.message .meta{display:flex;justify-content:flex-end;align-items:center;gap:5px;margin-left:35px;color:#9ab0b8;font-size:.68rem}.ticks{letter-spacing:-3px}.ticks.read{color:#53bdeb}.message audio{max-width:280px;height:38px}.typing{padding:0 6vw 6px;color:var(--green2);font-size:.78rem}.composer{display:flex;align-items:center;gap:8px;padding:10px 18px;background:#202c33}.composer textarea{flex:1;resize:none;border:0;outline:0;border-radius:10px;background:#2a3942;color:white;padding:12px 15px;max-height:120px}.record.recording{color:var(--danger);animation:pulse 1s infinite}.send-btn{border:0;width:44px;height:44px;border-radius:50%;background:var(--green);color:white;cursor:pointer}.modal{position:fixed;inset:0;background:#000a;display:grid;place-items:center;z-index:20;padding:20px}.modal-card{width:min(560px,100%);max-height:85vh;overflow:auto;background:#172329;border:1px solid #2a3d45;border-radius:20px;padding:28px;position:relative;box-shadow:0 25px 80px #0008}.modal-close{position:absolute;right:15px;top:12px;border:0;background:transparent;color:white;font-size:1.6rem;cursor:pointer}.modal-card h2{margin-top:0}.result-user{display:flex;align-items:center;gap:12px;padding:12px;border-bottom:1px solid var(--line)}.result-user .contact-avatar{width:42px;height:42px}.result-user .primary{width:auto;padding:9px 14px;margin-left:auto}.profile-form input,.profile-form textarea,.modal-search{width:100%;background:#202c33;border:1px solid #33444c;color:white;border-radius:10px;padding:12px;margin:7px 0 15px}.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.stat{background:#202c33;padding:18px;border-radius:14px}.stat strong{display:block;font-size:1.7rem;color:var(--green2)}.call-overlay{position:fixed;inset:0;z-index:30;background:radial-gradient(circle at center,#1a4d47,#071014 65%);display:flex;flex-direction:column;align-items:center;justify-content:center}.call-avatar{width:120px;height:120px;border-radius:50%;display:grid;place-items:center;background:var(--green);font-size:2.5rem;overflow:hidden}.call-overlay p{color:#a9babe;margin:25px 0 5px}.call-overlay h2{font-size:2rem}.call-overlay video#remoteVideo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-1}.call-overlay video#localVideo{position:absolute;right:25px;top:25px;width:180px;height:120px;border-radius:14px;object-fit:cover;background:#111}.call-controls{display:flex;gap:20px;margin-top:40px}.call-controls button{width:58px;height:58px;border-radius:50%;border:0;font-size:1.2rem}.call-controls .hangup{background:#e94c5d;color:white}.toast{position:fixed;bottom:25px;left:50%;transform:translate(-50%,20px);background:#fff;color:#172329;padding:12px 18px;border-radius:10px;opacity:0;pointer-events:none;transition:.25s;z-index:50}.toast.show{opacity:1;transform:translate(-50%,0)}.back{display:none}@keyframes pulse{50%{transform:scale(1.25)}}
@media(max-width:760px){.auth-shell{grid-template-columns:1fr}.brand-panel{display:none}.mobile-brand{display:flex;margin-bottom:50px}.app{grid-template-columns:1fr}.sidebar{width:100%}.empty-chat{display:none}.chat-panel{position:fixed;inset:0;z-index:5}.back{display:block}.side-foot{padding-bottom:max(13px,env(safe-area-inset-bottom))}.message{max-width:86%}.trust-row{flex-wrap:wrap}.stat-grid{grid-template-columns:1fr}.call-overlay video#localVideo{width:110px;height:150px}}
[hidden]{display:none!important}
.server-btn{position:fixed;right:18px;bottom:12px;border:0;background:transparent;color:#75858c;font-size:.75rem;cursor:pointer;max-width:45vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.server-btn:hover{color:var(--green)}
