:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#182421;background:#d8ded9;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}*{box-sizing:border-box}html,body{overflow:hidden}body{min-width:320px;min-height:100vh;margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}.login-shell{display:grid;min-height:100vh;place-items:center;padding:28px;background:linear-gradient(130deg,#0b3b36eb,#135646d1),url(https://images.unsplash.com/photo-1556761175-b413da4baf72?auto=format&fit=crop&w=1600&q=80) center/cover}.login-panel{width:min(480px,100%);border:1px solid rgba(255,255,255,.18);border-radius:8px;padding:30px;background:#fafcf9f2;box-shadow:0 28px 80px #00000047}.brand-mark,.rail-brand,.session-main,.conversation-header,.chat-title,.chat-preview,.composer,.search-box,.new-chat{display:flex;align-items:center}.brand-mark{gap:14px}.brand-icon{display:grid;width:56px;height:56px;place-items:center;border-radius:8px;color:#f6fff8;background:#0b3b36}.brand-icon.small{width:36px;height:36px}.eyebrow{margin:0 0 4px;color:#64746f;font-size:.76rem;font-weight:760;letter-spacing:0;text-transform:uppercase}h1,h2,p{margin-top:0}h1{margin-bottom:0;font-size:2rem}.login-copy{margin:22px 0;color:#42504c;line-height:1.55}.login-form{display:grid;gap:14px}.login-form label{display:grid;gap:7px;color:#34423e;font-size:.9rem;font-weight:700}.login-form input,.new-chat input,.search-box input,.session-card select,.composer textarea,.config-stack input,.config-stack select,.config-stack textarea{width:100%;border:1px solid #c9d3ce;border-radius:8px;outline:none;background:#fff;color:#17211e}.login-form input{padding:13px 14px}.login-endpoint{border:1px solid #d9e3df;border-radius:8px;padding:10px 12px;color:#5d6d68;background:#eef5f1;font-size:.86rem;font-weight:700;overflow-wrap:anywhere}.primary-action,.ghost-action,.start-session{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;border:0;border-radius:8px;font-weight:800}.primary-action{color:#fff;background:#126a58}.primary-action.compact,.ghost-action.compact{min-height:38px;padding:0 12px;font-size:.88rem}.ghost-action{color:#0b3b36;background:#e5efea}.error-banner,.floating-error,.success-banner{border-radius:8px}.error-banner,.floating-error{color:#7d1c1c;background:#ffe9e9}.error-banner{padding:10px 12px}.success-banner{padding:10px 12px;color:#126a58;background:#dff5e9}.app-shell{position:fixed;top:0;right:0;bottom:0;left:0;display:grid;grid-template-columns:74px minmax(320px,420px) minmax(0,1fr);height:100dvh;overflow:hidden;background:#eef1ed;transition:grid-template-columns .18s ease}.app-shell.chat-list-collapsed{grid-template-columns:74px 0 minmax(0,1fr)}.rail{display:flex;flex-direction:column;gap:12px;padding:14px 10px;border-right:1px solid #d3ddd8;background:#f6faf7}.rail-brand{justify-content:center;min-height:48px}.rail-button,.icon-button,.composer button,.new-chat button{display:grid;place-items:center;border:0;border-radius:8px;color:#54635f;background:transparent}.rail-button{width:48px;height:48px}.rail-button:hover,.rail-button.active,.icon-button:hover,.composer button:hover{color:#0b3b36;background:#dce9e3}.rail-spacer{flex:1}.user-chip{display:grid;width:38px;height:38px;place-items:center;align-self:center;border-radius:8px;color:#0b3b36;background:#e7f2ed;font-size:.8rem;font-weight:850}.chat-list-panel{display:flex;height:100dvh;min-width:0;min-height:0;flex-direction:column;overflow:hidden;border-right:1px solid #d3ddd8;background:#fbfdfb}.chat-list-panel.collapsed{border-right:0}.chat-list-panel.collapsed>*{visibility:hidden}.list-header{display:flex;flex:0 0 auto;align-items:center;justify-content:space-between;gap:12px;padding:22px 18px 14px}.list-header h2{margin:0}.list-header-actions{display:flex;flex:0 0 auto;gap:8px}.config-shortcut{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:38px;border:1px solid #c8d8d1;border-radius:8px;padding:0 11px;color:#0b3b36;background:#fff;font-size:.84rem;font-weight:850}.config-shortcut.active{color:#fff;border-color:#126a58;background:#126a58}.session-card{display:grid;flex:0 0 auto;gap:10px;margin:0 14px 12px;padding:12px;border:1px solid #dce5e0;border-radius:8px;background:#f4f8f5}.session-main{gap:10px}.session-main div{display:grid;gap:2px;min-width:0}.session-main span:last-child{overflow:hidden;color:#67746f;font-size:.82rem;text-overflow:ellipsis;white-space:nowrap}.status-dot{width:10px;height:10px;border-radius:50%;background:#c25a5a}.status-dot.ready{background:#22a06b}.session-card select{min-height:36px;padding:7px 9px}.start-session{color:#0b3b36;background:#d5ede3}.start-session.secondary{border:1px solid #c8d8d1;background:#fff}.socket-chip{display:inline-flex;align-items:center;gap:7px;min-width:0;color:#64746f;font-size:.78rem;font-weight:720}.socket-chip span{width:8px;height:8px;flex:0 0 auto;border-radius:50%;background:#b7c3bd}.socket-chip.ok{color:#126a58}.socket-chip.ok span{background:#1a9b69}.socket-chip.error{color:#9f2d2d}.socket-chip.error span{background:#c25a5a}.search-box{flex:0 0 auto;gap:8px;margin:0 14px 10px;padding:0 12px;border-radius:8px;background:#edf3ef}.search-box input{height:42px;border:0;background:transparent}.new-chat{flex:0 0 auto;gap:8px;margin:0 14px 10px}.new-chat input{height:38px;padding:0 12px}.new-chat button{width:38px;height:38px;flex:0 0 auto;color:#fff;background:#126a58}.chat-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}.list-footer{display:grid;flex:0 0 auto;padding:8px 14px 10px;border-top:1px solid #d3ddd8;background:#fbfdfb}.config-shortcut.wide{width:100%}.chat-row{display:grid;width:100%;grid-template-columns:48px minmax(0,1fr) auto;gap:12px;align-items:center;border:0;padding:12px 14px;text-align:left;background:transparent}.chat-row:hover,.chat-row.selected{background:#edf5f1}.chat-loading{display:flex;gap:10px;align-items:center;padding:18px 14px;color:#52645f;font-size:.9rem;font-weight:720}.avatar{display:grid;width:44px;height:44px;flex:0 0 auto;place-items:center;border-radius:50%;color:#f8fffb;background:linear-gradient(135deg,#0b3b36,#2a8a67);font-size:.86rem;font-weight:850}.avatar-image{display:block;object-fit:cover;background:#dce7e1}.chat-meta{display:grid;gap:5px;min-width:0}.chat-title{justify-content:space-between;gap:10px;min-width:0}.chat-title strong,.chat-preview{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-title strong{max-width:100%}.chat-title time,.chat-preview{color:#6a7772;font-size:.82rem}.chat-preview{gap:4px}.unread{display:grid;min-width:22px;height:22px;place-items:center;border-radius:999px;color:#fff;background:#1a9b69;font-size:.75rem;font-weight:800}.conversation-panel{position:relative;display:grid;min-width:0;height:100dvh;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden;background:linear-gradient(#e8ebe5e6,#e8ebe5e6),radial-gradient(circle at 20% 20%,rgba(18,106,88,.08) 0 1px,transparent 1px);background-size:auto,22px 22px}.conversation-header{gap:12px;min-width:0;padding:12px 16px;border-bottom:1px solid #d3ddd8;background:#f6faf7}.conversation-title{display:grid;min-width:0;flex:1;gap:3px}.conversation-title strong,.conversation-title span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-title span{display:flex;align-items:center;gap:5px;color:#697873;font-size:.83rem}.header-actions{display:flex;gap:4px}.icon-button{width:38px;height:38px}.mobile-only{display:none}.floating-error{position:absolute;z-index:3;top:72px;right:18px;display:flex;align-items:flex-start;gap:10px;max-width:360px;padding:10px 12px;box-shadow:0 16px 40px #0000001f}.floating-error span{min-width:0;overflow-wrap:anywhere}.floating-error button{display:grid;width:24px;height:24px;flex:0 0 auto;place-items:center;border:0;border-radius:6px;color:#7d1c1c;background:#7d1c1c14;font-size:1.25rem;line-height:1}.floating-error button:hover{background:#7d1c1c24}.message-area{min-height:0;overflow-y:auto;padding:22px}.empty-state{display:grid;height:100%;place-items:center;align-content:center;gap:12px;color:#687874;text-align:center}.empty-state h2{margin:0;color:#23312d}.empty-state p{max-width:430px;margin:0}.messages{display:flex;max-width:960px;min-height:100%;flex-direction:column;justify-content:flex-end;gap:8px;margin:0 auto}.typing-indicator{width:fit-content;max-width:min(80%,420px);margin:8px auto 0;padding:7px 12px;border:1px solid #d5e2dc;border-radius:999px;color:#0f6f5a;background:#f6faf7eb;box-shadow:0 6px 18px #23312d14;font-size:.86rem;font-weight:800}.bubble{position:relative;align-self:flex-start;width:fit-content;min-width:72px;max-width:min(680px,78%);padding:9px 11px 6px;border-radius:8px;background:#fff;box-shadow:0 1px 1px #00000014}.bubble.has-reactions{margin-bottom:14px}.bubble:before{position:absolute;bottom:0;left:-7px;width:12px;height:16px;background:#fff;clip-path:polygon(100% 0,0 100%,100% 100%);content:""}.bubble.outbound{align-self:flex-end;background:#d9fdd3}.bubble.audioMessage{min-width:min(340px,82vw)}.bubble.outbound:before{right:-7px;left:auto;background:#d9fdd3;clip-path:polygon(0 0,100% 100%,0 100%)}.message-sender{display:block;margin-bottom:3px;color:#126a58;font-size:.78rem;font-weight:850}.bubble.outbound .message-sender{color:#2f6e37}.bubble p{margin:0 0 4px;line-height:1.42;overflow-wrap:anywhere;white-space:pre-wrap}.message-reactions{position:absolute;right:8px;bottom:-13px;display:inline-flex;gap:3px;align-items:center;min-height:20px;padding:1px 6px;border:1px solid #d7e2dd;border-radius:999px;background:#fff;box-shadow:0 1px 2px #00000024}.bubble.outbound .message-reactions{right:auto;left:8px}.bubble .message-reactions span{display:inline;color:#18221f;font-size:.74rem;line-height:1}.message-image,.message-video{display:block;width:min(360px,100%);max-height:420px;border-radius:8px;object-fit:contain;background:#edf3ef}.message-audio{display:block;width:320px;max-width:100%;height:40px}.message-file{display:inline-flex;align-items:center;gap:8px;max-width:100%;margin-bottom:4px;color:#0b3b36;font-weight:760;text-decoration:none;word-break:break-word}.message-location{display:grid;grid-template-columns:42px minmax(0,1fr);gap:10px;min-width:min(330px,100%);margin-bottom:4px;padding:10px;border:1px solid #cfe0d9;border-radius:8px;color:#123b35;background:#eef7f2;text-decoration:none}.message-location .location-pin{display:grid;width:42px;height:42px;place-items:center;border-radius:8px;color:#fff;background:#126a58}.message-location span:last-child{display:grid;gap:3px;min-width:0}.message-location strong,.message-location small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.message-location small{color:#61736d;font-size:.8rem}.bubble span{display:flex;justify-content:flex-end;gap:4px;color:#66736e;font-size:.72rem}.composer{position:sticky;z-index:4;bottom:0;gap:8px;padding:10px 14px;border-top:1px solid #d3ddd8;background:#f6faf7}.composer button{width:42px;height:42px;flex:0 0 auto}.composer textarea{min-height:44px;max-height:140px;resize:none;padding:12px 14px}.audio-recorder-panel{display:flex;min-width:0;min-height:44px;flex:1;align-items:center;gap:10px;padding:8px 10px 8px 14px;border:1px solid #c8d8d1;border-radius:8px;color:#23312d;background:#fff}.audio-recorder-panel strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.audio-recorder-panel>span:last-of-type{margin-left:auto;color:#66736e;font-variant-numeric:tabular-nums;font-weight:800}.recording-dot{width:10px;height:10px;flex:0 0 auto;border-radius:999px;background:#d92d20;box-shadow:0 0 0 5px #d92d201f}.composer .recording-cancel{width:34px;height:34px;color:#8a1d1d;background:#fde8e8}.composer .recording-cancel:hover{background:#fad5d5}.attachment-input{display:none}.emoji-picker{position:absolute;bottom:calc(100% + 8px);left:14px;display:grid;grid-template-columns:repeat(6,38px);gap:6px;padding:10px;border:1px solid #d3ddd8;border-radius:8px;background:#fff;box-shadow:0 12px 26px #123a3429}.composer .emoji-choice{width:38px;height:38px;padding:0;font-size:1.2rem;background:#f3f8f5}.composer .emoji-choice:hover{background:#e3f0eb}.send-button{color:#fff!important;background:#126a58!important}.send-button:disabled,.composer button:disabled{cursor:not-allowed;opacity:.45}.config-area{min-height:0;overflow-y:auto;padding:22px}.config-panel{display:grid;gap:18px;max-width:980px;margin:0 auto 18px;padding:18px;border:1px solid #d8e2dd;border-radius:8px;background:#fbfdfbf5}.config-panel header,.config-actions,.toggle-line{display:flex;align-items:center}.config-panel header{justify-content:space-between;gap:14px}.config-panel h2{margin:0}.config-grid{display:grid;grid-template-columns:minmax(260px,360px) minmax(0,1fr);gap:18px;align-items:start}.qr-box{display:grid;aspect-ratio:1;place-items:center;border:1px solid #d7e1dc;border-radius:8px;background:#fff}.qr-box img{width:min(86%,320px);height:auto}.qr-ready{display:grid;gap:10px;place-items:center;color:#65736f;font-weight:760;text-align:center}.config-stack{display:grid;gap:12px}.config-stack label{display:grid;gap:7px;color:#34423e;font-size:.9rem;font-weight:740}.config-stack input,.config-stack select{min-height:40px;padding:0 12px}.config-stack textarea{resize:vertical;padding:10px 12px}.session-list{display:grid;gap:8px}.session-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:12px;border:1px solid #d9e3df;border-radius:8px;background:#f7faf8}.session-row-main,.session-row-actions{display:flex;align-items:center}.session-row-main{min-width:0;gap:10px}.session-row-main div{display:grid;gap:3px;min-width:0}.session-row-main strong,.session-row-main span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.session-row-main span{color:#64746f;font-size:.86rem}.session-row-actions{gap:8px}.status-pill{min-width:92px;border-radius:999px;padding:6px 10px;color:#72521a;background:#fff2cf;font-size:.78rem;font-weight:850;text-align:center}.status-pill.ready{color:#126a58;background:#dff5e9}.users-list{display:grid;gap:8px}.user-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;gap:10px;align-items:center;padding:11px;border:1px solid #d9e3df;border-radius:8px;background:#f7faf8}.user-row div{display:grid;gap:3px;min-width:0}.user-row strong,.user-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-row span{color:#64746f;font-size:.86rem}.role-pill{display:inline-grid;min-width:68px;place-items:center;border-radius:999px;padding:6px 10px;color:#0b3b36!important;background:#dff0e8;font-size:.78rem!important;font-weight:850}.danger{color:#a33b3b}.config-actions{flex-wrap:wrap;gap:10px}.config-status{display:grid;gap:3px;padding:12px;border-radius:8px;background:#edf5f1}.config-status span{color:#64746f}.danger-zone{display:grid;gap:12px;padding:14px;border:1px solid #efc9c9;border-radius:8px;background:#fff5f5}.danger-zone div{display:grid;gap:4px}.danger-zone span{color:#8a4b4b;font-size:.9rem}.danger-action{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:38px;border:1px solid #c84d4d;border-radius:8px;padding:0 11px;color:#fff;background:#b93535;font-weight:850}.danger-action:hover:not(:disabled){background:#9f2d2d}.danger-action:disabled{cursor:not-allowed;opacity:.45}.modal-backdrop{position:fixed;z-index:30;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;padding:22px;background:#0c19167a}.danger-modal{display:grid;gap:14px;width:min(520px,100%);border:1px solid #efc9c9;border-radius:8px;padding:22px;background:#fff;box-shadow:0 24px 80px #00000042}.form-modal{display:grid;gap:14px;width:min(520px,100%);border:1px solid #d8e2de;border-radius:8px;padding:22px;background:#fff;box-shadow:0 24px 80px #0000003d}.form-modal form{display:grid;gap:14px}.form-modal h2,.form-modal p{margin:0}.form-modal label{display:grid;gap:7px;color:#34423e;font-size:.9rem;font-weight:740}.form-modal input,.form-modal select{min-height:42px;border:1px solid #c9d3ce;border-radius:8px;padding:0 12px;outline:none;background:#fff;color:#17211e}.info-callout{padding:12px;border-radius:8px;color:#244a43;background:#e9f3ee;font-weight:740}.danger-modal h2,.danger-modal p{margin:0}.danger-modal p{color:#4b5a56;line-height:1.45}.eyebrow.danger{color:#a33a3a}.danger-callout{padding:12px;border-radius:8px;color:#8a2727;background:#fde7e7;font-weight:740}.danger-modal label{display:grid;gap:7px;color:#34423e;font-size:.9rem;font-weight:740}.danger-modal input{min-height:42px;border:1px solid #d4b7b7;border-radius:8px;padding:0 12px;outline:none}.modal-actions{display:flex;justify-content:flex-end;gap:10px}.toggle-line{display:grid!important;grid-template-columns:auto 1fr;justify-content:start}.toggle-line input{width:auto;min-height:0}.spin{animation:spin .9s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(max-width:900px){.app-shell{display:block;background:#fbfdfb}.app-shell.chat-list-collapsed{grid-template-columns:none}.rail{position:absolute;z-index:20;right:0;bottom:0;left:0;height:64px;flex-direction:row;align-items:center;gap:10px;padding:8px 12px calc(8px + env(safe-area-inset-bottom));border-top:1px solid #d3ddd8;border-right:0;background:#f6faf7fa;transform:none}.rail-button{width:46px;height:46px}.rail-brand{min-height:46px}.rail-spacer{flex:1}.user-chip{width:38px;height:38px}.chat-list-panel,.conversation-panel{position:absolute;inset:0 0 calc(64px + env(safe-area-inset-bottom)) 0;height:auto;transition:transform .18s ease}.chat-list-panel{z-index:1;width:auto;border-right:0;transform:translate(0)}.chat-list-panel.collapsed{border-right:0}.chat-list-panel.collapsed>*{visibility:visible}.conversation-panel{z-index:2;transform:translate(100%)}.app-shell.mobile-detail-open .chat-list-panel{transform:translate(-100%)}.app-shell.mobile-detail-open .conversation-panel{transform:translate(0)}.desktop-only,.list-header-actions{display:none}.mobile-only{display:grid}.list-header{padding:18px 16px 12px}.session-card,.search-box,.new-chat{margin-right:14px;margin-left:14px}.chat-row{min-height:72px;padding:10px 14px}.conversation-header{min-height:64px;padding:10px 12px}.floating-error{top:72px;right:12px;left:12px}.composer{gap:6px;padding:8px 10px calc(8px + env(safe-area-inset-bottom))}.composer button{width:40px;height:40px}.composer textarea{min-height:42px;padding:11px 12px}}@media(max-width:760px){.config-grid,.session-row{grid-template-columns:1fr}.session-row-actions{flex-wrap:wrap}.user-row{grid-template-columns:1fr}}@media(max-width:560px){.login-shell{padding:14px}.login-panel{padding:22px}.message-area{padding:14px}.bubble{max-width:88%}}
