.support-page{padding:34px 38px 70px}.support-eyebrow{font-size:10px;font-weight:800;letter-spacing:.12em;opacity:.65}.support-head h1{display:flex;align-items:center;gap:9px;margin:7px 0 5px;font-size:30px}.support-head h1 .icon{width:27px;height:27px}.support-head p,.support-section-head p{margin:0;color:#777;font-size:11px}.support-section{margin-top:28px;border:1px solid #e1e1e6;border-radius:14px;background:#fff;overflow:hidden}.support-section-head{display:flex;justify-content:space-between;align-items:center;padding:20px 22px;border-bottom:1px solid #e7e7eb}.support-section-head h2{display:flex;align-items:center;gap:8px;margin:0 0 5px;font-size:16px}.support-section-head h2 .icon{width:19px;height:19px}.support-count{display:inline-grid;place-items:center;min-width:22px;height:20px;border-radius:10px;background:#eee9ff;color:#6c32d6;font-size:9px}.support-controls{display:flex;align-items:center;gap:9px;padding:13px 16px}.support-controls select,.support-search{height:36px;border:1px solid #ddd;border-radius:8px;background:#fff;padding:0 10px;color:inherit;font-size:10px}.support-search{display:flex;align-items:center;gap:7px;flex:1}.support-search input{border:0;outline:0;width:100%;background:transparent;color:inherit}.support-btn{height:36px;padding:0 12px;border:1px solid #ddd;border-radius:8px;background:#fff;color:inherit;font-size:10px;font-weight:700;display:inline-flex;align-items:center;gap:6px;cursor:pointer}.support-btn.primary{background:#7135e7;color:#fff;border-color:#7135e7}.support-btn .icon,.support-icon-btn .icon{width:15px;height:15px}.support-table-wrap{overflow:auto}.support-table{width:100%;border-collapse:collapse;min-width:850px}.support-table th{padding:11px 15px;background:#f6f6f8;text-align:left;font-size:9px;text-transform:uppercase;letter-spacing:.04em;color:#777}.support-table td{padding:12px 15px;border-top:1px solid #eee;font-size:10px;vertical-align:middle}.support-table td small{display:block;color:#888;margin-top:3px}.support-pill,.support-status{display:inline-flex;padding:5px 8px;border-radius:6px;font-size:9px;font-weight:700}.support-pill.normal{background:#f0f0f3;color:#555}.support-status.open{background:#eaf7ee;color:#26763d}.support-status.active{background:#e9f6ee;color:#25713b}.support-status.waiting{background:#fff4e0;color:#9a6408}.support-status.closed{background:#f0f0f3;color:#666}.support-pill.high,.support-pill.urgent{background:#fde8ea;color:#b4232e}.support-pill.low{background:#eaf4fb;color:#1d5d8a}.support-icon-btn{width:30px;height:30px;border:1px solid #ddd;border-radius:7px;background:#fff;display:inline-grid;place-items:center;cursor:pointer;margin-right:4px;color:inherit}.support-icon-btn.danger{color:#c22e38}.support-empty{text-align:center!important;padding:40px!important;color:#888}.support-empty .icon{width:23px;height:23px;display:block;margin:0 auto 8px}.chat-section{margin-top:18px}.chat-tabs{display:flex;gap:3px;padding:12px 16px 0;border-bottom:1px solid #eee}.chat-tabs button{border:0;background:none;padding:10px 12px;font-size:10px;color:#777;cursor:pointer;border-bottom:2px solid transparent}.chat-tabs button.active{color:#6530c9;border-bottom-color:#6530c9;font-weight:700}.chat-controls{border-bottom:1px solid #eee}.chat-customer{display:flex;align-items:center;gap:9px}.chat-avatar{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#ece8ff;color:#6932cf;font-weight:800}.ai-label{color:#6d35df!important}.last-message{max-width:290px}.last-message small{margin-top:5px}.support-modal-overlay{position:fixed;inset:0;z-index:9999;background:rgba(0,0,0,.6);display:grid;place-items:center;padding:20px}.support-modal{width:min(560px,96vw);background:#fff;color:#17171b;border-radius:14px;padding:22px;position:relative;box-shadow:0 25px 70px rgba(0,0,0,.35)}.support-modal-x{position:absolute;right:12px;top:9px;border:0;background:none;font-size:23px;cursor:pointer;color:inherit}.support-modal h2{margin:5px 0 18px;font-size:19px}.support-detail{font-size:11px;line-height:1.5}.support-detail span{display:block;color:#888;margin-top:3px}.support-detail hr{border:0;border-top:1px solid #eee;margin:14px 0}.support-detail label{display:block;margin-top:14px;font-weight:700}.support-detail textarea{display:block;width:100%;min-height:90px;margin-top:7px;padding:10px;border:1px solid #ddd;border-radius:8px;resize:vertical;background:#fff;color:inherit;box-sizing:border-box}.chat-message{padding:12px;border-radius:10px;background:#f5f5f7;margin-bottom:14px}.support-modal-actions{display:flex;justify-content:flex-end;margin-top:16px}
.support-bulk-bar{display:flex;align-items:center;gap:10px;padding:10px 16px;background:#fff7f7;border-bottom:1px solid #fecaca;font-size:12px;font-weight:700}
.support-btn.support-bulk-delete{background:#c93e4c;border-color:#c93e4c;color:#fff}
.dark .support-section,.dark .support-modal{background:#17171d;border-color:#34343e;color:#eee}.dark .support-section-head,.dark .chat-tabs,.dark .chat-controls,.dark .support-table td{border-color:#30303a}.dark .support-controls select,.dark .support-search,.dark .support-btn,.dark .support-icon-btn,.dark .support-detail textarea{background:#202027;border-color:#3b3b46;color:#eee}.dark .support-table th{background:#22222a;color:#aaa}.dark .support-head p,.dark .support-section-head p,.dark .support-table td small{color:#aaa}.dark .chat-message{background:#22222a}.dark .support-modal-overlay{background:rgba(0,0,0,.78)}
@media(max-width:800px){.support-page{padding:24px 14px}.support-section-head{padding:16px}.support-controls{flex-wrap:wrap}.support-search{min-width:100%;order:3}}

/* Live Chat admin conversation modal */
.support-modal.chat-wide{
  width:min(720px,96vw);
  height:min(88vh,820px);
  max-height:88vh;
  padding:12px 14px calc(32px + env(safe-area-inset-bottom, 0px));
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.support-modal.chat-wide .support-eyebrow{flex:0 0 auto;margin:0 28px 0 0}
.support-modal.chat-wide .support-modal-actions{display:none}
.support-btn.sm{height:28px;padding:0 9px;font-size:9px;border-radius:7px;gap:4px}
.support-btn.sm .icon{width:13px;height:13px}
.chat-head-actions{display:flex;align-items:center;gap:8px}
.chat-row-actions{white-space:nowrap}
.support-icon-btn.takeover{background:#059669;color:#fff;border-color:#059669}
.chat-attach img{max-width:180px;max-height:130px;border-radius:8px;display:block;margin-top:8px}
.system-bubble{align-self:center;width:92%;background:#f6f6f8;color:#555;text-align:center}
.takeover-bubble{align-self:center;width:94%;background:transparent;border:0;padding:4px 0}
.takeover-card{text-align:center;padding:16px 18px;background:linear-gradient(135deg,rgba(5,150,105,.12),rgba(16,185,129,.05));border:1px solid rgba(5,150,105,.28);border-radius:14px}
.takeover-avatar{width:42px;height:42px;margin:0 auto 10px;border-radius:50%;background:linear-gradient(135deg,#059669,#10B981);color:#fff;display:grid;place-items:center;font-weight:800;font-size:16px}
.takeover-title{font-size:13px;color:#1f2937}.takeover-title b{color:#059669}
.kb-cards{display:flex;flex-direction:column;gap:6px;margin-top:8px}
.kb-card{padding:8px 10px;border:1px solid #e5e7eb;border-radius:10px;background:#f9fafb;font-size:11px}
.kb-card small{display:block;color:#059669;margin-top:2px;font-weight:700}
.chat-admin-modal{
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
  margin:8px 0 0;
}
.chat-admin-header{display:flex;justify-content:space-between;align-items:center;padding:0 0 8px;border-bottom:1px solid #e7e7eb;flex:0 0 auto;gap:8px}
.chat-profile{display:flex;align-items:center;gap:9px;min-width:0}.chat-profile h3{margin:0 0 2px;font-size:14px}.chat-profile span:not(.chat-avatar){font-size:10px;color:#777}
.chat-avatar-lg{width:32px;height:32px;font-size:12px}
.chat-head-meta{display:flex;gap:6px;align-items:center;flex-wrap:wrap;flex-shrink:0}.chat-live-status,.chat-priority{font-size:8px;font-weight:800;letter-spacing:.06em;padding:5px 7px;border-radius:6px}.chat-live-status{background:#e8f7ed;color:#23763d}.chat-priority{background:#f0f0f3;color:#555}
.chat-ai-banner{display:flex;align-items:center;gap:8px;flex:0 0 auto;margin:8px 0 0;padding:8px 10px;border:1px solid #e1d8f4;background:#f6f2ff;border-radius:8px;font-size:11px;color:#4c1d95}
.chat-ai-banner .icon{width:16px;height:16px;flex-shrink:0}
.chat-ai-banner div{min-width:0}
.chat-ai-banner strong{display:block}
.chat-ai-banner span{color:#6b5a8a;font-size:10px}
.chat-order-panel{flex:0 0 auto;margin:8px 0 0;padding:8px 10px;border:1px solid #e4e4ea;background:#fafafc;border-radius:8px;max-height:28vh;overflow:auto}
.chat-order-panel.collapsed{max-height:none;overflow:visible}
.chat-order-head{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin-bottom:6px}
.chat-order-head small{font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#555}
.chat-order-head span{font-size:10px;color:#888}
.chat-order-cards{display:flex;flex-direction:column;gap:6px}
.chat-order-card{padding:8px 9px;border:1px solid #e7e7eb;border-radius:8px;background:#fff;font-size:10px}
.chat-order-card-top{display:flex;justify-content:space-between;gap:8px;align-items:center}
.chat-order-card-top span{font-weight:700;color:#23763d}
.chat-order-meta,.chat-order-items{margin-top:4px;color:#555;line-height:1.4}
.chat-order-card .support-btn{margin-top:6px}
.chat-order-empty{font-size:10px;color:#777;line-height:1.45}
/* Order panel toggle */
.chat-order-toggle{border:0;background:none;cursor:pointer;color:#555;padding:2px 4px;font-size:14px;line-height:1;display:inline-flex;align-items:center;transition:transform .2s;border-radius:4px;margin-left:auto}
.chat-order-toggle:hover{background:#eee}
.chat-order-toggle.collapsed{transform:rotate(-90deg)}
.chat-order-panel.collapsed{padding-bottom:4px}
.chat-order-panel.collapsed .chat-order-cards{display:none}

/* JARVIS processing animation */
.jarvis-processing{align-self:flex-start;width:92%;padding:12px 14px;border:1px solid #e1d8f4;background:linear-gradient(135deg,#f8f5ff,#f0ebff);border-radius:12px;animation:jarvisProcIn .3s ease-out}
@keyframes jarvisProcIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.jarvis-proc-header{display:flex;align-items:center;gap:6px;font-size:11px;color:#4c1d95;margin-bottom:10px}
.jarvis-proc-header .icon{width:16px;height:16px}
.jarvis-proc-agents{display:flex;flex-direction:column;gap:4px}
.jarvis-proc-agent{display:flex;align-items:center;gap:8px;font-size:10px;color:#94a3b8;padding:3px 6px;border-radius:6px;transition:all .3s ease}
.jarvis-proc-dot{width:8px;height:8px;border-radius:50%;background:#e2e8f0;flex-shrink:0;transition:all .3s}
.jarvis-proc-name{font-weight:700;min-width:48px}
.jarvis-proc-label{color:#94a3b8;font-size:9px}
.jarvis-proc-agent.active{color:#5b21b6;background:#f0ebff}
.jarvis-proc-agent.active .jarvis-proc-dot{background:#7c3aed;box-shadow:0 0 6px rgba(124,58,237,.5);animation:jarvisDotPulse .8s infinite alternate}
.jarvis-proc-agent.active .jarvis-proc-label{color:#6d28d9}
.jarvis-proc-agent.done{color:#059669}
.jarvis-proc-agent.done .jarvis-proc-dot{background:#10b981}
.jarvis-proc-agent.done .jarvis-proc-label{color:#047857}
@keyframes jarvisDotPulse{from{transform:scale(1)}to{transform:scale(1.4)}}
/* Dark mode processing */
.dark .jarvis-processing{background:linear-gradient(135deg,#1e1833,#241c3a);border-color:#46356b}
.dark .jarvis-proc-header{color:#ddd6fe}
.dark .jarvis-proc-agent{color:#6b7280}
.dark .jarvis-proc-dot{background:#374151}
.dark .jarvis-proc-agent.active{color:#c4b5fd;background:#2a2040}
.dark .jarvis-proc-agent.active .jarvis-proc-dot{background:#a78bfa}
.dark .jarvis-proc-agent.active .jarvis-proc-label{color:#c4b5fd}
.dark .jarvis-proc-agent.done{color:#34d399}
.dark .jarvis-proc-agent.done .jarvis-proc-dot{background:#10b981}
.chat-qa-card{text-align:left;padding:8px 10px;border-radius:8px;background:#fff;border:1px solid #e1d8f4}
.chat-qa-card small{display:block;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#6c32d6;margin-bottom:2px}
.chat-qa-card b{display:block;font-size:12px}
.chat-qa-card p{margin:6px 0 0;color:#444;line-height:1.45}
.chat-triage{flex:0 0 auto;margin:8px 0 0;padding:8px 10px;border:1px solid #cce7d3;background:#f3fbf6;border-radius:8px;font-size:11px;color:#14532d;max-height:28vh;overflow:auto}
.chat-triage[hidden]{display:none!important}
.chat-triage-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.chat-triage small{display:block;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#15803d}
.chat-triage b{margin-right:8px}
.chat-triage p{margin:6px 0;color:#334155}
.chat-suggest-preview{margin:8px 0;padding:8px 10px;border-radius:8px;background:#fff;border:1px dashed #86efac;color:#14532d;line-height:1.4;white-space:pre-wrap}
.chat-ai-banner.agent-mode{background:#edf8f0;border-color:#cce7d3;color:#25733b}.chat-ai-banner.agent-mode span{color:#4f7459}.agent-active{background:#eaf7ee!important;color:#26763d!important;border-color:#cce7d3!important}
.chat-conversation{
  flex:1 1 auto;
  min-height:180px;
  overflow:auto;
  padding:10px 2px 8px;
  display:flex;
  flex-direction:column;
  gap:8px;
  background:#f7f7fa;
  border-radius:10px;
  margin-top:8px;
}
.chat-conversation .support-empty{padding:24px!important}
.chat-bubble{border:1px solid #e4e4e8;border-radius:9px;padding:8px 10px;font-size:10px}.customer-bubble{background:#fafafd}.ai-bubble{background:#f5f2fb;border-color:#e1d8f4}.agent-bubble{background:#eef8f1;border-color:#d3ead9;align-self:flex-end;width:85%}
.bubble-meta{display:flex;gap:5px;color:#777;margin-bottom:5px}.bubble-meta b{color:#333}.bubble-icon{display:flex;margin-bottom:4px}.bubble-icon .icon{width:16px;height:16px;color:#777}.chat-bubble p{margin:4px 0;font-weight:700}.bubble-text{line-height:1.5;color:#444}
.chat-dock{flex:0 0 auto;border-top:1px solid #e7e7eb;padding:8px 0 0;background:#fff;display:flex;flex-direction:column;gap:6px;max-height:46vh;overflow-y:auto;overflow-x:hidden;padding-bottom:8px}
.chat-dock-spacer{height:44px;flex:0 0 44px;pointer-events:none}
.chat-ai-tools{display:flex;flex-wrap:wrap;gap:6px;margin:2px 0 0}
.chat-mini-btn{height:26px;padding:0 8px;border:1px solid #ddd0ff;border-radius:999px;background:#f7f3ff;color:#5b32b8;font-size:9px;font-weight:700;display:inline-flex;align-items:center;gap:4px;cursor:pointer}
.chat-mini-btn .icon{width:12px;height:12px}
.chat-mini-btn.on{background:#7135e7;border-color:#7135e7;color:#fff}
.chat-mini-btn:disabled{opacity:.85;cursor:default}
.jarvis-brand-chip{height:26px;padding:0 10px;border-radius:999px;background:linear-gradient(135deg,#7135e7,#a855f7);color:#fff;font-size:9px;font-weight:800;letter-spacing:.04em;display:inline-flex;align-items:center;gap:4px;cursor:help}.jarvis-brand-chip .icon{width:12px;height:12px}
.chat-compose{border-top:0;padding-top:0}.quick-row,.notify-row,.compose-actions,.chat-footer-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.quick-btn{border:1px solid #ddd;border-radius:7px;background:#fff;padding:5px 8px;font-size:9px;color:inherit;display:inline-flex;gap:4px;align-items:center;cursor:pointer}.quick-btn .icon,.notify-row .icon{width:13px;height:13px}.notify-row{font-size:9px;color:#666;margin:0}.notify-row>span{font-weight:700;color:#444;display:flex;align-items:center;gap:5px}.notify-row label{display:flex;align-items:center;gap:4px}.notify-row small{color:#888}.chat-reply-input{width:100%;min-height:120px;max-height:220px;box-sizing:border-box;margin:0;padding:10px 12px;border:1px solid #ddd;border-radius:8px;background:#fff;color:#17171b;resize:vertical;font:inherit;font-size:12px}.chat-reply-input::placeholder{color:#8a8a96}.compose-actions{justify-content:flex-end}.chat-footer-actions{justify-content:flex-end;border-top:1px solid #e7e7eb;margin-top:2px;padding-top:8px}.chat-footer-actions .danger{color:#bd303b}.chat-footer-actions .support-btn,.compose-actions .support-btn{white-space:nowrap}
@media(max-width:620px){.chat-admin-header{align-items:flex-start;gap:8px}.chat-head-meta{flex-direction:row}.chat-ai-banner{align-items:flex-start}.chat-conversation{min-height:140px}.support-modal.chat-wide{width:min(96vw,720px);height:min(92vh,820px)}}
.dark .chat-admin-header,.dark .chat-compose,.dark .chat-footer-actions,.dark .system-bubble,.dark .chat-dock{border-color:#30303a}
.dark .chat-dock{background:#17171d}
.dark .chat-order-toggle{color:#aaa}
.dark .chat-order-toggle:hover{background:#2a2a34}
.dark .chat-conversation{background:#121218}
.dark .chat-live-status{background:#183b25;color:#79d091}
.dark .chat-priority{background:#2b2b33;color:#bbb}
.dark .chat-ai-banner{background:#282036;border-color:#46356b;color:#e8dcff}
.dark .chat-ai-banner span{color:#cbbfe0}
.dark .chat-order-panel{background:#1a1a22;border-color:#34343e}
.dark .chat-order-card,.dark .chat-qa-card{background:#202027;border-color:#3b3b46;color:#eee}
.dark .chat-order-empty,.dark .chat-order-meta,.dark .chat-order-items{color:#aaa}
.dark .chat-ai-banner.agent-mode{background:#1d3023;border-color:#34583e;color:#a8e2b8}
.dark .chat-ai-banner.agent-mode span{color:#8fb79a}
.dark .customer-bubble{background:#202027;border-color:#373741}
.dark .ai-bubble{background:#282230;border-color:#403650}
.dark .agent-bubble{background:#1d3023;border-color:#34583e}
.dark .system-bubble{background:#22222a;color:#c8c8d2}
.dark .takeover-card{background:linear-gradient(135deg,rgba(5,150,105,.2),rgba(16,185,129,.08));border-color:#34583e}
.dark .takeover-title{color:#e8e8ee}.dark .takeover-sub{color:#8fb79a}
.dark .bubble-meta{color:#aaa}
.dark .bubble-meta b{color:#f2f2f7}
.dark .bubble-text{color:#e6e6ee}
.dark .chat-profile h3,.dark .support-modal.chat-wide,.dark .support-modal.chat-wide h2,.dark .support-modal.chat-wide h3{color:#f2f2f7}
.dark .chat-profile span:not(.chat-avatar){color:#b3b3c0}
.dark .chat-mini-btn{background:#2a2238;border-color:#4b3a6e;color:#d7c7ff}
.dark .chat-mini-btn.on{background:#7c3aed;border-color:#7c3aed;color:#fff}
.dark .quick-btn,.dark .chat-reply-input,.dark .compose-actions .support-btn,.dark .chat-footer-actions .support-btn:not(.primary):not(.danger){background:#202027;border-color:#3b3b46;color:#eee}
.dark .chat-reply-input{color:#f4f4fa;caret-color:#fff}
.dark .chat-reply-input::placeholder{color:#9a9aab}
.dark .notify-row>span{color:#e4e4ee}
.dark .notify-row{color:#c4c4d0}
.dark .notify-row small{color:#9a9aab}
.dark .support-btn.primary,.dark .compose-actions .support-btn.primary{background:#7c3aed;border-color:#7c3aed;color:#fff}
.dark .chat-footer-actions .danger{background:#2a1a1d;border-color:#5a2a32;color:#ff9aa4}
.dark .support-icon-btn.takeover{background:#059669;color:#fff;border-color:#059669}
body.dark .support-modal.chat-wide,
body.dark .chat-reply-input,
body.dark .bubble-text,
body.dark .quick-btn,
body.dark .chat-mini-btn{
  color:#eee;
}

/* Staff Support Center */
.staff-support-overlay{position:fixed;inset:0;z-index:10050;background:rgba(4,6,18,.68);backdrop-filter:blur(4px);display:grid;place-items:center;padding:22px}.staff-support-modal{width:min(980px,96vw);height:min(720px,92vh);background:#fff;color:#17172a;border:1px solid #e3e3eb;border-radius:18px;box-shadow:0 30px 90px rgba(0,0,0,.35);display:flex;flex-direction:column;overflow:hidden;position:relative}.staff-support-close{position:absolute;right:16px;top:16px;border:0;background:transparent;color:inherit;font-size:26px;cursor:pointer;z-index:2}.staff-support-head{padding:24px 150px 16px 28px;display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid #e8e8ee}.staff-support-kicker{font-size:9px;font-weight:800;letter-spacing:.14em;color:#7135e7}.staff-support-head h2{margin:7px 0 5px;font-size:22px;display:flex;gap:9px;align-items:center}.staff-support-head h2 .icon{width:22px;height:22px}.staff-support-head p{margin:0;color:#777;font-size:11px}.staff-online{font-size:9px;color:#26753c;background:#ebf8ef;border:1px solid #cce8d4;padding:7px 10px;border-radius:20px;font-weight:800}.staff-chat-tabs{display:flex;gap:4px;padding:10px 22px 0;border-bottom:1px solid #e8e8ee}.staff-chat-tabs button{border:0;background:transparent;padding:11px 14px;color:#777;font-size:10px;cursor:pointer;border-bottom:2px solid transparent;display:flex;gap:6px;align-items:center}.staff-chat-tabs button.active{color:#6630d0;border-bottom-color:#6630d0;font-weight:800}.staff-chat-tabs .icon{width:15px;height:15px}.staff-support-grid{display:grid;grid-template-columns:265px 1fr;min-height:0;flex:1}.staff-people{border-right:1px solid #e8e8ee;padding:14px;overflow:auto}.staff-search{height:36px;border:1px solid #dddde5;border-radius:9px;display:flex;align-items:center;gap:7px;padding:0 9px;margin-bottom:10px}.staff-search .icon{width:15px;height:15px;color:#888}.staff-search input{border:0;outline:0;background:transparent;color:inherit;width:100%;font-size:10px}.staff-person{width:100%;border:1px solid transparent;background:transparent;text-align:left;border-radius:10px;padding:9px;display:flex;align-items:center;gap:9px;color:inherit;cursor:pointer;margin-bottom:4px}.staff-person:hover,.staff-person.selected{background:#f4f0ff;border-color:#e1d5ff}.staff-person input{accent-color:#7135e7}.staff-avatar{width:34px;height:34px;flex:0 0 34px;border-radius:50%;display:grid;place-items:center;background:#ece7ff;color:#6630d0;font-weight:800;font-size:11px}.staff-person span:nth-of-type(2){min-width:0;flex:1}.staff-person b,.staff-person small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.staff-person b{font-size:10px}.staff-person small{font-size:8px;color:#888;margin-top:3px}.staff-person i{font-style:normal;color:#38a65b;font-size:9px}.staff-chat-panel{min-width:0;display:flex;flex-direction:column}.staff-chat-toolbar{padding:13px 18px;border-bottom:1px solid #e8e8ee;display:flex;justify-content:space-between;align-items:center}.staff-chat-title{display:flex;align-items:center;gap:9px}.staff-chat-title b,.staff-chat-title small{display:block}.staff-chat-title b{font-size:11px}.staff-chat-title small{font-size:8px;color:#888;margin-top:3px}.staff-secure{font-size:8px;color:#6b35d4;background:#f2edff;border:1px solid #dfd2ff;border-radius:14px;padding:6px 8px;display:flex;align-items:center;gap:4px}.staff-secure .icon{width:12px;height:12px}.staff-messages{flex:1;overflow:auto;padding:18px;background:#fafafd}.staff-msg{max-width:78%;padding:10px 12px;border:1px solid #e0e0e7;border-radius:12px;background:#fff;margin-bottom:10px}.staff-msg.mine{margin-left:auto;background:#7135e7;color:#fff;border-color:#7135e7}.staff-msg-meta{display:flex;gap:7px;font-size:8px;opacity:.72;margin-bottom:6px}.staff-msg p{margin:0;font-size:10px;line-height:1.5;white-space:normal}.staff-msg img{display:block;max-width:260px;max-height:200px;border-radius:8px;margin-top:8px}.staff-compose{padding:12px 16px;border-top:1px solid #e8e8ee}.staff-compose textarea{width:100%;min-height:65px;resize:none;border:1px solid #dddde5;border-radius:10px;padding:10px;box-sizing:border-box;background:#fff;color:inherit;outline:none;font:inherit;font-size:10px}.staff-compose-bottom{display:flex;align-items:center;gap:8px;margin-top:8px}.staff-attach-btn{border:1px solid #dddde5;background:#fff;border-radius:8px;padding:8px 10px;font-size:9px;cursor:pointer;display:flex;align-items:center;gap:6px}.staff-attach-btn .icon{width:14px;height:14px}.staff-compose-hint{font-size:8px;color:#888;flex:1}.staff-send,.staff-secondary{border:0;border-radius:8px;padding:9px 13px;background:#7135e7;color:#fff;font-weight:800;font-size:9px;cursor:pointer;display:flex;align-items:center;gap:6px}.staff-send .icon{width:14px;height:14px}.staff-support-footer{border-top:1px solid #e8e8ee;padding:9px 16px;display:flex;justify-content:space-between;align-items:center}.staff-support-footer>span{font-size:8px;color:#888;display:flex;align-items:center;gap:5px}.staff-support-footer .icon{width:12px;height:12px}.staff-secondary{background:#fff;color:#666;border:1px solid #dddde5}.staff-attachment-preview{display:flex;align-items:center;gap:8px;margin:8px 0 0;padding:7px;border:1px solid #dddde5;border-radius:8px;font-size:8px}.staff-attachment-preview img{width:40px;height:40px;object-fit:cover;border-radius:5px}.staff-attachment-preview span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.staff-attachment-preview button{border:0;background:none;color:#b52e3c;font-size:18px;cursor:pointer}.staff-empty,.staff-empty-chat{color:#888;text-align:center;font-size:9px;padding:20px}.staff-empty-chat{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}.staff-empty-chat .icon{width:25px;height:25px;color:#8a61db}.staff-empty-chat b{font-size:10px;color:#666}.staff-empty-chat span{font-size:8px}
.dark .staff-support-modal{background:#17171d;color:#eee;border-color:#34343e}.dark .staff-support-head,.dark .staff-chat-tabs,.dark .staff-people,.dark .staff-chat-toolbar,.dark .staff-compose,.dark .staff-support-footer{border-color:#30303a}.dark .staff-support-head p,.dark .staff-person small,.dark .staff-compose-hint,.dark .staff-support-footer>span{color:#aaa}.dark .staff-search,.dark .staff-compose textarea,.dark .staff-attach-btn,.dark .staff-secondary{background:#202027;border-color:#3b3b46;color:#eee}.dark .staff-person:hover,.dark .staff-person.selected{background:#292238;border-color:#47366b}.dark .staff-messages{background:#111217}.dark .staff-msg{background:#202027;border-color:#383842}.dark .staff-msg.mine{background:#7135e7;border-color:#7135e7;color:#fff}.dark .staff-secure{background:#282036;border-color:#46356b;color:#d7c7ff}.dark .staff-empty-chat b{color:#ddd}.dark .staff-empty-chat{color:#aaa}
@media(max-width:760px){.staff-support-modal{height:94vh}.staff-support-close{right:12px;top:10px}.staff-support-head{padding:20px 52px 16px 18px}.staff-support-grid{grid-template-columns:1fr}.staff-people{display:none}.staff-chat-tabs{padding-left:12px}.staff-support-head{padding:20px 18px}.staff-online{display:none}.staff-msg{max-width:88%}}

.staff-retention-label{margin:6px 0 0!important;color:#6b35d4!important;font-weight:700}
.staff-typing{padding:4px 18px;font-size:10px;color:#6b35d4}
.staff-reply-bar,.staff-file-bar,.staff-link-bar{display:flex;gap:8px;align-items:center;padding:8px 16px;background:#f4f0ff;border-top:1px solid #e8e0ff;font-size:10px;flex-wrap:wrap}
.staff-reply-bar[hidden],.staff-file-bar[hidden],.staff-link-bar[hidden],.staff-mention-menu[hidden],.staff-typing[hidden]{display:none}
.staff-link-bar input,.staff-link-bar select{height:32px;border:1px solid #dddde5;border-radius:8px;padding:0 8px;font-size:10px;background:#fff}
.staff-mention-menu{position:absolute;left:18px;bottom:118px;z-index:3;background:#fff;border:1px solid #e1d5ff;border-radius:10px;box-shadow:0 12px 30px rgba(80,40,160,.15);min-width:220px;overflow:hidden}
.staff-mention-menu button{display:block;width:100%;text-align:left;border:0;background:#fff;padding:8px 12px;font-size:10px;cursor:pointer}
.staff-mention-menu button:hover{background:#f4f0ff}
.staff-mention{background:#ede7ff;color:#5b21b6;border-radius:4px;padding:0 3px;font-weight:700}
.staff-internal-link{border:0;background:#ede7ff;color:#5b21b6;border-radius:6px;padding:2px 6px;font-weight:700;cursor:pointer}
.staff-attach-image img{max-width:240px;max-height:180px;border-radius:8px;display:block;margin-top:8px}
.staff-attach-file{display:inline-block;margin-top:6px;color:inherit}
.staff-pinned{background:#fff8e8;border:1px solid #f1d48a;border-radius:10px;padding:8px 10px;margin-bottom:10px;font-size:10px}
.staff-msg-acts{display:flex;gap:4px;margin-top:6px;opacity:.55}
.staff-msg:hover .staff-msg-acts{opacity:1}
.staff-msg-act{border:0;background:transparent;cursor:pointer;font-size:12px}
.staff-unread{min-width:16px;height:16px;border-radius:8px;background:#7135e7;color:#fff;font-size:8px;font-weight:800;display:grid;place-items:center}
.staff-chat-panel{position:relative}
.chat-button{position:relative}
.chat-button b{position:absolute;top:2px;right:1px;min-width:14px;height:14px;padding:0 3px;border-radius:9px;background:#ee4050;color:#fff;font-size:8px;line-height:14px;text-align:center}
.dark .staff-reply-bar,.dark .staff-file-bar,.dark .staff-link-bar,.dark .staff-mention-menu{background:#241c33;border-color:#46356b;color:#eee}
.dark .staff-link-bar input,.dark .staff-link-bar select,.dark .staff-mention-menu button{background:#202027;color:#eee;border-color:#3b3b46}

/* Chat room: independent scrolls + visible compose tools */
.staff-support-overlay{align-items:center}
.staff-support-modal{
  width:min(1200px,96vw)!important;
  height:min(90vh,920px)!important;
  max-height:90vh!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
.staff-support-head{flex:0 0 auto}
.staff-chat-tabs{flex:0 0 auto}
.staff-support-footer{flex:0 0 auto}
.staff-support-grid{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:hidden!important;
  grid-template-columns:300px 1fr!important;
}
.staff-people{
  display:flex!important;
  flex-direction:column!important;
  min-height:0!important;
  overflow:hidden!important;
  padding:12px 10px 0!important;
}
.staff-people-list{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding:4px 4px 16px;
}
.staff-person{
  font-size:12px!important;
}
.staff-person b{font-size:12px!important}
.staff-person small{font-size:10px!important;color:#666!important}
.staff-avatar{width:38px!important;height:38px!important;flex-basis:38px!important;font-size:12px!important}
.staff-chat-panel{
  min-width:0!important;
  min-height:0!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
  position:relative!important;
}
.staff-chat-toolbar{flex:0 0 auto}
.staff-typing{flex:0 0 auto}
.staff-messages{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding:10px 12px!important;
  background:#fff!important;
}
.staff-avatar{
  overflow:hidden;
}
.staff-avatar img,
.staff-msg-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  border-radius:50%;
}
.staff-avatar.has-photo{
  padding:0;
  background:transparent!important;
}
.staff-msg-row{
  display:flex;
  align-items:flex-end;
  gap:8px;
  margin-bottom:8px;
  max-width:86%;
  width:fit-content;
}
.staff-msg-row.theirs{margin-right:auto}
.staff-msg-row .staff-msg.mine{margin-left:0!important}
.staff-msg-avatar{
  width:32px!important;
  height:32px!important;
  flex:0 0 32px!important;
  font-size:10px!important;
}
.staff-msg{
  max-width:100%!important;
  width:fit-content;
  font-size:13px!important;
  line-height:1.35!important;
  padding:6px 9px 7px!important;
  border-radius:8px!important;
  margin-bottom:0!important;
  background:#f4f4f8;
}
.staff-msg p{
  margin:0!important;
  font-size:13px!important;
  line-height:1.35!important;
  font-weight:400!important;
}
.staff-msg-meta{
  display:flex;
  gap:5px;
  font-size:10px!important;
  opacity:.72!important;
  margin-bottom:2px!important;
}
.staff-reply-quote{
  font-size:11px!important;
  line-height:1.3!important;
  padding:4px 7px!important;
  margin:0 0 4px!important;
  border-left:3px solid #25d366;
  border-radius:4px;
  background:rgba(0,0,0,.05);
}
.staff-msg.mine .staff-reply-quote{border-left-color:#fff;background:rgba(0,0,0,.12)}
.staff-msg-acts{margin-top:2px!important;gap:2px!important}
.staff-msg-foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-top:4px;
}
.staff-seen{
  font-size:9px;
  font-weight:800;
  letter-spacing:.02em;
  opacity:.78;
  margin-left:auto;
  white-space:nowrap;
}
.staff-seen--sent{font-weight:600;opacity:.55}
.staff-msg.mine .staff-seen{color:rgba(255,255,255,.92)}
.staff-msg-act{font-size:11px!important;padding:0 2px}
.staff-msg img{max-width:180px!important;max-height:140px!important;margin-top:4px!important;border-radius:6px!important}
.staff-attach-file{font-size:12px!important}
.staff-mention,.staff-internal-link{font-size:12px!important;padding:0 3px!important}
.staff-msg.mine .staff-internal-link,.staff-msg.mine .staff-mention{background:rgba(255,255,255,.22);color:#fff}
.staff-reply-bar,.staff-file-bar,.staff-link-bar,.staff-compose,.staff-support-footer{flex:0 0 auto}
.staff-file-bar{
  display:flex!important;
  align-items:center;
  gap:10px;
  padding:10px 16px!important;
  background:#eef7ff!important;
  border-top:1px solid #cfe3f7!important;
}
.staff-file-bar[hidden]{display:none!important}
.staff-file-bar img{width:48px;height:48px;object-fit:cover;border-radius:8px}
.staff-file-bar span{display:flex;flex-direction:column;min-width:0}
.staff-file-bar b{font-size:12px}
.staff-file-bar small{font-size:10px;color:#667}
.staff-link-bar{
  display:grid!important;
  grid-template-columns:140px minmax(160px,1.2fr) minmax(140px,1fr) minmax(120px,.8fr) auto;
  gap:8px;
  padding:10px 16px!important;
  background:#f4f0ff!important;
  align-items:center;
}
.staff-link-bar[hidden]{display:none!important}
.staff-link-bar input,.staff-link-bar select{
  height:36px!important;
  font-size:12px!important;
  width:100%;
  box-sizing:border-box;
}
.staff-compose textarea{min-height:42px!important;max-height:96px;font-size:13px!important;line-height:1.35!important;padding:8px 10px!important}
.staff-compose-bottom{flex-wrap:wrap;gap:6px}
.staff-attach-btn,.staff-send,.staff-secondary{
  font-size:11px!important;
  padding:7px 10px!important;
  min-height:32px;
}
.staff-compose-hint{font-size:10px!important;color:#555!important}
.staff-internal-link{font-size:12px;text-decoration:underline}
@media(max-width:900px){
  .staff-support-grid{grid-template-columns:1fr!important}
  .staff-people{max-height:34%;display:flex!important}
  .staff-link-bar{grid-template-columns:1fr 1fr}
}

/* Dark mode — chat room, thread, and send bar */
body.dark .staff-support-overlay,
.dark .staff-support-overlay{background:rgba(6,6,14,.78)}
body.dark .staff-support-modal,
.dark .staff-support-modal{
  background:#16161e!important;
  color:#e9e9f2!important;
  border-color:#323240!important;
}
body.dark .staff-support-close,
.dark .staff-support-close{color:#e9e9f2}
body.dark .staff-support-head,
body.dark .staff-chat-tabs,
body.dark .staff-people,
body.dark .staff-chat-toolbar,
body.dark .staff-compose,
body.dark .staff-support-footer,
body.dark .staff-reply-bar,
body.dark .staff-file-bar,
body.dark .staff-link-bar,
.dark .staff-support-head,
.dark .staff-chat-tabs,
.dark .staff-people,
.dark .staff-chat-toolbar,
.dark .staff-compose,
.dark .staff-support-footer{
  border-color:#323240!important;
}
body.dark .staff-support-head p,
body.dark .staff-person small,
body.dark .staff-chat-title small,
body.dark .staff-compose-hint,
body.dark .staff-support-footer>span,
body.dark .staff-empty,
body.dark .staff-empty-chat,
.dark .staff-support-head p,
.dark .staff-person small,
.dark .staff-chat-title small,
.dark .staff-compose-hint,
.dark .staff-support-footer>span,
.dark .staff-empty,
.dark .staff-empty-chat{
  color:#b3b3c2!important;
}
body.dark .staff-empty-chat b,
.dark .staff-empty-chat b{color:#eee!important}
body.dark .staff-chat-tabs button,
.dark .staff-chat-tabs button{color:#9a9aab}
body.dark .staff-chat-tabs button.active,
.dark .staff-chat-tabs button.active{color:#c4b5fd;border-bottom-color:#a78bfa}
body.dark .staff-search,
body.dark .staff-compose textarea,
body.dark .staff-attach-btn,
body.dark .staff-secondary,
body.dark .staff-link-bar input,
body.dark .staff-link-bar select,
.dark .staff-search,
.dark .staff-compose textarea,
.dark .staff-attach-btn,
.dark .staff-secondary,
.dark .staff-link-bar input,
.dark .staff-link-bar select{
  background:#1e1e28!important;
  border-color:#3c3c4a!important;
  color:#eee!important;
}
body.dark .staff-compose textarea::placeholder,
.dark .staff-compose textarea::placeholder{color:#8b8b9c}
body.dark .staff-person:hover,
body.dark .staff-person.selected,
.dark .staff-person:hover,
.dark .staff-person.selected{
  background:#2a2238!important;
  border-color:#4b3a6e!important;
}
body.dark .staff-avatar,
.dark .staff-avatar{background:#2f2650!important;color:#c4b5fd!important}
body.dark .staff-messages,
.dark .staff-messages{background:#121218!important}
body.dark .staff-msg,
.dark .staff-msg{
  background:#22222c!important;
  border-color:#3a3a48!important;
  color:#e9e9f2!important;
}
body.dark .staff-msg.mine,
.dark .staff-msg.mine{
  background:#6d32e3!important;
  border-color:#6d32e3!important;
  color:#fff!important;
}
body.dark .staff-msg-meta,
.dark .staff-msg-meta{color:inherit;opacity:.8}
body.dark .staff-reply-quote,
.dark .staff-reply-quote{background:rgba(255,255,255,.06);color:#cfcfe0}
body.dark .staff-msg.mine .staff-reply-quote,
.dark .staff-msg.mine .staff-reply-quote{background:rgba(0,0,0,.18);color:#f3e8ff}
body.dark .staff-pinned,
.dark .staff-pinned{background:#2a2414!important;border-color:#6b5420!important;color:#f5e6b8!important}
body.dark .staff-reply-bar,
body.dark .staff-file-bar,
body.dark .staff-link-bar,
body.dark .staff-mention-menu,
.dark .staff-reply-bar,
.dark .staff-file-bar,
.dark .staff-link-bar,
.dark .staff-mention-menu{
  background:#1c1a28!important;
  border-color:#3d3558!important;
  color:#eee!important;
}
body.dark .staff-file-bar small,
.dark .staff-file-bar small{color:#9aa0b3!important}
body.dark .staff-mention-menu button,
.dark .staff-mention-menu button{background:#1c1a28!important;color:#eee!important}
body.dark .staff-mention-menu button:hover,
.dark .staff-mention-menu button:hover{background:#2a2238!important}
body.dark .staff-mention,
body.dark .staff-internal-link,
.dark .staff-mention,
.dark .staff-internal-link{background:#3b2d66!important;color:#ddd6fe!important}
body.dark .staff-msg.mine .staff-mention,
body.dark .staff-msg.mine .staff-internal-link,
.dark .staff-msg.mine .staff-mention,
.dark .staff-msg.mine .staff-internal-link{background:rgba(255,255,255,.2)!important;color:#fff!important}
body.dark .staff-secure,
.dark .staff-secure{background:#2a203c!important;border-color:#4b3a6e!important;color:#d7c7ff!important}
body.dark .staff-online,
.dark .staff-online{background:#163322!important;border-color:#2f6b45!important;color:#86efac!important}
body.dark .staff-typing,
body.dark .staff-retention-label,
.dark .staff-typing,
.dark .staff-retention-label{color:#c4b5fd!important}
body.dark .staff-msg.mine .staff-seen,
.dark .staff-msg.mine .staff-seen{color:rgba(255,255,255,.9)}
body.dark .staff-seen--sent,
.dark .staff-seen--sent{color:#9a9aab}
body.dark .staff-attach-image img,
.dark .staff-attach-image img{border:1px solid #3a3a48}
