:root{--bg: #efeae2;--wall: url(/wall-light.svg);--header: #008069;--header-text: #ffffff;--header-sub: rgba(255, 255, 255, .82);--bubble-me: #d9fdd3;--bubble-them: #ffffff;--text: #111b21;--muted: #667781;--accent: #00a884;--sender: #06cf9c;--tick: #53bdeb;--composer: #f0f2f5;--input: #ffffff;--icon: #54656f;--chip: #ffffff;--privacy-bg: #ffeecd;--privacy-text: #54656f;--border: rgba(0, 0, 0, .08);--danger: #ea0038;--wave: #c4cbcf;--wave-me: #a8c9a1;--shadow: 0 1px .5px rgba(11, 20, 26, .13);color-scheme:light}@media (prefers-color-scheme: dark){:root{--bg: #0b141a;--wall: url(/wall-dark.svg);--header: #202c33;--header-text: #e9edef;--header-sub: #8696a0;--bubble-me: #005c4b;--bubble-them: #202c33;--text: #e9edef;--muted: #8696a0;--accent: #00a884;--sender: #06cf9c;--composer: #202c33;--input: #2a3942;--icon: #8696a0;--chip: #182229;--privacy-bg: #182229;--privacy-text: #ffd279;--border: rgba(255, 255, 255, .08);--danger: #f15c6d;--wave: #53656f;--wave-me: #4d8b7e;--shadow: 0 1px .5px rgba(11, 20, 26, .13);color-scheme:dark}}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body,#root{height:100%;margin:0}body{font-family:system-ui,-apple-system,Segoe UI,Tahoma,Noto Sans Arabic,sans-serif;background:var(--bg);color:var(--text);-webkit-text-size-adjust:100%;overscroll-behavior:none}button{font:inherit;cursor:pointer;color:inherit}button:disabled{cursor:not-allowed;opacity:.45}svg{display:block;flex-shrink:0}[dir=rtl] .flip-rtl{transform:scaleX(-1)}.app{position:relative;display:flex;flex-direction:column;height:100dvh;max-width:900px;margin:0 auto;background-color:var(--bg);background-image:var(--wall);background-size:190px 190px}.header{display:flex;align-items:center;gap:12px;padding:calc(8px + env(safe-area-inset-top)) 16px 8px;min-height:60px;background:var(--header);color:var(--header-text);flex-shrink:0;z-index:2}.logo-avatar{display:grid;place-items:center;flex-shrink:0;border-radius:50%;background:#fff;overflow:hidden}.logo-avatar img{width:80%;height:80%;object-fit:contain}.header-text{min-width:0}.title{font-weight:600;font-size:16.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.subtitle{font-size:13px;color:var(--header-sub);display:flex;align-items:center;gap:6px}.status-dot{width:8px;height:8px;border-radius:50%;background:#9e9e9e}.status-pending{background:#ffbc2d}.status-active{background:#25d366}.status-closed{background:#9e9e9e}.messages{flex:1;overflow-y:auto;padding:10px 4% 8px;-webkit-overflow-scrolling:touch}.system-chip{display:flex;align-items:center;justify-content:center;gap:6px;width:fit-content;max-width:min(92%,460px);margin:6px auto 10px;padding:6px 12px;border:0;border-radius:8px;background:var(--chip);color:var(--muted);font-size:12.5px;line-height:1.6;text-align:center;box-shadow:var(--shadow)}.privacy-chip{background:var(--privacy-bg);color:var(--privacy-text)}.load-older{color:var(--accent)}.day-sep{display:flex;justify-content:center;margin:12px 0 8px;position:sticky;top:4px;z-index:1}.day-sep span{font-size:12.5px;color:var(--muted);background:var(--chip);padding:5px 12px;border-radius:8px;box-shadow:var(--shadow)}.row{display:flex;flex-direction:column;margin-top:2px}.row-first{margin-top:10px}.row-me{align-items:flex-end}.row-them{align-items:flex-start}.bubble{position:relative;max-width:min(78%,560px);padding:6px 9px;border-radius:8px;box-shadow:var(--shadow);font-size:14.6px;line-height:1.45;overflow-wrap:anywhere}.bubble-me{background:var(--bubble-me)}.bubble-them{background:var(--bubble-them)}.bubble-tail.bubble-me{border-start-end-radius:0}.bubble-tail.bubble-them{border-start-start-radius:0}.bubble-tail:before{content:"";position:absolute;top:0;width:8px;height:13px;background:inherit}.bubble-tail.bubble-me:before{inset-inline-end:-8px;clip-path:polygon(0 0,100% 0,0 100%)}.bubble-tail.bubble-them:before{inset-inline-start:-8px;clip-path:polygon(0 0,100% 0,100% 100%)}[dir=rtl] .bubble-tail.bubble-me:before{clip-path:polygon(0 0,100% 0,100% 100%)}[dir=rtl] .bubble-tail.bubble-them:before{clip-path:polygon(0 0,100% 0,0 100%)}.sender{font-size:12.8px;font-weight:600;color:var(--sender);margin-bottom:2px}.text{white-space:pre-wrap}.muted{color:var(--muted);font-style:italic}.meta{display:inline-flex;align-items:center;gap:3px;float:inline-end;margin-inline-start:10px;margin-top:6px;margin-bottom:-4px;font-size:11px;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}.text .meta{position:relative;top:4px;margin-top:0}.tick{color:var(--muted)}.meta-failed{color:var(--danger)}.meta-overlay{position:absolute;bottom:8px;inset-inline-end:10px;float:none;margin:0;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.6)}.meta-overlay .tick{color:#fff}.bubble:after{content:"";display:block;clear:both}.retry{border:0;background:none;color:var(--danger);font-size:12px;padding:4px 2px 0}.bubble-visual{padding:3px}.bubble-visual .sender{padding:3px 6px 0}.bubble-visual .text{padding:4px 6px 2px}.media-btn{position:relative;display:block;border:0;padding:0;background:#000;border-radius:6px;overflow:hidden;width:min(300px,68vw)}.media-btn img,.media-btn video{display:block;width:100%;max-height:340px;min-height:120px;object-fit:cover}.play-overlay{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:56px;height:56px;border-radius:50%;display:grid;place-items:center;background:#0b141a8c;color:#fff}.play-overlay svg{margin-inline-start:3px}.bubble-audio{padding:7px 8px 6px}.voice{display:flex;align-items:center;gap:8px;width:min(290px,66vw)}.voice-play{width:34px;height:34px;border:0;padding:0;display:grid;place-items:center;background:none;color:var(--icon)}.voice-body{flex:1;min-width:0}.voice-wave{position:relative;display:flex;align-items:center;gap:2px;height:28px;cursor:pointer}.voice-wave span{flex:1;min-width:2px;border-radius:2px;background:var(--wave)}.voice-me .voice-wave span{background:var(--wave-me)}.voice-wave span.played{background:var(--icon)}.voice-me .voice-wave span.played{background:var(--accent)}.voice-knob{position:absolute;top:50%;width:12px;height:12px;margin-left:-6px;margin-top:-6px;border-radius:50%;background:var(--accent)}.voice-them .voice-knob{background:#3b9ee8}.voice-time{font-size:11px;color:var(--muted);margin-top:2px;font-variant-numeric:tabular-nums}.voice-avatar{width:42px;height:42px;border-radius:50%;flex-shrink:0;display:grid;place-items:center;background:#dfe5e7;color:#fff}.voice-me .voice-avatar{background:var(--accent)}.voice-them .voice-avatar{background:#3b9ee8}.voice-rate{width:42px;height:26px;flex-shrink:0;border:0;border-radius:13px;background:#0000001f;color:var(--text);font-size:12.5px;font-weight:600}.bubble-audio{padding-bottom:18px}.bubble-audio .meta{position:absolute;bottom:4px;right:10px;float:none;margin:0}.bubble-audio .voice-time{position:absolute;bottom:4px;margin:0}.bubble-audio .voice-body{position:static}.location-card{display:flex;align-items:center;gap:10px;min-width:220px;padding:8px 6px 4px;color:inherit;text-decoration:none}.location-pin{width:48px;height:48px;border-radius:10px;flex-shrink:0;display:grid;place-items:center;background:#00a88426;color:var(--accent)}.location-text{display:flex;flex-direction:column;gap:1px}.location-text small{color:var(--muted);font-size:12px}.location-open{color:var(--tick);font-size:13px}.doc-link{display:inline-flex;align-items:center;gap:6px;color:var(--tick);text-decoration:none}.scroll-down{position:absolute;bottom:calc(76px + env(safe-area-inset-bottom));inset-inline-start:16px;width:42px;height:42px;border-radius:50%;border:0;display:grid;place-items:center;background:var(--chip);color:var(--icon);box-shadow:0 1px 3px #0b141a4d;z-index:3}.scroll-badge{position:absolute;top:-6px;inset-inline-end:-4px;min-width:20px;height:20px;padding:0 5px;border-radius:10px;display:grid;place-items:center;background:var(--accent);color:#fff;font-size:11.5px;font-weight:700}.composer,.closed-bar{position:relative;display:flex;align-items:flex-end;gap:6px;padding:6px 8px calc(6px + env(safe-area-inset-bottom));background:transparent;flex-shrink:0}.closed-bar{justify-content:center;align-items:center;margin:6px 12px calc(10px + env(safe-area-inset-bottom));padding:10px 16px;background:var(--chip);color:var(--muted);font-size:14px;border-radius:10px;box-shadow:var(--shadow)}.pill{flex:1;min-width:0;display:flex;align-items:flex-end;min-height:48px;padding:2px 4px;background:var(--input);border-radius:24px;box-shadow:var(--shadow)}.input{flex:1;min-width:0;resize:none;border:0;padding:12px 10px 12px 4px;background:transparent;color:var(--text);font:inherit;font-size:16px;line-height:1.4;max-height:120px;outline:none}.input::placeholder{color:var(--muted)}.icon-btn{width:40px;height:44px;flex-shrink:0;border:0;padding:0;background:transparent;display:grid;place-items:center;color:var(--icon)}.round-btn{width:48px;height:48px;flex-shrink:0;border:0;border-radius:50%;display:grid;place-items:center;background:var(--accent);color:#fff;box-shadow:var(--shadow)}.round-btn:not(:disabled):active,.icon-btn:not(:disabled):active{transform:scale(.94)}.rec-pill{align-items:center;gap:8px;padding-inline-end:14px}.rec-cancel{color:var(--danger)}.rec-dot{width:10px;height:10px;border-radius:50%;background:var(--danger);animation:pulse 1s infinite}@keyframes pulse{50%{opacity:.25}}.rec-time{color:var(--text);font-variant-numeric:tabular-nums;min-width:36px}.rec-wave{flex:1;min-width:0;height:28px;display:flex;align-items:center;justify-content:flex-end;gap:2px;overflow:hidden}.rec-wave span{width:3px;flex-shrink:0;border-radius:2px;background:var(--icon)}.composer-error{position:absolute;bottom:100%;inset-inline:12px;color:var(--danger);font-size:13px;padding:4px 8px;background:var(--chip);border-radius:8px;box-shadow:var(--shadow)}.sheet-backdrop{position:fixed;inset:0;z-index:20;display:flex;align-items:flex-end;justify-content:center;background:#0b141a59}.attach-sheet{display:flex;justify-content:space-around;width:min(100% - 16px,520px);margin-bottom:calc(70px + env(safe-area-inset-bottom));padding:20px 12px 16px;background:var(--chip);border-radius:16px;box-shadow:0 6px 24px #0b141a4d}.attach-item{display:flex;flex-direction:column;align-items:center;gap:8px;border:0;background:none;color:var(--muted);font-size:13px}.attach-icon{width:56px;height:56px;border-radius:50%;display:grid;place-items:center;color:#fff}.attach-gallery{background:#bf59cf}.attach-camera{background:#ff2e74}.attach-location{background:#1fa855}.viewer{position:fixed;inset:0;z-index:30;display:grid;place-items:center;background:#000000f0}.viewer-content img,.viewer-content video{display:block;max-width:100vw;max-height:100dvh;object-fit:contain}.viewer-close{position:absolute;top:calc(10px + env(safe-area-inset-top));inset-inline-end:12px;width:44px;height:44px;border:0;border-radius:50%;display:grid;place-items:center;background:#ffffff1f;color:#fff;z-index:1}.center-screen{min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;padding:24px 16px;background:var(--bg)}.notice{display:flex;flex-direction:column;align-items:center;text-align:center;max-width:360px}.notice h1{font-size:19px;margin:12px 0 6px}.notice p{color:var(--muted);line-height:1.7;margin:0 0 16px}.notice .logo-avatar{box-shadow:var(--shadow)}.notice-icon{margin-top:16px;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:var(--chip);color:var(--muted);box-shadow:var(--shadow)}.primary{border:0;border-radius:22px;padding:10px 24px;background:var(--accent);color:#fff}.spinner{width:32px;height:32px;border-radius:50%;border:3px solid var(--border);border-top-color:var(--accent);animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.toast{position:fixed;bottom:calc(84px + env(safe-area-inset-bottom));left:50%;transform:translate(-50%);max-width:calc(100% - 32px);background:#111b21eb;color:#fff;padding:10px 16px;border-radius:10px;font-size:14px;z-index:40}@media (prefers-reduced-motion: reduce){.rec-dot,.spinner{animation:none}}
