*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#dbe7ef;color:#17212b}.app{height:100vh;display:flex;max-width:1200px;margin:auto;background:#fff;box-shadow:0 0 30px #0001}.sidebar{width:320px;border-right:1px solid #ddd;background:#fff}.brand{display:flex;align-items:center;gap:10px;font-size:25px;font-weight:800;padding:20px;color:#229ed9}.brand-mark{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;background:#229ed9;color:#fff;font-size:18px}.logout-btn{margin-left:auto;width:36px;height:36px;border:1px solid #dce6eb;border-radius:11px;background:#f7fafb;color:#5c6b73;display:grid;place-items:center;cursor:pointer;font-size:18px;line-height:1}.logout-btn:hover{background:#eef5f8;color:#229ed9}.logout-btn:disabled{opacity:.55;cursor:wait}.search{padding:0 14px 14px}.search input{width:100%;padding:12px 15px;border:0;border-radius:20px;background:#f0f2f5;outline:none}.contact{display:flex;gap:12px;padding:13px 16px;cursor:pointer}.contact.active{background:#e8f5fc}.contact small,.person small{display:block;color:#35a66f;font-size:12px;margin-top:3px}.avatar{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:#229ed9;color:#fff;font-weight:700;flex:none}.chat{display:flex;flex:1;min-width:0;flex-direction:column;background:#e9f1f5}.chat-header{height:70px;background:#fff;display:flex;align-items:center;padding:10px 18px;gap:12px;border-bottom:1px solid #ddd}.person{flex:1}.actions button,.composer button{border:0;background:transparent;cursor:pointer;font-size:20px;padding:9px;border-radius:50%}.actions button:hover,.composer button:hover{background:#eef5f8}.messages{flex:1;padding:25px 7%;overflow:auto;background:linear-gradient(#e9f1f5,#e4edf2);touch-action:pan-y}.day{text-align:center;color:#667781;font-size:12px;margin:5px 0 18px}.bubble{max-width:70%;padding:9px 12px;border-radius:14px;margin:7px 0;box-shadow:0 1px 1px #0001;position:relative;cursor:pointer;touch-action:pan-y;transition:transform .16s ease}.bubble.swiping{transition:none}.bubble span{display:block;text-align:right;font-size:10px;color:#71808a;margin-top:4px}.incoming{background:#fff;border-top-left-radius:4px}.outgoing{background:#d8fdd2;margin-left:auto;border-top-right-radius:4px}.composer{display:flex;align-items:center;gap:5px;padding:10px 14px;background:#fff}.composer input{flex:1;border:0;background:#f0f2f5;border-radius:22px;padding:13px 16px;outline:none}.composer .send{background:#229ed9;color:#fff;width:43px;height:43px}.composer #gifBtn{font-size:12px;font-weight:800;border:1px solid #d4dfe5;border-radius:14px}#loginBox{position:fixed;z-index:10;inset:0;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}#loginBox h2{margin:0 0 8px;color:#229ed9}#loginBox input{width:min(330px,90vw);padding:12px 14px;border:1px solid #d7e0e5;border-radius:12px;outline:none}#loginBox button{padding:11px 16px;border:0;border-radius:12px;background:#229ed9;color:#fff;cursor:pointer}#loginBox #forgotPasswordBtn{background:transparent;color:#229ed9}.reply-bar{display:flex;align-items:center;gap:10px;padding:8px 14px;background:#fff;border-top:1px solid #e5e5e5}.reply-bar div{flex:1;border-left:3px solid #229ed9;padding-left:9px}.reply-bar span{display:block;color:#667781;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.reply-bar button{border:0;background:transparent;cursor:pointer}.message-actions{display:none;position:absolute;right:8px;top:-36px;background:#fff;border-radius:14px;padding:2px;box-shadow:0 2px 10px #0002;z-index:5}.bubble.active .message-actions{display:flex}.message-actions button{border:0;background:transparent;cursor:pointer;padding:5px}.quoted{font-size:11px;color:#667781;border-left:3px solid #229ed9;padding-left:7px;margin-bottom:5px}.bubble-body{overflow-wrap:anywhere}.attachments{margin-bottom:5px}.attachment-preview{margin-bottom:7px}.chat-media-image{display:block;max-width:min(360px,65vw);max-height:320px;border-radius:10px;object-fit:cover}.chat-media-video{display:block;width:min(360px,65vw);max-height:320px;border-radius:10px;background:#000}.chat-media-audio{width:min(320px,60vw)}.file-card{display:block;width:100%;padding:10px 12px;background:#f4f7f9;border:0;border-radius:10px;color:#1675a6;text-decoration:none;font:inherit;font-weight:600;text-align:left;overflow-wrap:anywhere;cursor:pointer}.media-error{font-size:12px;color:#b33}.system-message,.empty-users{padding:15px;color:#667781;text-align:center}.bubble.media-only{max-width:none;width:max-content;padding:0;margin-left:auto;background:transparent!important;box-shadow:none!important;border-radius:0;cursor:default}.bubble.media-only.incoming{margin-left:0;margin-right:auto}.bubble.media-only .attachment-preview{margin:0}.bubble.media-only .chat-media-image,.bubble.media-only .chat-media-video{margin:0}.bubble.media-only .chat-media-image{user-select:none;-webkit-user-drag:none}.bubble.media-only span{margin-top:5px;margin-right:2px}.bubble.media-only.swiping{transform:none}.bubble.media-only .connect-gesture-menu{cursor:pointer}@media(max-width:700px){.sidebar{display:none}.messages{padding:20px 4%}.bubble{max-width:82%}.chat-header{height:62px}.composer{padding:8px}.brand{padding:16px}.chat-media-image,.chat-media-video{max-width:78vw}.message-actions{right:4px;top:-38px}.message-actions button{padding:7px 6px}}
.message-protection{margin-bottom:3px;font-size:10px;line-height:1.25;color:#71808a;opacity:.9}

.secure-session-status{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 16px;border-bottom:1px solid #d9e5eb;font-size:13px;line-height:1.45}
.secure-session-status[hidden],.secure-session-status button[hidden]{display:none!important}
.secure-session-status[data-kind=loading]{background:#f0f7fb;color:#23536c}
.secure-session-status[data-kind=success]{background:#edf8f0;color:#24633a}
.secure-session-status[data-kind=error]{background:#fff1f0;color:#9a2727}
.secure-session-status[data-kind=notice]{background:#fff9e9;color:#735616}
.secure-session-status button{flex:none;border:1px solid currentColor;border-radius:9px;background:transparent;color:inherit;padding:7px 10px;font:inherit;font-weight:650;cursor:pointer}
.secure-session-status button:focus-visible,#loginBox button:focus-visible,#loginBox input:focus-visible{outline:3px solid #8dcff0;outline-offset:2px}
#loginBox[aria-busy=true] #loginBtn{opacity:.75;cursor:wait}
#loginBox button:disabled{opacity:.65;cursor:wait}
@media(max-width:520px){.secure-session-status{align-items:flex-start;flex-direction:column;padding:9px 12px}.secure-session-status button{width:100%}}


/* Sign-in visual redesign. This layer does not change authentication or E2EE policy. */
#loginBox.auth-shell{position:fixed;inset:0;z-index:10;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:17px;padding:28px 18px;overflow:auto;isolation:isolate;background:#080b14;color:#eef2ff}
#loginBox.auth-shell::before{content:"";position:absolute;inset:0;z-index:-2;background:radial-gradient(ellipse at 12% 10%,rgba(111,79,220,.24),transparent 42%),radial-gradient(ellipse at 88% 88%,rgba(20,170,173,.15),transparent 39%),linear-gradient(145deg,#080b14,#0b1020 58%,#090d15)}
#loginBox.auth-shell::after{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;opacity:.2;background-image:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px);background-size:42px 42px;mask-image:linear-gradient(to bottom,black,transparent 92%)}
#loginBox.auth-shell .auth-ambient{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:-1}
#loginBox.auth-shell .auth-ambient span{position:absolute;width:200px;height:200px;border-radius:50%;filter:blur(70px);opacity:.12;background:#8864ff}
#loginBox.auth-shell .auth-ambient span:first-child{top:8%;left:8%}
#loginBox.auth-shell .auth-ambient span:last-child{right:7%;bottom:12%;background:#21d4c3;opacity:.09}
#loginBox.auth-shell .auth-card{width:min(100%,448px);padding:clamp(25px,4vw,38px);border:1px solid rgba(195,205,255,.17);border-radius:25px;background:linear-gradient(155deg,rgba(22,28,47,.97),rgba(13,18,32,.98));box-shadow:0 28px 100px rgba(0,0,0,.38),inset 0 1px 0 rgba(255,255,255,.045);backdrop-filter:blur(18px)}
#loginBox.auth-shell .auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:35px}
#loginBox.auth-shell .auth-brand-mark{display:grid;place-items:center;width:45px;height:45px;border-radius:15px;background:linear-gradient(145deg,#9276ff,#5a44ca);color:#fff;font-size:22px;font-weight:850;box-shadow:0 8px 28px rgba(108,82,223,.32)}
#loginBox.auth-shell .auth-brand-copy{display:flex;flex-direction:column;gap:3px}
#loginBox.auth-shell .auth-brand-copy strong{font-size:17px;letter-spacing:.16em;color:#f8f8ff}
#loginBox.auth-shell .auth-brand-copy small{color:#9ca8c3;font-size:11px;line-height:1.45}
#loginBox.auth-shell .auth-intro{margin-bottom:25px}
#loginBox.auth-shell .auth-eyebrow{display:flex;align-items:center;gap:8px;margin:0 0 12px;color:#aaa0ff;font-size:10px;font-weight:800;letter-spacing:.16em}
#loginBox.auth-shell .auth-status-dot{width:7px;height:7px;border-radius:50%;background:#55ddc8;box-shadow:0 0 0 4px rgba(85,221,200,.1)}
#loginBox.auth-shell .auth-intro h1{margin:0;color:#f8f9ff;font-size:clamp(30px,5vw,38px);font-weight:760;letter-spacing:-.045em;line-height:1.12}
#loginBox.auth-shell .auth-intro>p:last-child{margin:11px 0 0;color:#a4aec5;font-size:14px;line-height:1.6}
#loginBox.auth-shell .auth-fields{display:flex;flex-direction:column;gap:9px}
#loginBox.auth-shell .auth-fields label,#loginBox.auth-shell .auth-reset-panel label{margin-top:4px;color:#d8deee;font-size:12px;font-weight:650;letter-spacing:.015em}
#loginBox.auth-shell input{display:block;width:100%;min-width:0;margin:0;padding:13px 14px;border:1px solid #303953;border-radius:12px;background:#0b1120;color:#f5f7ff;font:inherit;font-size:14px;outline:none;transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}
#loginBox.auth-shell input::placeholder{color:#6f7a96}
#loginBox.auth-shell input:hover{border-color:#465274}
#loginBox.auth-shell input:focus-visible{border-color:#9280ff;background:#0d1426;box-shadow:0 0 0 3px rgba(132,112,255,.18);outline:none}
#loginBox.auth-shell input:disabled{opacity:.6}
#loginBox.auth-shell .auth-password-row{position:relative;display:flex;align-items:center}
#loginBox.auth-shell .auth-password-row input{padding-right:76px}
#loginBox.auth-shell button.auth-password-toggle{position:absolute;right:7px;top:50%;transform:translateY(-50%);padding:7px 9px;border:1px solid transparent;border-radius:8px;background:transparent;color:#aba2ff;font-size:12px;font-weight:750}
#loginBox.auth-shell button.auth-password-toggle:hover{background:rgba(149,132,255,.1);color:#d0c8ff}
#loginBox.auth-shell button.auth-submit{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;min-height:48px;margin-top:12px;padding:13px 15px;border:1px solid rgba(199,190,255,.35);border-radius:13px;background:linear-gradient(110deg,#8064ed,#684ee0 62%,#5945c9);color:#fff;font-size:14px;font-weight:760;letter-spacing:.01em;box-shadow:0 8px 26px rgba(94,69,202,.24);transition:transform .16s ease,filter .16s ease,box-shadow .16s ease}
#loginBox.auth-shell button.auth-submit:hover:not(:disabled){transform:translateY(-1px);filter:brightness(1.08);box-shadow:0 12px 30px rgba(94,69,202,.32)}
#loginBox.auth-shell button.auth-submit:active:not(:disabled){transform:translateY(0)}
#loginBox.auth-shell .auth-submit-arrow{display:grid;place-items:center;width:25px;height:25px;border-radius:8px;background:rgba(255,255,255,.14);font-size:15px}
#loginBox.auth-shell #loginStatus,#loginBox.auth-shell #resetStatus{width:100%;min-height:21px;margin:13px 0 0;color:#9aa5bd;font-size:12px;line-height:1.55;text-align:left}
#loginBox.auth-shell .auth-forgot{display:block;width:100%;margin:3px 0 0;padding:8px;border:0;background:transparent;color:#b6adff;font-size:12px;font-weight:700}
#loginBox.auth-shell .auth-forgot:hover{color:#e0dcff;text-decoration:underline;text-underline-offset:3px}
#loginBox.auth-shell #resetBox.auth-reset-panel{margin-top:16px;padding:16px;border:1px solid #303953;border-radius:15px;background:rgba(7,12,23,.72)}
#loginBox.auth-shell .auth-reset-heading{display:flex;flex-direction:column;gap:4px;margin-bottom:11px}
#loginBox.auth-shell .auth-reset-heading strong{color:#f4f5ff;font-size:13px}
#loginBox.auth-shell .auth-reset-heading span{color:#9ca8c3;font-size:11px}
#loginBox.auth-shell .auth-reset-panel input{margin:7px 0 10px}
#loginBox.auth-shell .auth-reset-submit{margin-top:8px}
#loginBox.auth-shell .auth-card-footer{display:flex;align-items:flex-start;gap:10px;margin-top:25px;padding-top:18px;border-top:1px solid rgba(174,186,221,.13)}
#loginBox.auth-shell .auth-lock-mark{display:grid;place-items:center;flex:none;width:27px;height:27px;border:1px solid #33415c;border-radius:9px;color:#7de4d3;font-size:17px}
#loginBox.auth-shell .auth-card-footer p{margin:2px 0 0;color:#8793ae;font-size:11px;line-height:1.6}
#loginBox.auth-shell .auth-page-note{max-width:440px;margin:0;color:#76829d;font-size:11px;line-height:1.6;text-align:center}
#loginBox.auth-shell button:focus-visible{outline:3px solid rgba(151,137,255,.88);outline-offset:3px}
#loginBox.auth-shell button:disabled{opacity:.58;cursor:wait;transform:none}
#loginBox.auth-shell[aria-busy=true] .auth-submit{filter:saturate(.75)}
@media(max-width:520px){#loginBox.auth-shell{justify-content:flex-start;gap:13px;padding:20px 14px 14px}#loginBox.auth-shell .auth-card{margin:auto 0;padding:25px 21px;border-radius:21px}#loginBox.auth-shell .auth-brand{margin-bottom:29px}#loginBox.auth-shell .auth-intro{margin-bottom:23px}#loginBox.auth-shell .auth-page-note{padding:0 8px}}
@media(max-height:700px) and (min-width:521px){#loginBox.auth-shell{justify-content:flex-start}#loginBox.auth-shell .auth-card{margin:auto 0}}
@media(prefers-reduced-motion:reduce){#loginBox.auth-shell input,#loginBox.auth-shell button{transition:none!important}}


#loginBox.auth-shell button[hidden]{display:none!important}


/* V2 canary setup: compact mobile-readable status, no raw diagnostic data. */
.sidebar #aeoteeV2SetupStatus[hidden]{display:none!important}
.sidebar #aeoteeV2SetupStatus{display:block;margin:8px 14px 12px;padding:11px 13px;border-radius:12px;background:rgba(118,93,180,.13);border:1px solid rgba(150,126,220,.2);color:inherit;font-size:12px;line-height:1.55;overflow-wrap:anywhere}
.sidebar #aeoteeV2SetupStatus[data-kind=error]{background:rgba(194,70,84,.13);border-color:rgba(224,103,115,.3);color:#ffd2d7}
.sidebar #aeoteeV2SetupStatus[data-kind=success]{background:rgba(34,157,129,.14);border-color:rgba(46,193,151,.28);color:#b6ffde}
