:root { --blue:#2563eb; --ink:#111827; --muted:#94a3b8; --line:#e5e7eb; --bg:#f8fafc; --amber:#f59e0b; }
* { box-sizing:border-box; }
html,body { width:100%; min-height:100%; margin:0; overscroll-behavior:none; background:#f1f5f9; color:var(--ink); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; }
button,input,textarea { font:inherit; }.agent-root { width:min(100%,520px); min-height:100dvh; margin:auto; position:relative; overflow:hidden; background:#fff; box-shadow:0 0 28px rgba(15,23,42,.08); }
.agent-loading { min-height:100dvh; display:grid; place-items:center; color:#94a3b8; font-size:14px; }
.agent-login { min-height:100dvh; padding:48px 16px 20px; display:flex; align-items:flex-start; justify-content:center; background:#f8fafc; }
.agent-login form { width:100%; max-width:384px; padding:22px 20px; border:1px solid #e5e7eb; border-radius:16px; background:#fff; box-shadow:0 8px 28px rgba(15,23,42,.05); }
.agent-login h1 { margin:0; color:#1f2937; font-size:19px; }.agent-login p { margin:6px 0 20px; color:#6b7280; font-size:12px; line-height:1.55; }
.agent-login input { width:100%; height:45px; margin:0 0 9px; padding:0 12px; border:1px solid #e5e7eb; border-radius:8px; outline:0; font-size:14px; }.agent-login input:focus { border-color:#3b82f6; }
.agent-login button { width:100%; height:44px; margin-top:7px; border:0; border-radius:8px; color:#fff; background:var(--blue); font-size:14px; }.agent-login small { min-height:20px; margin-top:9px; display:block; color:#dc2626; }.agent-login .tip { margin-top:12px; color:#9ca3af; font-size:11px; }
.notify-banner { margin:0 8px; min-height:40px; padding:7px 8px; display:flex; align-items:center; gap:8px; color:#a35400; border:1px solid #fde2a4; border-radius:8px; background:#fff9e8; font-size:11px; }
.notify-banner span { flex:1; }.notify-banner button { padding:6px 13px; border:0; border-radius:6px; color:white; background:#e98a00; font-size:11px; }.notify-banner .close-notify { width:23px; padding:0; color:#f59e0b; background:transparent; font-size:18px; }
.agent-head { height:45px; padding:0 12px; display:flex; align-items:center; border-bottom:1px solid #f1f5f9; background:#fafafa; }.agent-head h1 { margin:0; font-size:16px; }.head-action { margin-left:auto; border:0; color:#64748b; background:transparent; font-size:13px; }
.conversation-list { height:calc(100dvh - 142px - env(safe-area-inset-bottom)); overflow-y:auto; background:#fff; }
.conversation-row { width:100%; min-height:59px; padding:9px 11px; display:grid; grid-template-columns:34px 1fr auto; gap:8px; align-items:center; border:0; border-bottom:1px solid #f0f2f5; color:inherit; background:#fff; text-align:left; }.conversation-row.active { box-shadow:inset 2px 0 #facc15; background:#fffdf5; }
.conv-avatar { width:30px; height:30px; display:grid; place-items:center; border-radius:50%; color:#94a3b8; background:#f1f5f9; font-size:11px; }.active .conv-avatar { color:#d97706; background:#fef3c7; }
.conv-body { min-width:0; }.conv-name { display:flex; align-items:center; gap:6px; color:#1f2937; font-size:14px; }.unread { min-width:17px; height:17px; padding:0 5px; display:grid; place-items:center; border-radius:9px; color:#fff; background:#ef4444; font-size:10px; }.conv-preview { margin-top:4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#94a3b8; font-size:11px; }.conv-time { align-self:start; padding-top:3px; color:#94a3b8; font-size:10px; }
.agent-tabs { position:absolute; z-index:20; left:0; right:0; bottom:0; height:calc(50px + env(safe-area-inset-bottom)); padding-bottom:env(safe-area-inset-bottom); display:grid; grid-template-columns:repeat(3,1fr); border-top:1px solid #dfe3e8; background:rgba(255,255,255,.98); }.agent-tabs button { border:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; color:#111827; background:transparent; font-size:12px; }.agent-tabs span { font-size:21px; line-height:20px; }.agent-tabs button.active { color:#0867ff; }
.filter-sheet { position:absolute; z-index:30; left:0; right:0; bottom:calc(50px + env(safe-area-inset-bottom)); max-height:55vh; padding:14px; border-top:1px solid var(--line); background:#fff; box-shadow:0 -12px 32px rgba(15,23,42,.09); }.filter-title { display:flex; justify-content:space-between; font-size:14px; }.filter-title button { border:0; background:none; font-size:20px; }.filter-chip { width:100%; margin-top:8px; padding:10px; display:flex; justify-content:space-between; border:1px solid var(--line); border-radius:8px; background:#fff; }
.chat-screen { height:100dvh; display:flex; flex-direction:column; background:#f8fafc; }.chat-head { min-height:52px; padding:env(safe-area-inset-top) 10px 0; display:flex; align-items:center; gap:8px; border-bottom:1px solid var(--line); background:#fff; }.chat-head button { width:34px; border:0; color:#334155; background:none; font-size:26px; }.chat-title { min-width:0; flex:1; }.chat-title strong,.chat-title small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.chat-title strong { font-size:14px; }.chat-title small { margin-top:2px; color:#94a3b8; font-size:10px; }.chat-more { font-size:20px !important; }
.message-list { flex:1; min-height:0; padding:12px; overflow-y:auto; }.msg { max-width:78%; margin:7px 0; display:flex; gap:6px; align-items:flex-end; }.msg.service { margin-left:auto; flex-direction:row-reverse; }.msg-bubble { padding:9px 11px; border:1px solid #e5e7eb; border-radius:12px 12px 12px 3px; background:#fff; font-size:13px; line-height:1.5; word-break:break-word; }.service .msg-bubble { color:#fff; border-color:#2563eb; border-radius:12px 12px 3px 12px; background:#2563eb; }.msg-time { color:#94a3b8; font-size:9px; white-space:nowrap; }
.quick-strip { padding:7px 9px; display:flex; gap:6px; overflow-x:auto; border-top:1px solid #f1f5f9; background:#fff; }.quick-strip button { flex:0 0 auto; padding:5px 9px; border:1px solid #e2e8f0; border-radius:14px; color:#64748b; background:#fff; font-size:11px; }
.compose { padding:8px 8px calc(8px + env(safe-area-inset-bottom)); display:flex; gap:7px; border-top:1px solid #e5e7eb; background:#fff; }.compose textarea { min-height:39px; max-height:100px; flex:1; padding:9px 11px; resize:none; border:1px solid #dfe3e8; border-radius:9px; outline:0; font-size:13px; }.compose button { width:60px; border:0; border-radius:8px; color:white; background:#2563eb; font-size:13px; }
.tool-page { height:calc(100dvh - 50px - env(safe-area-inset-bottom)); overflow:auto; background:#f8fafc; }.tool-grid { padding:12px; display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }.tool-card { min-height:96px; padding:14px; border:1px solid #e5e7eb; border-radius:12px; color:inherit; background:#fff; box-shadow:0 1px 2px rgba(15,23,42,.03); text-align:left; }.tool-card b { display:block; font-size:14px; }.tool-card span { margin-top:7px; display:block; color:#94a3b8; font-size:11px; line-height:1.45; }.tool-icon { margin-bottom:9px; font-size:24px; }
.tool-sheet{max-height:72vh;overflow:auto}.tool-sheet-body{padding-top:8px}.tool-result{margin-top:7px;padding:9px;display:grid;grid-template-columns:1fr auto;gap:4px 8px;border:1px solid var(--line);border-radius:8px}.tool-result b{font-size:12px}.tool-result span{grid-column:1;color:#94a3b8;font-size:10px}.tool-result button{grid-column:2;grid-row:1/3;padding:4px 8px;border:0;border-radius:6px;color:#2563eb;background:#eff6ff}.tool-result i{width:9px;height:9px;align-self:center;border-radius:50%}.sheet-primary{width:100%;margin-top:9px;padding:10px;border:0;border-radius:8px;color:#fff;background:#2563eb}.danger-text{color:#dc2626}
.mine-page { height:calc(100dvh - 50px - env(safe-area-inset-bottom)); overflow:auto; background:#f8fafc; }.profile { padding:24px 16px; display:flex; gap:12px; align-items:center; background:#fff; }.profile-avatar { width:48px;height:48px;display:grid;place-items:center;border-radius:50%;color:white;background:#111827;font-weight:700; }.profile strong,.profile small { display:block; }.profile small { margin-top:5px; color:#94a3b8; font-size:11px; }.setting-list { margin-top:10px; background:#fff; }.setting-row { min-height:49px; padding:0 15px; display:flex; align-items:center; border-bottom:1px solid #f1f5f9; font-size:13px; }.setting-row span { margin-left:auto; color:#94a3b8; }.logout-agent { width:calc(100% - 24px); height:44px; margin:18px 12px; border:1px solid #fecaca; border-radius:9px; color:#dc2626; background:#fff; }
.empty { padding:60px 20px; text-align:center; color:#94a3b8; font-size:12px; }.agent-toast { position:absolute; z-index:100; left:50%; bottom:70px; transform:translateX(-50%); padding:8px 13px; border-radius:20px; color:white; background:rgba(15,23,42,.9); font-size:12px; white-space:nowrap; }
.retention-note{padding:7px 10px;color:#667085;border-bottom:1px solid #eef2f6;background:#f8fafc;font-size:10px;text-align:center}.chat-retention{border-top:1px solid #eef2f6}.retention-menu-note{margin:12px 0 2px;padding:9px;border-radius:8px;color:#667085;background:#f8fafc;font-size:11px;line-height:1.55}.workspace-root .conversation-list{height:calc(100dvh - 171px - env(safe-area-inset-bottom))}.workspace-root.no-notify .conversation-list{height:calc(100dvh - 131px - env(safe-area-inset-bottom))}

/* Rich media composer */
.msg-bubble p{margin:5px 0 0}.msg-bubble a{display:block}.agent-media{display:block;max-width:100%;border-radius:8px}.agent-media.image{max-height:280px;object-fit:contain}.agent-media.video{width:min(100%,340px);max-height:300px;background:#111}.agent-audio{min-width:220px;display:grid;gap:6px}.agent-audio span{font-size:11px}.agent-audio audio{width:220px;max-width:100%;height:34px}.agent-compose-tools{height:38px;padding:4px 8px;display:flex;align-items:center;gap:5px;border-top:1px solid #eef2f6;background:#fff}.agent-compose-tools button,.agent-compose-tools label{width:31px;height:29px;padding:0;display:grid;place-items:center;border:0;border-radius:7px;color:#475467;background:#f2f4f7;font-size:18px}.agent-compose-tools label input{display:none}.agent-compose-tools span{margin-left:3px;color:#667085;font-size:10px}.agent-compose-tools button.recording{color:#fff;background:#ef4444;animation:agentVoicePulse 1s infinite}.agent-emoji-panel{padding:7px 9px;display:flex;flex-wrap:wrap;gap:5px;border-top:1px solid #eef2f6;background:#f8fafc}.agent-emoji-panel[hidden]{display:none}.agent-emoji-panel button{width:31px;height:31px;border:1px solid #e4e7ec;border-radius:7px;background:#fff;font-size:17px}.compose{padding-top:6px}.message-list{padding-bottom:8px}@keyframes agentVoicePulse{50%{transform:scale(.9);opacity:.72}}@media(max-width:380px){.agent-audio{min-width:185px}.agent-audio audio{width:185px}}
