:root{--green:#075e54;--bright:#00a884;--bg:#f0f2f5;--ink:#13242d;--line:#e3e8e9}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:15px system-ui,-apple-system,Segoe UI,sans-serif}button,input{font:inherit}button{cursor:pointer}a{color:var(--green)}.hidden{display:none!important}.shell{display:flex;width:min(1200px,100%);height:100dvh;min-height:350px;margin:auto;background:white;box-shadow:0 0 30px #193c3820}.sidebar{width:370px;min-width:290px;display:flex;flex-direction:column;border-right:1px solid var(--line);background:white}.topbar{height:72px;display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:#f6faf9;gap:8px}.self,.actions{display:flex;align-items:center;gap:10px}.self span{font-weight:700;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.avatar{height:43px;width:43px;min-width:43px;border-radius:50%;background:#b8d9d0;display:flex;align-items:center;justify-content:center;overflow:hidden;color:#16453c;font-weight:700;font-size:19px}.avatar img{width:100%;height:100%;object-fit:cover}.iconbtn{width:37px;height:37px;border:0;background:transparent;color:#344c50;font-size:25px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;border-radius:9px}.iconbtn:hover{background:#e7efed}.search{padding:12px}.search input{width:100%;background:#f0f3f4;border:0;border-radius:9px;padding:13px;outline-color:#13aa89}.tabs{display:flex;border-bottom:1px solid var(--line)}.tabs button{width:50%;background:white;border:0;padding:12px 6px;color:#677}.tabs button.active{color:var(--green);border-bottom:3px solid var(--bright);font-weight:700}.list{overflow:auto;flex:1}.contact{display:flex;align-items:center;width:100%;padding:13px;gap:12px;text-align:left;border:0;border-bottom:1px solid #f4f5f6;background:white;color:var(--ink)}.contact:hover{background:#f2f8f5}.contactbody{min-width:0;flex:1}.contactbody strong,.contactbody small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.contactbody small{font-size:13px;color:#778;margin-top:4px}.unread{background:#16b591;color:white;border-radius:20px;min-width:23px;padding:3px 6px;text-align:center;font-size:12px}.empty{text-align:center;padding:25px;color:#819194;font-size:14px}.conversation{flex:1;min-width:0;background:#efeae2;position:relative}.welcome{display:flex;height:100%;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:30px;color:#526967;background:#f7faf8}.welcomeicon{font-size:80px;color:#07a47c}.welcome p{max-width:400px;line-height:1.6}.chatpane{height:100%;display:flex;flex-direction:column}.chathead{display:flex;align-items:center;gap:12px;height:72px;padding:10px 18px;background:#f6faf9;border-bottom:1px solid #e8eded}.personmeta{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.personmeta strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.personmeta small{color:#758}.mobileBack{display:none}.messages{flex:1;overflow-y:auto;padding:25px max(15px,8%);display:flex;flex-direction:column;gap:10px;background-color:#efeae2;background-image:radial-gradient(#7a8f8130 1px,transparent 1px);background-size:24px 24px}.bubble{max-width:min(73%,460px);min-width:85px;border-radius:13px;padding:10px 11px 6px;box-shadow:0 1px 2px #435a5628;overflow-wrap:anywhere;white-space:pre-wrap}.bubble.out{align-self:flex-end;background:#d9fdd3;border-top-right-radius:3px}.bubble.in{align-self:flex-start;background:white;border-top-left-radius:3px}.bubble time{display:block;color:#758b8b;font-size:10px;text-align:right;margin-top:4px}.chatimage{max-width:250px;width:100%;border-radius:7px;display:block}.composer{display:flex;align-items:center;gap:10px;padding:12px 18px;background:#f6faf9}.composer input{flex:1;min-width:0;border:0;border-radius:12px;padding:13px 15px;outline-color:var(--bright)}.composer button{border:0;border-radius:50%;background:var(--bright);color:#fff;width:44px;height:44px;font-size:21px}.composer button:disabled{opacity:.45}.attach{font-size:26px;color:#607b7d;cursor:pointer}.attachmentName{padding:0 20px;background:#f6faf9;color:#526}.toast{position:fixed;z-index:100;bottom:30px;left:50%;transform:translateX(-50%);background:#193b37;color:#fff;padding:14px 18px;border-radius:12px;max-width:90vw}dialog{border:0;box-shadow:0 18px 60px #0004;border-radius:15px;width:min(450px,94vw);padding:0;max-height:85vh}dialog::backdrop{background:#13282670}.dialogHead{display:flex;justify-content:space-between;align-items:center;background:#eff7f4;padding:12px 20px}.dialogBody{padding:20px;max-height:70vh;overflow:auto}.auth{min-height:100dvh;display:grid;place-items:center;padding:20px}.panel{max-width:440px;width:100%;background:white;border-radius:20px;padding:30px;box-shadow:0 20px 50px #123a3230}.panel h1{font-size:26px}.panel p{color:#637a79;line-height:1.5}.brand{font-size:25px;color:var(--green);font-weight:800}form label{display:block;font-weight:600;font-size:13px;margin:12px 0}form label input:not([type=file]){display:block;width:100%;padding:13px;border:1px solid #c9d7d3;border-radius:9px;margin-top:6px;background:#fff}form label input[type=file]{display:block;margin-top:8px}form button:not(.iconbtn),.dialogBody>button{width:100%;border:0;background:var(--green);color:white;padding:13px;border-radius:9px;margin:7px 0;font-weight:700}.dialogBody .secondary{background:#eff4f3;color:#235}.dialogBody button.danger{background:#c73d45}.error{padding:12px;background:#ffe7e7;color:#942626;border-radius:8px}.center{text-align:center}small{color:#738684}.adminpage{max-width:1100px;margin:auto;padding:20px}.stats{display:flex;flex-wrap:wrap;gap:15px;margin:18px 0}.stat{padding:18px;border-radius:13px;background:white;min-width:140px;flex:1}.stat b{display:block;font-size:30px;color:var(--green)}.adminpanel{background:#fff;border-radius:14px;padding:16px;margin-top:20px;overflow-x:auto}table{width:100%;border-collapse:collapse}td,th{text-align:left;padding:12px;border-bottom:1px solid #e5eeee}td form{display:inline}td button{padding:7px;background:#075e54;border:0;border-radius:6px;color:white}.muted{color:#849}@media(max-width:700px){.shell{width:100%;height:100dvh}.sidebar{width:100%;min-width:0}.conversation{display:none}.shell.chat-open .sidebar{display:none}.shell.chat-open .conversation{display:block;width:100%}.mobileBack{display:inline-flex}.bubble{max-width:84%}.messages{padding:14px}.panel{padding:24px}}

/* HelloChat contact experience */
.topbar{background:linear-gradient(120deg,#ecfff8,#f6fafc)}.hc-round{background:#e0f6eb;border-radius:50%;font-weight:700;color:#075e54}.hc-fab{position:absolute;bottom:25px;left:300px;width:54px;height:54px;z-index:2;border:none;border-radius:17px;background:#06a77e;color:white;font-size:30px;box-shadow:0 8px 24px #086d564d}.sidebar{position:relative}.hc-listhead{display:flex;align-items:center;justify-content:space-between;padding:18px;border-bottom:1px solid #eef1f0}.hc-small{background:#e7faf3;color:#06634f;border:0;border-radius:9px;padding:9px 12px;font-weight:700}.hc-contact{display:flex;align-items:center;gap:12px;padding:12px 15px;border-bottom:1px solid #f0f2f1}.hc-contact-action{border:0;border-radius:20px;padding:9px 17px;font-weight:700}.hc-chat{background:#d7f6e9;color:#066c50}.hc-invite{background:#e9f0ff;color:#34599b}.hc-muted{color:#657d79;line-height:1.55}.hc-picked{max-height:35vh;overflow:auto}.hc-dialog-actions{display:flex;gap:10px}.hc-dialog-actions button{flex:1}.hc-dialog .hc-cancel{background:#e9eeee!important;color:#234039!important}.hc-dialog .hc-primary{background:#008f74!important;color:#fff!important}@media(max-width:700px){.hc-fab{left:auto;right:18px;bottom:22px}.hc-contact-action{padding:9px 14px}}

/* Fullscreen account page on phones, sheet on desktop */
#settingsDialog{width:min(560px,100vw);height:min(790px,94dvh);max-height:94dvh;border-radius:24px}#settingsDialog .dialogBody{max-height:calc(94dvh - 68px);padding:20px 26px}#settingsDialog .dialogHead{background:linear-gradient(120deg,#d9faec,#f5fffd);padding:20px 24px}#settingsDialog .dialogHead strong{font-size:20px}@media(max-width:700px){#settingsDialog{width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0}#settingsDialog .dialogBody{max-height:calc(100dvh - 70px);padding:20px}}

/* HelloChat UI repair v3: chat composer overrides generic form styles */
html,body{direction:ltr;overflow-x:hidden} .shell{isolation:isolate}
.iconbtn svg,.hc-fab svg,.attach svg,#sendBtn svg{display:block;width:22px;height:22px;flex:none}
.hc-fab svg{width:27px;height:27px}.attach svg{width:25px;height:25px}
.topbar{flex-shrink:0}.topbar .actions .iconbtn{width:40px;height:40px;flex:0 0 40px}
.chathead{flex-shrink:0;min-height:70px}.chathead .personmeta{overflow:hidden}
.messages{min-height:0;overscroll-behavior:contain;padding-bottom:20px}
.bubble,.bubbletext{direction:ltr;text-align:start;unicode-bidi:plaintext;transform:none!important}
.bubbletext{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.45;font-size:15px}
.bubble time{direction:ltr;unicode-bidi:isolate}
.composer{display:flex;align-items:center;gap:8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px));flex:0 0 auto;background:#f6faf9;width:100%;min-height:68px}
.composer .attach{display:flex;align-items:center;justify-content:center;flex:0 0 36px;width:36px;height:40px;margin:0;color:#536f6b}
.composer #messageInput{display:block!important;direction:auto;unicode-bidi:plaintext;flex:1 1 auto!important;width:auto!important;min-width:0!important;height:46px!important;min-height:46px;margin:0!important;border:1px solid #e3ece9!important;border-radius:23px!important;background:#fff!important;padding:0 16px!important;font-size:15px;box-shadow:none;outline-offset:0}
.composer #messageInput:focus{border-color:#14a98b!important;outline:1px solid #14a98b}
form.composer #sendBtn{display:flex!important;align-items:center;justify-content:center;flex:0 0 46px!important;width:46px!important;min-width:46px!important;max-width:46px!important;height:46px!important;border:0!important;border-radius:50%!important;margin:0!important;padding:0!important;background:#008f78!important;color:#fff!important;box-shadow:0 3px 9px #006d5430}
form.composer #sendBtn svg{width:22px;height:22px;margin-left:2px}
#attachmentName:empty{display:none}
@media(max-width:700px){.chathead{padding:8px 12px;gap:9px}.topbar{padding:10px 14px}.topbar .self{min-width:0}.topbar .self span{max-width:42vw}.messages{padding:14px 12px}.composer{gap:6px;padding:9px 10px calc(9px + env(safe-area-inset-bottom,0px))}.bubble{max-width:84%}}

/* HelloChat v4 compact navigation, message state and mobile refinement */
html{touch-action:pan-x pan-y}body{overscroll-behavior:none}.shell{max-width:1200px}
.sidebar{overflow:hidden}.topbar{height:60px;min-height:60px;padding:9px 13px}.topbar .avatar{width:39px;height:39px;min-width:39px;font-size:17px}.topbar .self span{font-size:15px}
.search{padding:10px 13px 8px;order:1}.search input{padding:11px 14px;border-radius:18px;font-size:14px}
#chatList,#peopleList{order:2;min-height:0}.tabs{order:3;flex-shrink:0;background:#fff;border-top:1px solid var(--line);border-bottom:0;min-height:65px;padding-bottom:env(safe-area-inset-bottom,0px)}
.tabs button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:7px 4px;font-size:12px;font-weight:600}
.tabs button svg{width:22px;height:22px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;fill:none}.tabs button.active{border-bottom:0;border-top:3px solid var(--bright)}
.hc-fab{left:auto;right:18px;bottom:calc(78px + env(safe-area-inset-bottom,0px));width:52px;height:52px;border-radius:50%;display:grid;place-items:center;padding:0}.hc-fab svg{width:25px;height:25px;margin:auto}
.contact{padding:11px 13px;min-height:67px}.contact .avatar,.hc-contact .avatar{width:42px;height:42px;min-width:42px}.contactbody strong{font-size:14px}.contactbody small{font-size:12px}
.chathead{height:62px;min-height:62px;padding:7px 12px}.chathead .avatar{height:40px;width:40px;min-width:40px;font-size:17px}.personmeta strong{font-size:15px}.personmeta small{font-size:12px}
.bubbletext{font-size:14px}.messages{gap:8px}.bubble{padding:8px 10px 5px;border-radius:10px}.bubble time{font-size:10px}
.ticks{font-weight:750;font-size:13px;letter-spacing:-3px;padding-left:2px;padding-right:3px}.ticks.sent,.ticks.delivered{color:#839797}.ticks.seen{color:#24a4e5}
.hc-account-page{max-width:100vw}input,textarea{font-size:16px!important}
@media(max-width:700px){.sidebar{width:100%}.topbar{height:62px}.topbar .actions .iconbtn{height:36px;width:36px;flex-basis:36px}.hc-fab{right:17px;bottom:calc(80px + env(safe-area-inset-bottom,0px))}.chathead{height:61px}.messages{padding:10px 10px}.composer{min-height:60px}.composer #messageInput{height:43px!important;min-height:43px!important}.composer #sendBtn{width:43px!important;min-width:43px!important;max-width:43px!important;height:43px!important;flex-basis:43px!important}}
