:root{--bg:#07111f;--bg2:#0f172a;--panel:rgba(255,255,255,.88);--line:rgba(15,23,42,.08);--text:#0f172a;--muted:#64748b;--brand:#111827;--brand2:#2563eb;--chip:#f8fafc;--danger:#dc2626;}
*{box-sizing:border-box} body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;color:var(--text);background:radial-gradient(circle at top left, rgba(37,99,235,.18), transparent 25%),radial-gradient(circle at bottom right, rgba(15,23,42,.15), transparent 26%),linear-gradient(180deg,#eef4ff 0%,#f8fafc 100%)} a{text-decoration:none;color:inherit}
.chat-body{display:grid;place-items:center;min-height:100vh}
.chat-shell{width:min(100%,460px);height:100vh;background:rgba(255,255,255,.74);backdrop-filter:blur(12px);display:grid;grid-template-rows:auto 1fr auto auto;border-inline:1px solid rgba(255,255,255,.6)}
.chat-shell.popup{width:420px;height:730px;border-radius:22px;overflow:hidden;box-shadow:0 26px 70px rgba(15,23,42,.28);border:1px solid rgba(255,255,255,.7)}
.topbar{padding:16px 18px 14px;background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(255,255,255,.88));border-bottom:1px solid var(--line)} .badge{display:inline-flex;align-items:center;gap:8px;font-size:12px;color:var(--muted);margin-bottom:10px}.dot{width:8px;height:8px;border-radius:50%;background:#22c55e}.dot.off{background:#f59e0b}.topbar h1{margin:0;font-size:20px}.topbar p{margin:8px 0 0;color:var(--muted);font-size:13px;line-height:1.45}
.messages{overflow:auto;padding:18px;display:flex;flex-direction:column;gap:12px}.msg{max-width:84%;padding:12px 14px;border-radius:18px;line-height:1.45;font-size:14px;white-space:pre-wrap;box-shadow:0 6px 16px rgba(15,23,42,.06)}.msg.user{align-self:flex-end;background:linear-gradient(135deg,#111827,#1f2937);color:#fff;border-bottom-right-radius:8px}.msg.assistant,.msg.agent{align-self:flex-start;background:rgba(255,255,255,.95);border:1px solid rgba(15,23,42,.06);border-bottom-left-radius:8px}.msg.agent{background:linear-gradient(180deg,#eef4ff,#ffffff)}.msg.system{align-self:center;background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;text-align:center}.msg small{display:block;margin-top:6px;opacity:.6;font-size:11px}.who{display:block;font-size:11px;color:#2563eb;margin-bottom:6px;font-weight:700}
.typing{width:66px;padding:12px 14px;border-radius:18px;background:rgba(255,255,255,.94);border:1px solid rgba(15,23,42,.06);display:inline-flex;gap:6px;align-items:center}.typing span{width:7px;height:7px;border-radius:50%;background:#94a3b8;animation:pulse 1s infinite ease-in-out}.typing span:nth-child(2){animation-delay:.15s}.typing span:nth-child(3){animation-delay:.3s}@keyframes pulse{0%,80%,100%{transform:scale(.75);opacity:.4}40%{transform:scale(1);opacity:1}}
.start-card,.composer,.rating-card{border-top:1px solid var(--line);background:linear-gradient(180deg,rgba(255,255,255,.92),rgba(255,255,255,.98));padding:16px 18px 18px}.start-card h2,.rating-card h3{margin:0 0 10px}.stack{display:grid;gap:10px}.helper{font-size:12px;color:var(--muted)}.error{color:#b91c1c;font-size:13px;margin-top:8px}
input,textarea,button,select{font:inherit}input,textarea,select{width:100%;border:1px solid rgba(148,163,184,.35);background:#fff;border-radius:14px;padding:13px 14px;outline:none;transition:.2s border-color,.2s box-shadow}input:focus,textarea:focus,select:focus{border-color:rgba(37,99,235,.55);box-shadow:0 0 0 4px rgba(37,99,235,.12)}button{border:0;border-radius:14px;padding:13px 16px;background:linear-gradient(135deg,#111827,#2563eb);color:#fff;font-weight:600;cursor:pointer}button.secondary{background:#e2e8f0;color:#0f172a}button.danger{background:linear-gradient(135deg,#7f1d1d,#dc2626)}
.row,.composer-row,.sidebar-actions,.demo-actions,.inline-actions{display:flex;gap:10px}.row>*{flex:1}.composer{display:none}.composer.active{display:block}.composer-row textarea{resize:none;min-height:50px}.composer-actions{display:flex;justify-content:flex-end;margin-top:8px}.suggestions{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}.chip{padding:9px 12px;border-radius:999px;background:var(--chip);border:1px solid rgba(148,163,184,.25);color:#334155;cursor:pointer;font-size:13px}.rating-card .stars{display:flex;gap:8px}.rating-card .stars button{font-size:28px;line-height:1;background:#fff7ed;color:#f59e0b;padding:8px 14px}
.support-launcher-wrap{position:fixed;right:24px;bottom:24px;z-index:30}.support-launcher{display:flex;flex-direction:column;gap:4px;min-width:220px;text-align:left;padding:16px 18px;border-radius:22px;border:1px solid rgba(255,255,255,.65);box-shadow:0 22px 55px rgba(15,23,42,.22)}.support-launcher__title{font-size:15px;font-weight:800}.support-launcher__sub{font-size:12px;opacity:.9}
.demo-wrap{min-height:100vh;display:grid;place-items:center;padding:32px}.demo-card{max-width:720px;background:rgba(255,255,255,.8);backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.7);border-radius:28px;box-shadow:0 24px 70px rgba(15,23,42,.18);padding:36px}.demo-badge{display:inline-block;background:#e0e7ff;color:#3730a3;padding:8px 12px;border-radius:999px;font-size:12px;font-weight:700}.demo-card h1{font-size:42px;line-height:1.02;margin:18px 0 12px}.demo-card p{font-size:17px;color:var(--muted);max-width:52ch}.demo-btn{padding:14px 18px;border-radius:16px;background:linear-gradient(135deg,#111827,#2563eb);color:#fff;font-weight:700}.demo-btn.secondary{background:#fff;color:#0f172a;border:1px solid rgba(148,163,184,.25)}
.panel-shell{min-height:100vh;display:grid;grid-template-columns:320px 1fr;background:linear-gradient(180deg,#f8fafc,#eef4ff)}.panel-shell.narrow{grid-template-columns:1fr;place-items:center;padding:36px}.sidebar{border-right:1px solid var(--line);background:rgba(255,255,255,.8);backdrop-filter:blur(12px);padding:18px;display:flex;flex-direction:column;gap:16px}.sidebar-head h2{margin:0 0 4px}.sidebar-head p{margin:0;color:var(--muted)}.sidebar-actions a{padding:10px 12px;border-radius:12px;background:#f8fafc;border:1px solid rgba(148,163,184,.25);font-size:13px}.list-block h3{margin:0 0 12px}.list-item,.empty,.agent-row{display:flex;flex-direction:column;gap:4px;padding:12px;border-radius:14px;background:#fff;border:1px solid rgba(148,163,184,.18);margin-bottom:8px}.list-item span,.agent-row span{font-size:12px;color:var(--muted)}
.panel-card{background:rgba(255,255,255,.86);border:1px solid rgba(255,255,255,.7);backdrop-filter:blur(10px);border-radius:24px;box-shadow:0 16px 40px rgba(15,23,42,.08);padding:20px}.auth-card{width:min(100%,420px)}.admin-content,.agent-chat-wrap{padding:22px}.agent-chat-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.agent-chat-top h2{margin:0}.agent-chat-top p{margin:6px 0 0;color:var(--muted)}.agent-thread{margin-top:18px;display:flex;flex-direction:column;gap:10px;max-height:60vh;overflow:auto;padding-right:4px}.agent-msg{padding:12px 14px;border-radius:16px;background:#fff;border:1px solid rgba(148,163,184,.18)}.agent-msg.user{background:#111827;color:#fff;align-self:flex-end}.agent-msg.agent{background:#eff6ff}.agent-msg.system{background:#fff7ed}.agent-msg.assistant{background:#f8fafc}.agent-msg small{display:block;margin-top:6px;opacity:.6}.agent-send-form{display:grid;gap:10px;margin-top:18px}.alert{padding:14px 16px;border-radius:14px;margin-bottom:14px}.success-box{background:#ecfdf5;color:#166534;border:1px solid #a7f3d0}.error-box{background:#fef2f2;color:#991b1b;border:1px solid #fecaca}.days-row{display:flex;flex-wrap:wrap;gap:8px}.day-pill{padding:8px 10px;border-radius:999px;background:#f8fafc;border:1px solid rgba(148,163,184,.25);display:flex;align-items:center;gap:6px}.switch-line{display:flex;align-items:center;gap:8px}.admin-agent-list{margin-top:14px;display:grid;gap:10px}.status-tag{padding:6px 10px;border-radius:999px;font-size:12px;font-weight:700;align-self:flex-start}.status-tag.online{background:#dcfce7;color:#166534}.status-tag.offline{background:#f1f5f9;color:#475569}
@media (max-width: 900px){.panel-shell{grid-template-columns:1fr}.sidebar{border-right:0;border-bottom:1px solid var(--line)}}
@media (max-width: 768px){.chat-shell,.chat-shell.popup{width:100%;height:100vh;border-radius:0;box-shadow:none}.support-launcher-wrap{right:14px;bottom:14px}.support-launcher{min-width:unset;width:calc(100vw - 28px)}.demo-card h1{font-size:32px}.row,.demo-actions,.sidebar-actions,.inline-actions{flex-direction:column}}
