:root{--bg: #efeae2;--pattern: rgba(11, 107, 93, .05);--header: #0b6b5d;--header-text: #ffffff;--header-sub: rgba(255, 255, 255, .8);--bubble-me: #d9fdd3;--bubble-them: #ffffff;--text: #111b21;--muted: #667781;--accent: #0b6b5d;--composer: #f0f2f5;--input: #ffffff;--border: rgba(0, 0, 0, .08);--danger: #c62828;--shadow: 0 1px .5px rgba(11, 20, 26, .13);color-scheme:light}@media (prefers-color-scheme: dark){:root{--bg: #0b141a;--pattern: rgba(255, 255, 255, .02);--header: #1f2c34;--header-sub: rgba(255, 255, 255, .65);--bubble-me: #005c4b;--bubble-them: #1f2c34;--text: #e9edef;--muted: #8696a0;--accent: #00a884;--composer: #1f2c34;--input: #2a3942;--border: rgba(255, 255, 255, .08);--danger: #ef5350;--shadow: 0 1px .5px rgba(0, 0, 0, .3);color-scheme:dark}}*{box-sizing:border-box}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}button:disabled{cursor:not-allowed;opacity:.5}.app{display:flex;flex-direction:column;height:100dvh;max-width:760px;margin:0 auto;background-color:var(--bg);background-image:radial-gradient(var(--pattern) 1px,transparent 1px);background-size:18px 18px}.header{display:flex;align-items:center;gap:12px;padding:calc(10px + env(safe-area-inset-top)) 16px 10px;background:var(--header);color:var(--header-text);flex-shrink:0}.avatar{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:#ffffff2e;font-size:20px}.header-text{min-width:0}.title{font-weight:700;font-size:16px}.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:#ffb300}.status-active{background:#4caf50}.status-closed{background:#9e9e9e}.messages{flex:1;overflow-y:auto;padding:12px 16px 8px;-webkit-overflow-scrolling:touch}.privacy-note,.empty{margin:4px auto 12px;max-width:420px;text-align:center;font-size:12.5px;line-height:1.6;color:var(--muted);background:var(--bubble-them);border-radius:8px;padding:6px 10px;box-shadow:var(--shadow)}.load-older{display:block;margin:0 auto 12px;border:0;border-radius:16px;padding:6px 14px;background:var(--bubble-them);color:var(--accent);box-shadow:var(--shadow);font-size:13px}.day-sep{text-align:center;margin:10px 0}.day-sep span{font-size:12px;color:var(--muted);background:var(--bubble-them);padding:4px 10px;border-radius:8px;box-shadow:var(--shadow)}.row{display:flex;margin:2px 0}.row-me{justify-content:flex-end}.row-them{justify-content:flex-start}.bubble{max-width:min(80%,520px);padding:6px 9px 4px;border-radius:8px;box-shadow:var(--shadow);font-size:15px;line-height:1.5;overflow-wrap:anywhere}.bubble-me{background:var(--bubble-me);border-start-end-radius:2px}.bubble-them{background:var(--bubble-them);border-start-start-radius:2px}.bubble-failed{outline:1px solid var(--danger)}.sender{font-size:12.5px;font-weight:700;color:var(--accent);margin-bottom:2px}.text{white-space:pre-wrap}.muted{color:var(--muted);font-style:italic}.bubble-media{display:block;margin:2px 0 4px}.bubble-media img,video.bubble-media{display:block;max-width:100%;max-height:320px;border-radius:6px}audio{display:block;max-width:260px;width:100%;height:40px}.location-link{color:var(--accent);text-decoration:none;font-weight:600}.meta{display:flex;justify-content:flex-end;align-items:center;gap:4px;font-size:11px;color:var(--muted);margin-top:2px}.tick{font-size:11px}.retry{border:0;background:none;color:var(--danger);font-size:12px;padding:0}.composer,.closed-bar{position:relative;display:flex;align-items:flex-end;gap:8px;padding:8px 12px calc(8px + env(safe-area-inset-bottom));background:var(--composer);flex-shrink:0}.closed-bar{justify-content:center;color:var(--muted);font-size:14px;padding-block:14px calc(14px + env(safe-area-inset-bottom))}.input{flex:1;resize:none;border:0;border-radius:20px;padding:10px 14px;background:var(--input);color:var(--text);font:inherit;font-size:16px;line-height:1.4;max-height:120px;outline:none}.icon-btn,.send-btn{width:44px;height:44px;flex-shrink:0;border:0;border-radius:50%;display:grid;place-items:center;font-size:20px}.icon-btn{background:transparent;color:var(--muted)}.send-btn{background:var(--accent);color:#fff}.send-btn:not(:disabled):active,.icon-btn:not(:disabled):active{transform:scale(.94)}.attach-wrap{position:relative}.attach-menu{position:absolute;bottom:52px;inset-inline-start:0;display:flex;flex-direction:column;min-width:170px;background:var(--bubble-them);border-radius:12px;box-shadow:0 4px 16px #0003;overflow:hidden;z-index:5}.attach-menu button{border:0;background:none;color:var(--text);text-align:start;padding:12px 16px;font-size:15px}.attach-menu button+button{border-top:1px solid var(--border)}.recording{align-items:center}.rec-indicator{flex:1;display:flex;align-items:center;gap:8px;color:var(--text);font-variant-numeric:tabular-nums}.rec-dot{width:10px;height:10px;border-radius:50%;background:var(--danger);animation:pulse 1s infinite}@keyframes pulse{50%{opacity:.3}}.composer-error{position:absolute;bottom:100%;inset-inline:12px;color:var(--danger);font-size:13px;padding:4px 0}.center-screen{min-height:100dvh;display:grid;place-items:center;padding:24px 16px}.notice{text-align:center;max-width:360px}.notice h1{font-size:19px;margin:8px 0}.notice p{color:var(--muted);line-height:1.7}.notice-icon{font-size:40px}.primary{border:0;border-radius:22px;padding:10px 22px;background:var(--accent);color:#fff}.spinner{width:36px;height:36px;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(80px + 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:10}@media (prefers-reduced-motion: reduce){.rec-dot,.spinner{animation:none}}
