:root{--bg: #0f172a;--panel: #ffffff;--primary: #2563eb;--primary-600: #1d4ed8;--text: #0f172a;--muted: #64748b;--agent-bubble: #f1f5f9;--guest-bubble: #2563eb;--border: #e2e8f0;--danger: #dc2626}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{font-family:Segoe UI,Tahoma,Noto Kufi Arabic,Noto Sans Arabic,system-ui,-apple-system,Roboto,Helvetica,Arial,sans-serif;background:linear-gradient(160deg,#1e293b,#0f172a);color:var(--text)}.app{height:100%;display:flex;align-items:stretch;justify-content:center;padding:16px}.app.center{align-items:center}.card{width:100%;max-width:440px;background:var(--panel);border-radius:16px;box-shadow:0 24px 60px #02061759;overflow:hidden;display:flex;flex-direction:column}.chat{height:min(720px,100%)}.intro{padding:28px 24px;gap:6px}.intro h1{margin:8px 0 2px;font-size:22px}.intro label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600;color:#334155;margin-top:12px}.intro input{font-weight:400}.brand{display:flex;align-items:center;gap:8px;font-weight:700;color:var(--primary);font-size:14px}.brand-dot{width:10px;height:10px;border-radius:50%;background:var(--primary);box-shadow:0 0 0 4px #2563eb26}.muted{color:var(--muted);font-weight:400}.lab-chip{align-self:flex-start;margin-top:10px;background:#eff6ff;color:var(--primary-600);border:1px solid #bfdbfe;border-radius:8px;padding:4px 10px;font-size:12.5px;font-weight:700}.lab-tag{margin-inline-start:8px;background:#eff6ff;color:var(--primary-600);border:1px solid #bfdbfe;border-radius:999px;padding:2px 9px;font-size:11.5px;font-weight:700}input{width:100%;padding:11px 13px;border:1px solid var(--border);border-radius:10px;font-size:15px;outline:none;transition:border-color .15s,box-shadow .15s}input:focus{border-color:var(--primary);box-shadow:0 0 0 3px #2563eb26}button.primary{margin-top:16px;background:var(--primary);color:#fff;border:none;padding:12px 16px;border-radius:10px;font-size:15px;font-weight:600;cursor:pointer;transition:background .15s}button.primary:hover:not(:disabled){background:var(--primary-600)}button.primary:disabled{opacity:.55;cursor:default}.error{color:var(--danger);font-size:13px;margin-top:10px}.error.inline{padding:6px 16px 12px;margin:0}.chat-header{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--border)}.status{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted)}.status .dot{width:8px;height:8px;border-radius:50%;background:#94a3b8}.status.online .dot{background:#16a34a}.messages{flex:1;overflow-y:auto;padding:16px 16px 8px;display:flex;flex-direction:column;gap:10px;background:#fbfcfe}.empty{text-align:center;margin:auto;font-size:14px;padding:20px}.msg{display:flex;flex-direction:column;max-width:82%}.msg.guest{align-self:flex-end;align-items:flex-end}.msg.agent{align-self:flex-start;align-items:flex-start}.msg.system{align-self:center;align-items:center;max-width:90%}.msg-author{font-size:11px;color:var(--muted);margin:0 4px 2px;font-weight:600}.bubble{padding:9px 13px;border-radius:14px;font-size:14.5px;line-height:1.4;white-space:pre-wrap;word-break:break-word}.msg.guest .bubble{background:var(--guest-bubble);color:#fff;border-end-end-radius:4px}.msg.agent .bubble{background:var(--agent-bubble);color:var(--text);border-end-start-radius:4px}.msg.system .bubble{background:transparent;color:var(--muted);font-size:12.5px}.msg-time{font-size:10.5px;color:#94a3b8;margin:2px 4px 0}.typing{display:inline-flex;gap:4px;align-items:center}.typing span{width:6px;height:6px;border-radius:50%;background:#94a3b8;animation:blink 1.2s infinite both}.typing span:nth-child(2){animation-delay:.2s}.typing span:nth-child(3){animation-delay:.4s}@keyframes blink{0%,80%,to{opacity:.3}40%{opacity:1}}.banner{padding:8px 16px;font-size:12.5px;color:#92400e;background:#fef3c7;border-top:1px solid #fde68a}.composer{display:flex;gap:8px;padding:12px;border-top:1px solid var(--border);background:#fff}.composer input{flex:1}.composer button.primary{margin-top:0;padding:11px 18px}.spinner{width:34px;height:34px;border:3px solid rgba(255,255,255,.25);border-top-color:#fff;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media (max-width: 480px){.app{padding:0}.card{max-width:100%;border-radius:0;height:100%}.chat{height:100%}}
