:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #202735; background: #f5f6fa; font-size: 14px; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 1px solid transparent; border-radius: 8px; padding: 9px 13px; font-weight: 600; background: var(--button-bg, white); color: var(--button-text, inherit); }
button:hover { background: var(--button-hover, #f0f2f7); }
button:disabled { opacity: .48; cursor: not-allowed; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #9aabf7; outline-offset: 2px; }
input, select, textarea { width: 100%; min-width: 0; background: white; color: inherit; border: 1px solid #d5dae4; border-radius: 8px; padding: 10px 11px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #abb8f7; outline-offset: 1px; border-color: #667edb; }
label { display: block; font-size: 12px; font-weight: 600; margin: 14px 0 6px; }
textarea { resize: vertical; min-height: 82px; max-height: 220px; line-height: 1.6; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 23px; letter-spacing: -.5px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
.primary { background: #4a5bd4; color: white; }
.primary:hover { background: #3b4bb9; }
.secondary { background: white; border-color: #dce1ea; }
.text-button { color: #5263b9; background: transparent; padding: 6px 8px; }
.wide { width: 100%; margin-top: 18px; }
.muted { color: #727c8d; font-size: 12px; line-height: 1.6; }
.eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; color: #8790a3; margin-bottom: 5px; }
.wordmark { display: inline-flex; gap: 10px; align-items: center; font-size: 19px; font-weight: 700; letter-spacing: -.5px; }
.brand-mark { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #008f85; color: white; font-size: 20px; font-weight: 800; flex-shrink: 0; }
.brand-mark svg { width: 22px; height: 22px; fill: currentColor; }
.local-badge { display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: 1px; border: 1px solid #d9deeb; border-radius: 5px; padding: 5px 7px; color: #727c8d; white-space: nowrap; }
.avatar { position: relative; overflow: hidden; flex-shrink: 0; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #edf0ff; color: #5362b4; font-weight: 700; font-size: 12px; }
.avatar > img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.avatar.small { width: 29px; height: 29px; border-radius: 50%; font-size: 10px; }
.avatar.large { width: 60px; height: 60px; border-radius: 20px; font-size: 20px; margin-bottom: 10px; }
.error { color: #9e2836; background: #fff0f1; font-size: 12px; line-height: 1.5; padding: 10px 14px; overflow-wrap: anywhere; }
.error:empty { display: none; }
.global-alerts { position: fixed; top: 0; left: 60px; right: 0; z-index: 20; pointer-events: none; }
.global-alerts .error { pointer-events: auto; }
.login-screen { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at top, #e6eaff, transparent 65%); }
.login-card { width: min(440px, 100%); background: white; border: 1px solid #e1e5ef; border-radius: 20px; padding: 38px; box-shadow: 0 20px 70px #2633610d; }
.login-card > .eyebrow { margin-top: 35px; }
.login-card h1 { margin: 8px 0 10px; font-size: 27px; }
.login-card form { margin-top: 25px; }
.local-notice { margin-top: 24px; padding-top: 18px; border-top: 1px solid #eef0f5; color: #939aa9; font-size: 11px; line-height: 1.6; }
.workspace { display: grid; grid-template-columns: 60px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100dvh; overflow: hidden; }
.navigation { display: flex; flex-direction: column; align-items: center; gap: 12px; min-height: 0; overflow-y: auto; background: #212638; color: #a4afc7; padding: 20px 8px 16px; }
.navigation > .brand-mark { margin-bottom: 18px; }
.nav-item { width: 44px; display: flex; flex-direction: column; align-items: center; gap: 5px; position: relative; font-size: 9px; font-weight: 500; background: transparent; color: #a4afc7; border-radius: 8px; padding: 10px 2px; }
.nav-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-symbol { font-size: 13px; letter-spacing: 1px; font-weight: 700; }
.nav-item:hover { background: #30374e; }
.nav-item.selected { color: white; background: #39425d; }
.nav-count { position: absolute; right: 3px; top: 2px; font-size: 9px; background: #4e5e91; border-radius: 6px; padding: 2px 4px; min-width: 15px; }
.nav-spacer { flex: 1; }
.navigation .local-badge { color: #9daac7; border-color: #46506a; font-size: 8px; }
.agent-profile { flex-shrink: 0; }
.agent-profile > summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; position: relative; }
.agent-profile > summary::-webkit-details-marker { display: none; }
.agent-profile > summary:hover, .agent-profile[open] > summary { background: #343741; }
.agent-profile > summary::after { content: ""; position: absolute; right: 3px; bottom: 3px; width: 9px; height: 9px; border: 2px solid #15161b; border-radius: 50%; background: #a3aab6; }
.agent-profile > summary.accepting::after { background: #3eaa76; }
.profile-menu { position: fixed; left: 68px; bottom: 16px; width: min(288px, calc(100vw - 80px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 16px; background: #fff; color: #3d4149; color-scheme: light; border: 1px solid #e1e2e6; border-radius: 6px; z-index: 18; box-shadow: 0 8px 28px #0004; text-align: left; }
.profile-menu header { display: grid; gap: 5px; padding-bottom: 14px; border-bottom: 1px solid #e8e8ec; margin-bottom: 12px; }
.profile-menu header strong { font-size: 13px; overflow-wrap: anywhere; }
.profile-environment, .profile-hint { font-size: 10px; color: #696d76; line-height: 1.6; }
.profile-hint { margin: 6px 0 12px; }
.agent-page .profile-menu > button { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px; font-size: 12px; font-weight: 400; text-align: left; white-space: normal; background: transparent; color: #3d4149; border-color: transparent; }
.agent-page .profile-menu > button:hover { background: #f1f2f5; }
.agent-page .profile-menu .routing-button.accepting { background: transparent; color: #3d4149; }
.agent-page .profile-menu .routing-button.accepting:hover { background: #f1f2f5; }
.profile-menu .theme-toggle::after { content: ""; width: 30px; height: 18px; margin-left: 12px; flex-shrink: 0; border-radius: 10px; background: radial-gradient(circle at 9px 9px, #fff 6px, transparent 7px), #8a8e97; }
.profile-menu .theme-toggle[aria-checked="true"]::after { background: radial-gradient(circle at 21px 9px, #fff 6px, transparent 7px), #39864c; }
.theme-info { margin-left: 3px; font-size: 13px; }
.profile-menu .routing-button::before { display: none; }
.profile-menu .routing-button::after { content: ""; width: 30px; height: 18px; margin-left: 12px; flex-shrink: 0; border-radius: 10px; background: radial-gradient(circle at 9px 9px, #e7e9ef 6px, transparent 7px), #606575; }
.profile-menu .routing-button.accepting::after { background: radial-gradient(circle at 21px 9px, #fff 6px, transparent 7px), #328566; }
.profile-menu .detail-disclosure { margin-top: 10px; padding-top: 12px; }
.agent-page .profile-menu .detail-disclosure { border-color: #e8e8ec; }
.agent-page .profile-menu :is(.detail-disclosure summary, .muted) { color: #696d76; }
.agent-page .profile-menu .profile-logout { margin-top: 14px; border-top: 1px solid #e8e8ec; border-radius: 0; }
.workspace-main { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; }
.workspace-header { background: #000; color: #e7e9ef; padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid #000; }
.routing-button { border-color: #e0e4eb; color: #6d7482; background: #f7f8fa; }
.routing-button::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #a3aab6; margin-right: 7px; }
.routing-button.accepting { background: #f0faf5; color: #277554; border-color: #d3ecdf; }
.routing-button.accepting::before { background: #3eaa76; }
.workspace-notice { text-align: center; background: #faf8f1; border-bottom: 1px solid #eee9dc; padding: 5px 10px; font-size: 10px; color: #968970; }
.conversation-workspace { display: grid; grid-template-columns: 320px minmax(0, 1fr) 300px; overflow: hidden; min-height: 0; position: relative; }
.inbox-panel { background: #fafbfe; border-right: 1px solid #e2e6ef; display: flex; flex-direction: column; min-height: 0; padding: 0; }
.inbox-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.inbox-heading { min-height: 56px; padding: 10px 16px; border-bottom: 1px solid var(--edge); }
.inbox-heading h2 { font-size: 18px; flex: 1; }
.chat-scope { position: relative; flex: 1; }
.chat-scope summary { display: flex; align-items: center; gap: 8px; width: fit-content; cursor: pointer; list-style: none; }
.chat-scope summary::-webkit-details-marker { display: none; }
.chat-scope svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.chat-scope-options { position: absolute; top: calc(100% + 12px); left: 0; min-width: 190px; padding: 6px; background: #30333d; border: 1px solid #4a4f5f; border-radius: 8px; z-index: 12; box-shadow: 0 8px 24px #0005; }
.chat-scope-options button { display: block; width: 100%; text-align: left; padding: 10px; color: #dfe3ee; background: transparent; }
.chat-scope-options button:hover { background: #414551; }
.counter { background: #e9edf6; border-radius: 6px; padding: 3px 7px; font-size: 11px; color: #69758e; }
.inbox-tabs { display: flex; border-bottom: 1px solid var(--edge); flex-shrink: 0; }
.inbox-tab { display: flex; align-items: center; justify-content: center; gap: 6px; flex: 1; min-height: 40px; padding: 8px; border-radius: 0; border-bottom: 2px solid transparent; background: transparent; color: #adb7cb; font-size: 12px; }
.inbox-tab:hover { background: #343741; }
.inbox-tab.selected { border-bottom-color: #a7b9ff; color: #fff; background: #30333d; }
.waiting-count { min-width: 16px; padding: 2px 4px; border-radius: 8px; font-size: 10px; line-height: 12px; background: #e1be72; color: #282b35; }
.waiting-count.my-chats-count { background: #78c99e; }
#search { font-size: 12px; background: white; }
.segmented { display: flex; padding: 3px; border: 1px solid #e3e7ef; background: #eff2f8; border-radius: 8px; gap: 2px; }
.segmented button { flex: 1; padding: 7px 3px; background: transparent; font-size: 11px; color: #727d92; }
.segmented button.selected { background: white; color: #4d5ba1; box-shadow: 0 1px 3px #202a4510; }
.segmented span { font-size: 10px; }
.inbox-filters { position: relative; font-size: 11px; color: #adb7cb; }
.inbox-filters summary { cursor: pointer; display: grid; place-items: center; width: 36px; height: 36px; list-style: none; border-radius: 6px; }
.inbox-filters summary::-webkit-details-marker { display: none; }
.inbox-filters summary:hover { background: #343741; }
.inbox-filters svg, .workspace-header svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.inbox-filter-options { position: absolute; top: calc(100% + 6px); right: 0; width: min(280px, calc(100vw - 88px)); padding: 16px; max-height: calc(100dvh - 160px); overflow-y: auto; background: #30333d; border: 1px solid #4a4f5f; border-radius: 8px; z-index: 12; box-shadow: 0 8px 24px #0005; }
.inbox-filters label { margin-top: 10px; }
.inbox-filters select { font-size: 12px; }
.chat-list { flex: 1; min-height: 0; overflow-y: auto; }
.inbox-page-scope { padding: 8px 14px 0; font-size: 9px; color: #9299a8; }
.inbox-section-heading { padding: 12px 16px; margin: 0; font-size: 13px; font-weight: 600; color: #7280aa; cursor: pointer; }
.chat-card { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; border: 0; border-left: 3px solid transparent; border-bottom: 1px solid #edf0f6; border-radius: 0; padding: 12px; background: transparent; }
.chat-card { position: relative; }
.chat-select { display: flex; align-items: flex-start; gap: 12px; width: 100%; min-width: 0; padding: 0; text-align: left; color: inherit; background: transparent; }
.chat-select:hover { background: transparent; }
.chat-card.can-close .chat-card-title { padding-right: 24px; }
.chat-card-close { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; padding: 2px; background: #30333d; color: #dfe3ee; opacity: 0; }
.chat-card-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.chat-card-close:hover { background: #454b5c; color: #fff; }
.chat-card:hover .chat-card-close, .chat-card:focus-within .chat-card-close { opacity: 1; }
@media (hover: none) { .chat-card-close { opacity: 1; } }
.chat-card .avatar { width: 32px; height: 32px; border-radius: 50%; }
.chat-card:hover { background: #f0f3fb; }
.chat-card.selected { background: #edf0ff; border-left-color: #6c7be5; }
.chat-card.unread .chat-card-title strong::after { content: ""; display: inline-block; margin-left: 7px; width: 6px; height: 6px; background: #596bdf; border-radius: 50%; }
.chat-card-content { min-width: 0; flex: 1; display: grid; gap: 5px; }
.chat-card-title { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.chat-card-title strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-card-title time { font-size: 10px; font-weight: 400; color: #9299a8; flex-shrink: 0; }
.chat-card-meta { display: flex; align-items: center; gap: 6px; font-size: 10px; color: #7a8497; font-weight: 400; flex-wrap: wrap; }
.group-identity { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.group-identity-logo { width: 18px; height: 18px; object-fit: contain; flex: 0 0 auto; border-radius: 3px; }
.chat-card-brand { color: #7a8497; font-size: 10px; overflow: hidden; }
.chat-preview { color: #6e788c; font-size: 12px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-owner { font-size: 10px; color: #96a0b2; font-weight: 400; }
.list-empty { text-align: center; padding: 25px 10px; font-size: 12px; color: #929bad; }
.inbox-progress { border-top: 1px solid #e5e9f1; padding: 10px; text-align: center; }
.inbox-progress span { color: #8a94a5; font-size: 10px; white-space: nowrap; }
.chat-panel { background: white; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.empty-state { margin: auto; text-align: center; padding: 35px; max-width: 400px; }
.empty-icon { display: inline-grid; place-items: center; width: 70px; height: 70px; background: #eff1fb; color: #7a88c3; border-radius: 24px 24px 24px 6px; margin-bottom: 24px; font-size: 19px; font-weight: 700; }
.empty-state h2 { font-size: 20px; letter-spacing: -.5px; margin-bottom: 12px; }
.empty-state p { line-height: 1.8; color: #858fa1; margin-bottom: 16px; font-size: 12px; }
.chat-content { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.conversation-header { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 16px; border-bottom: 1px solid #edf0f5; flex-shrink: 0; }
.conversation-heading { min-width: 0; flex: 1; }
.conversation-heading h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; }
.conversation-heading p { font-size: 10px; margin-top: 4px; }
.conversation-actions { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.supervise-actions { position: relative; }
.supervise-actions summary { cursor: pointer; list-style: none; }
.supervise-actions summary::-webkit-details-marker { display: none; }
.supervise-actions-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 12; min-width: 175px; padding: 6px; background: #30333d; border: 1px solid #4a4f5f; border-radius: 8px; box-shadow: 0 8px 24px #0005; }
.supervise-actions-menu button { width: 100%; text-align: left; background: transparent; color: #e1e5ef; }
.supervise-actions-menu button:hover { background: #454b5c; }
.conversation-actions button { font-size: 10px; padding: 7px 9px; }
.conversation-direct-actions { display: flex; align-items: center; gap: 5px; }
.conversation-direct-actions .agent-icon-button { width: 36px; height: 36px; padding: 7px; }
.composer-mode { position: relative; }
.composer-mode summary { display: flex; align-items: center; justify-content: center; cursor: pointer; list-style: none; border-radius: 6px; }
.composer-mode summary:hover { background: #343741; }
.composer-mode summary::-webkit-details-marker { display: none; }
.agent-icon-button svg, .composer-mode svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.composer-mode-options { position: absolute; min-width: 185px; padding: 6px; background: #30333d; border: 1px solid #4a4f5f; border-radius: 8px; z-index: 12; box-shadow: 0 8px 24px #0005; }
.composer-mode-options button { display: block; width: 100%; text-align: left; background: transparent; color: #e1e5ef; padding: 10px; }
.composer-mode-options button:hover { background: #454b5c; }
.composer-mode-options { left: 0; bottom: calc(100% + 6px); }
.composer-mode summary { gap: 5px; padding: 8px; font-size: 11px; }
.composer-mode svg { width: 14px; height: 14px; }
.agent-composer-tools { display: flex; align-items: center; gap: 6px; }
.agent-icon-button { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 7px; flex-shrink: 0; background: transparent; color: #adb7cb; }
.agent-icon-button:hover { background: #343741; }
.agent-image-preview { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 6px 10px; border: 1px solid #4a4f5f; border-radius: 8px; }
.agent-image-preview img { width: 56px; height: 56px; flex-shrink: 0; object-fit: contain; border-radius: 6px; background: #1e2027; }
.composer-area.dragging { outline: 2px dashed #a7b9ff; outline-offset: -4px; background: #303b54; }
.transfer-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; border: 1px solid #4a4f5f; border-radius: 12px; padding: 20px; background: #24252c; color: #e7e9ef; }
.transfer-dialog::backdrop { background: #0009; }
.transfer-dialog .secondary { color: #202735; }
.transfer-dialog header, .transfer-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.transfer-dialog header { margin-bottom: 18px; }
.transfer-dialog footer { justify-content: flex-end; margin-top: 18px; }
.transfer-dialog select { margin-bottom: 12px; }
.messages { flex: 1; overflow-y: auto; overflow-x: hidden; overflow-anchor: none; min-height: 80px; padding: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; background: #fdfdff; scroll-behavior: auto; }
.day-divider { align-self: center; font-size: 10px; color: #a0a8b8; padding: 5px 12px; background: #f3f5fa; border-radius: 20px; margin: 4px 0 10px; }
.thread-divider { align-self: center; flex-shrink: 0; padding: 12px 0; font-size: 11px; text-align: center; opacity: .65; }
.history-load { align-self: center; flex-shrink: 0; background: transparent; border-color: currentColor; font-size: 12px; }
.thread-activity { align-self: stretch; flex-shrink: 0; font-size: 11px; color: var(--view-muted, #727c8d); }
.thread-activity summary { cursor: pointer; width: fit-content; padding: 6px 0; }
.activity-list { display: grid; gap: 8px; list-style: none; padding: 8px 0; margin: 0; }
.activity-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.activity-list time { font-size: 10px; white-space: nowrap; }
.activity-private span { border-left: 2px solid currentColor; padding-left: 8px; }
.message { max-width: 88%; background: #f0f2f7; padding: 11px 13px; border-radius: 12px 12px 12px 3px; font-size: 12px; line-height: 1.65; }
.message.outgoing { align-self: flex-end; background: #edf0ff; border-radius: 12px 12px 3px 12px; }
.message.continuation { margin-top: -6px; }
.message.continuation .message-meta { margin: 0; }
.message.private { align-self: stretch; max-width: 100%; background: #fff5d6; border: 1px solid #f3e5b4; border-radius: 9px; }
.message.legacy { border: 1px dashed #cbd2e0; background: #f7f8fb; }
.message.system { align-self: center; max-width: 95%; background: transparent; color: #8e97a7; text-align: center; font-size: 10px; padding: 3px 6px; }
.message.system .message-meta strong { display: none; }
.message-meta { display: flex; gap: 20px; justify-content: space-between; align-items: baseline; color: #7e899e; font-size: 10px; margin-bottom: 5px; }
.message-meta strong { font-weight: 600; }
.message-meta time { white-space: nowrap; font-size: 9px; }
.message-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.message { position: relative; }
.message-link, .document-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.message-link:hover, .document-link:hover { text-decoration-thickness: 2px; }
.document-link { display: inline-block; padding: 10px 0; }
.message-receipt { order: 4; align-self: flex-end; font-size: 10px; opacity: .8; }
.message-receipt:empty, .typing-status:empty, #realtime-status:empty { display: none; }
.message-reactions { display: flex; flex-wrap: wrap; gap: 4px; order: 3; }
.message-reactions:empty { display: none; }
.reaction-pill { background: var(--surface, #fff); color: var(--view-text, #28334b); border: 1px solid var(--edge, #dce1ea); padding: 2px 7px; border-radius: 12px; font-size: 12px; }
.reaction-pill[aria-pressed="true"] { border-color: #426cf5; box-shadow: inset 0 0 0 1px #426cf5; }
.reaction-pill:disabled { opacity: 1; cursor: default; }
.reaction-picker { position: absolute; right: 0; top: -19px; z-index: 1; opacity: 0; }
.reaction-picker summary { list-style: none; cursor: pointer; border-radius: 50%; background: var(--surface, #fff); color: var(--view-text, #28334b); border: 1px solid var(--edge, #dce1ea); padding: 1px 5px; line-height: 20px; }
.reaction-picker summary::-webkit-details-marker { display: none; }
.message:hover .reaction-picker, .message:focus-within .reaction-picker, .reaction-picker[open] { opacity: 1; }
.reaction-choices { position: absolute; right: 0; top: 26px; display: flex; padding: 4px; border-radius: 12px; box-shadow: 0 4px 20px #0003; background: var(--surface, #fff); border: 1px solid var(--edge, #dce1ea); }
.reaction-choices button { font-size: 19px; padding: 4px; background: transparent; }
.typing-status { margin: 0; flex-shrink: 0; padding: 6px 20px; color: var(--view-muted, #6d7788); font-size: 12px; min-height: 28px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 7em; overflow-y: auto; }
.emoji-toggle { font-size: 25px; line-height: 1; font-weight: 400; }
.emoji-dialog { width: min(320px, calc(100vw - 32px)); padding: 18px; border: 1px solid var(--edge, #dce1ea); border-radius: 14px; background: var(--surface, #fff); color: var(--view-text, #28334b); }
.emoji-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 12px 0; }
.emoji-grid button { background: transparent; padding: 5px; font-size: 24px; border-radius: 7px; }
.emoji-grid button:hover, .reaction-choices button:hover { background: var(--view-hover, #edf0f7); }
.emoji-dialog::backdrop { background: #0004; }
.image-viewer { width: min(1100px, 96vw); max-width: 96vw; height: min(850px, 94dvh); max-height: 94dvh; padding: 50px 20px; border: 0; border-radius: 12px; background: #17191f; color: #fff; }
.image-viewer[open] { display: flex; align-items: center; justify-content: center; }
.image-viewer::backdrop { background: #000b; }
.image-viewer > img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-close, .viewer-download { position: absolute; color: #fff; background: #30343e; border-radius: 6px; padding: 8px 12px; font-size: 13px; }
.viewer-close { top: 10px; right: 12px; }
.viewer-download { bottom: 10px; left: 50%; transform: translateX(-50%); }
.message.system .message-meta { justify-content: center; margin: 0; }
.message.system.internal-system { align-self: stretch; max-width: 100%; text-align: left; border-left: 2px dashed #8994a9; border-radius: 0; padding: 6px 10px; }
.message.system.internal-system .message-meta { justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.message.system.internal-system .message-meta strong { display: inline; }
.chat-image { display: block; max-width: 100%; width: auto; max-height: 260px; border-radius: 7px; margin-top: 6px; }
.image-link { display: block; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
@media (max-height: 500px) {
  .agent-page .messages { min-height: 0; padding: 12px; }
  .agent-page .composer-area { padding: 8px 12px; }
  .agent-page .composer textarea { height: 42px; min-height: 42px; max-height: 42px; resize: none; }
  .agent-page .attachment-status { max-height: 40px; overflow-y: auto; }
}
.composer-area { border-top: 1px solid #edf0f5; padding: 12px 20px; flex-shrink: 0; }
.composer { position: relative; border: 1px solid #dfe4ee; border-radius: 10px; background: white; }
.composer-footer .canned-toggle { font-size: 20px; }
.canned-popup { position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; z-index: 12; padding: 12px; background: #30333d; color: #e7e9ef; border: 1px solid #4a4f5f; border-radius: 8px; box-shadow: 0 8px 24px #0005; }
.canned-list { max-height: 240px; overflow-y: auto; margin-top: 8px; }
.canned-option { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 10px; text-align: left; color: #e7e9ef; background: transparent; }
.canned-option span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
.canned-option:hover, .canned-option.selected { background: #454b5c; }
.canned-popup p { margin-top: 8px; font-size: 11px; color: #bdc5d6; }
.composer textarea { border: 0; border-radius: 0; resize: vertical; padding: 12px 14px; font-size: 12px; min-height: 72px; }
.composer textarea:focus { outline: 0; }
.composer:focus-within { border-color: #9ba9e8; box-shadow: 0 0 0 2px #e9edff; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; }
.composer-footer button { font-size: 11px; }
.composer-footer .muted { font-size: 10px; }
.internal-composer { background: #fffaf0; border-color: #eedba2; }
.internal-composer textarea { background: #fffaf0; }
.internal-composer .composer-mode summary { color: #edd28e; }
.read-only { font-size: 11px; background: #f7f8fc; color: #8791a6; text-align: center; padding: 14px; }
.details-panel { background: #fff; padding: 20px 18px; border-left: 1px solid #e5e9f1; overflow-y: auto; min-width: 0; }
.details-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.details-panel h2 { font-size: 13px; }
.details-panel > p { margin-top: 18px; }
.customer-profile { text-align: center; padding: 26px 0 22px; border-bottom: 1px solid #edf0f6; }
.customer-profile h3 { margin-bottom: 10px; overflow-wrap: anywhere; }
.status-chip { display: inline-block; border-radius: 5px; padding: 3px 6px; font-size: 9px; font-weight: 500; background: #f0f2f8; color: #8994a9; white-space: nowrap; }
.status-chip.active { color: #3d8c6b; background: #edf8f2; }
.status-chip.queued { color: #a58039; background: #fcf4df; }
.status-chip.closed { color: #8690a2; background: #f0f2f6; }
.detail-list { margin: 20px 0; }
.detail-list dt { color: #99a2b3; font-size: 10px; margin: 18px 0 5px; }
.detail-list dd { margin: 0; font-size: 12px; color: #566178; overflow-wrap: anywhere; }
.detail-list .identifier { font-family: ui-monospace, monospace; font-size: 10px; }
.policy-section, .visitor-section { border-top: 1px solid #edf0f6; padding-top: 19px; margin-top: 24px; }
.policy-section h3, .visitor-section h3 { font-size: 11px; margin-bottom: 10px; }
.policy-section p { font-size: 10px; overflow-wrap: anywhere; }
.detail-disclosure { border-top: 1px solid #edf0f6; padding-top: 14px; margin-top: 16px; }
.detail-disclosure summary { cursor: pointer; font-size: 11px; color: #8994a9; }
.detail-disclosure > p { margin-top: 12px; }
.agent-page .team-panel { position: relative; display: flex; overflow: hidden; padding: 0; background: var(--surface); color: var(--view-text); color-scheme: inherit; }
.agent-page .team-open .navigation { background: #141518; border-right-color: #292a2e; }
.team-open .workspace-header > h1 { display: none; }
.team-browser { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.team-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 76px; padding: 22px 24px 12px; flex-shrink: 0; }
.team-heading h2 { margin: 0; font-size: 23px; font-weight: 650; color: var(--view-text); }
.team-tabs { display: flex; overflow-x: auto; flex-shrink: 0; padding: 0 24px; border-bottom: 1px solid var(--edge); gap: 23px; scrollbar-width: thin; }
.team-tabs > button { border: 0; border-radius: 0; padding: 13px 0 15px; background: transparent; color: var(--view-muted); white-space: nowrap; font-size: 13px; border-bottom: 2px solid transparent; }
.team-tabs > button:hover { color: var(--view-text); background: var(--view-hover); }
.team-tabs > button.selected { color: var(--view-link); border-bottom-color: var(--view-link); }
.team-tabs #team-invite-settings { margin-left: auto; }
.team-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 23px 24px 10px; flex-shrink: 0; }
.team-search { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 160px; max-width: 280px; margin: 0; }
.team-search svg { width: 18px; height: 18px; fill: none; stroke: var(--view-muted); stroke-width: 1.8; flex-shrink: 0; }
.agent-page .team-search input { width: 100%; padding: 9px 0; border: 0; border-bottom: 1px solid transparent; background: var(--surface); color: var(--view-text); font-size: 13px; }
.team-search input:focus { outline: none; border-bottom-color: #2672e8; box-shadow: none; }
.team-toolbar-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.agent-page .team-panel .primary { border-radius: 5px; background: #2269dc; color: #fff; padding: 9px 13px; font-size: 12px; }
.agent-page .team-panel .primary:hover { background: #1857ba; }
.team-panel .team-button { border: 1px solid var(--edge); border-radius: 5px; background: var(--surface); color: var(--view-text); padding: 8px 11px; font-size: 12px; }
.team-panel .team-button:hover { background: var(--view-hover); }
.team-table-scroll { overflow: auto; padding: 20px 24px 32px; flex: 1; }
.team-total { font-size: 15px; margin: 0 0 9px; color: var(--view-text); }
.team-panel .team-note { font-size: 11px; color: var(--view-muted); line-height: 1.6; margin: 5px 0 12px; }
.team-table { border-collapse: collapse; width: 100%; min-width: 720px; table-layout: fixed; font-size: 13px; }
.team-table th, .team-table td { text-align: left; border-bottom: 1px solid var(--edge); padding: 14px 8px; }
.team-table th:first-child { width: 70px; }
.team-table th:last-child { width: 86px; }
.team-table th:nth-child(2) { width: 43%; }
.team-table th.team-role-col { width: 16%; }
.team-table th.team-acc-col { width: 30%; }
.team-acc-text, .team-acc-summary, .team-acc-option { display: flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; }
.team-acc-text { color: var(--view-muted); }
.team-acc-dot { flex: 0 0 9px; width: 9px; height: 9px; border-radius: 50%; background: #93949c; }
.team-acc-dot.accepting { background: #008c3c; }
.team-acc-dot.not_accepting { background: #d60000; }
.team-acc-menu { position: relative; }
.team-acc-summary { list-style: none; cursor: pointer; color: var(--view-text); }
.team-acc-summary::-webkit-details-marker { display: none; }
.team-acc-summary::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg); margin: -4px 0 0 1px; }
.team-acc-menu[open] .team-acc-summary::after { transform: rotate(225deg); margin-top: 3px; }
.team-acc-options { position: fixed; z-index: 5; min-width: 180px; padding: 6px 0; border: 1px solid var(--edge); border-radius: 7px; background: var(--surface); box-shadow: 0 5px 16px #0003; }
.team-acc-option { width: 100%; border: 0; background: transparent; color: var(--view-text); text-align: left; padding: 10px 12px; }
.team-acc-option:hover, .team-acc-option:focus-visible { background: var(--view-hover); }
.team-acc-option:last-child { border-top: 1px solid var(--edge); }
.team-table th { font-weight: 400; color: var(--view-muted); padding-top: 8px; padding-bottom: 10px; }
.team-table th button { background: transparent; border: 0; padding: 4px 0; color: var(--view-muted); font-size: 12px; }
.team-table th button:hover { color: var(--view-text); }
.team-table tr.selected { background: var(--view-soft); }
.team-table tbody tr:hover { background: var(--view-hover); }
.team-table tbody tr { cursor: pointer; }
.team-add-symbol { color: var(--view-muted); font-size: 23px; text-align: center !important; }
.team-status-cell { position: relative; }
.team-panel .team-avatar { background: var(--view-soft); color: var(--view-text); width: 33px; height: 33px; font-size: 12px; border-radius: 50%; }
.team-status-dot { position: absolute; width: 10px; height: 10px; left: 33px; top: 39px; border-radius: 50%; border: 2px solid var(--surface); }
.team-status-dot.accepting { background: #25a957; }
.team-status-dot.not-accepting { background: #d60000; }
.team-status-dot.offline { background: #a4a4ae; }
.team-panel .team-name-button { display: block; padding: 0; border: 0; background: transparent; color: var(--view-text); text-align: left; font-size: 13px; font-weight: 550; overflow-wrap: anywhere; }
.team-panel .team-name-button:hover { color: var(--view-link); text-decoration: underline; }
.team-row-sub { display: block; color: var(--view-muted); font-size: 10px; margin-top: 4px; overflow-wrap: anywhere; }
.team-role { display: inline-block; font-size: 11px; padding: 3px 7px; background: var(--view-soft); border-radius: 4px; color: var(--view-muted); }
.team-role-admin { background: var(--view-warning-bg); color: var(--view-warning-text); }
.team-empty { padding: 40px 10px; color: var(--view-muted); font-size: 13px; line-height: 1.7; }
.team-details { width: 320px; flex-shrink: 0; border-left: 1px solid var(--edge); display: flex; flex-direction: column; background: var(--surface); }
.team-details .team-heading { min-height: 76px; padding: 22px 20px; border-bottom: 1px solid var(--edge); }
.team-details .team-heading h2 { font-size: 15px; }
.team-panel .team-icon-button { border: 0; border-radius: 4px; background: transparent; color: var(--view-muted); font-size: 23px; padding: 0 4px; }
.team-panel .team-icon-button:hover { background: var(--view-hover); color: var(--view-text); }
.team-detail-body { overflow-y: auto; flex: 1; }
.team-profile-section { padding: 22px 20px; border-bottom: 1px solid var(--edge); }
.team-profile-heading { display: flex; align-items: flex-start; gap: 11px; position: relative; }
.team-profile-heading > div { min-width: 0; flex: 1; }
.team-profile-heading h3 { font-size: 14px; margin: 0 0 8px; overflow-wrap: anywhere; }
.team-panel .team-detail-avatar { background: var(--view-soft); color: var(--view-text); border-radius: 50%; width: 42px; height: 42px; flex-shrink: 0; }
.team-facts { display: grid; grid-template-columns: 90px 1fr; gap: 14px 9px; font-size: 11px; line-height: 1.6; margin: 22px 0 0; }
.team-facts dt { color: var(--view-muted); }
.team-facts dd { margin: 0; }
.team-actions { position: static; }
.team-actions summary { cursor: pointer; list-style: none; color: var(--view-muted); font-weight: 700; }
.team-actions > div { position: absolute; top: 28px; right: 0; z-index: 3; min-width: 240px; padding: 6px; border-radius: 6px; border: 1px solid var(--edge); box-shadow: 0 4px 20px #0002; background: var(--surface); }
.team-actions button { display: block; padding: 10px 8px; border: 0; width: 100%; background: var(--surface); color: var(--view-text); text-align: left; font-size: 11px; }
.team-actions button:hover { background: var(--view-hover); }
#team-group-disclosure > summary, .team-profile-section > h3 { font-size: 13px; font-weight: 600; margin: 0 0 16px; cursor: pointer; }
.team-detail-groups { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.team-panel .team-group-button { display: flex; align-items: center; gap: 9px; border: 0; background: var(--surface); color: var(--view-text); text-align: left; padding: 3px 0; font-size: 12px; }
.team-panel .team-group-button:hover { color: var(--view-link); }
.team-group-icon { display: inline-grid; place-items: center; width: 27px; height: 27px; border-radius: 5px; background: var(--view-soft); color: var(--view-link); text-transform: uppercase; }
.team-group-logo { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.team-panel .team-report-link { padding: 0; border: 0; background: transparent; color: var(--view-link); text-align: left; font-size: 12px; }
.team-panel .team-report-link:hover { text-decoration: underline; }
@media (max-width: 1000px) {
  .team-panel.has-details .team-toolbar-actions { width: 100%; }
  .team-tabs { gap: 17px; }
}
@media (max-width: 760px) {
  .team-details { position: absolute; inset: 0 0 0 auto; width: min(320px, 100%); z-index: 4; box-shadow: -8px 0 25px #0002; }
  .team-heading, .team-tabs { padding-left: 16px; padding-right: 16px; }
  .team-toolbar, .team-table-scroll { padding-left: 16px; padding-right: 16px; }
}
.workspace-main:has(> .notification-toast:not([hidden])) { grid-template-rows: auto auto minmax(0, 1fr); }
.notification-toast { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; background: #222b46; color: white; padding: 8px 16px; border-bottom: 1px solid var(--edge, #e4e7ef); font-size: 12px; }
#notification-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.notification-toast .text-button { color: #b7c4ff; margin-left: 8px; }
.mobile-only, .compact-only { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.customer-page { min-height: 100dvh; background: radial-gradient(ellipse at top right, #e4e9ff 0, #f8f9fd 60%); }
.preview-header { display: flex; align-items: center; justify-content: space-between; padding: 30px 6vw; }
.preview-intro { width: min(530px, 45vw); padding: 11vh 0 40px 8vw; }
.preview-intro h1 { font-size: clamp(30px, 3.5vw, 54px); line-height: 1.16; margin: 18px 0 24px; letter-spacing: -1.6px; }
.preview-intro > p:not(.eyebrow) { color: #8590a5; line-height: 1.9; max-width: 340px; }
.preview-disclaimer { margin-top: 55px; border-left: 3px solid #b5c0ef; padding: 5px 0 5px 18px; color: #8f99ad; font-size: 11px; line-height: 1.8; }
.preview-disclaimer strong { color: #7180a3; font-weight: 600; }
.preview-disclaimer p { margin-top: 7px; }
.customer-widget { position: fixed; right: 5vw; bottom: 28px; width: 390px; height: min(730px, calc(100dvh - 100px)); display: flex; flex-direction: column; background: white; border: 1px solid #e0e5f1; border-radius: 18px; overflow: hidden; box-shadow: 0 20px 75px #343f6d20, 0 3px 10px #343f6d08; }
.widget-header { display: flex; align-items: center; gap: 12px; background: #28314e; color: white; padding: 23px 20px; flex-shrink: 0; }
.widget-header > div { flex: 1; min-width: 0; }
.widget-header .eyebrow { color: #9baacc; font-size: 8px; }
.widget-header h2 { font-size: 18px; overflow-wrap: anywhere; }
.widget-header .avatar { background: #414f7c; color: #d5dfff; }
.widget-minimize { background: #394463; color: #bcc7e4; border-radius: 50%; padding: 8px; width: 36px; height: 36px; align-self: flex-start; display: inline-grid; place-items: center; }
.widget-minimize svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.widget-minimize:hover { background: #4a577b; }
.widget-alerts { flex-shrink: 0; max-height: 120px; overflow-y: auto; }
.prechat { flex: 1; overflow-y: auto; padding: 25px 25px 16px; }
.welcome-text { font-size: 15px; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.prechat .muted { font-size: 12px; }
.prechat label { margin-top: 20px; }
.prechat label > span { color: #aab4cf; }
.prechat .wide { margin-top: 24px; padding: 12px; }
.prechat-help { color: #99a2b4; font-size: 10px; line-height: 1.8; margin-top: 24px; }
.widget-conversation { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.widget-history-bar { padding: 8px 16px; flex-shrink: 0; }
.widget-history-bar summary { cursor: pointer; width: fit-content; font-size: 11px; color: #929cb0; }
.widget-history-bar > div { margin-top: 8px; }
.widget-history-bar label { font-size: 10px; margin: 0 0 5px; }
.widget-history-bar select { font-size: 11px; padding: 7px; }
.latest-unread { border-radius: 0; padding: 8px; background: #304568; color: white; font-size: 11px; flex-shrink: 0; }
.latest-unread:hover { background: #3b527a; }
.widget-status { font-size: 10px; color: #929cb0; background: #f7f8fc; padding: 9px 14px; text-align: center; flex-shrink: 0; }
.widget-status:empty { display: none; }
.widget-conversation .messages { padding: 20px 16px; gap: 10px; min-height: 0; }
.widget-conversation .message { font-size: 14px; max-width: 88%; line-height: 1.5; border-radius: 14px; padding: 9px 12px; }
.widget-conversation .message:not(.system):not(.private) { position: relative; display: flex; flex-direction: column; margin-top: 20px; }
.widget-conversation .message:not(.system):not(.private) .message-meta { order: 1; justify-content: flex-end; gap: 8px; margin: 4px 0 0; }
.widget-conversation .message:not(.system):not(.private) .message-meta strong { position: absolute; top: -20px; left: 0; font-size: 11px; font-weight: 400; }
.widget-conversation .message.outgoing { margin-top: 0; }
.widget-conversation .message.outgoing .message-meta strong { display: none; }
.widget-conversation .message.continuation { margin-top: -6px; }
.customer-composer { border-top: 1px solid #e8ebf3; padding: 10px 14px; flex-shrink: 0; }
.customer-composer textarea { border: 0; min-height: 58px; font-size: 12px; resize: none; padding: 4px; max-height: 100px; }
.customer-composer textarea:focus { outline-offset: -2px; }
.customer-composer .composer-footer { padding: 5px 0; }
.widget-message-form { display: grid; grid-template-columns: 32px 32px minmax(0, 1fr) 40px; align-items: end; gap: 4px; }
.widget-message-form > #attach-image, .widget-message-form > #emoji-toggle { width: 32px; }
.customer-composer .widget-message-form textarea { min-height: 40px; padding: 9px 4px; line-height: 1.6; }
.widget-icon-button { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 8px; background: transparent; color: #bcc7e4; border-radius: 50%; flex-shrink: 0; }
.widget-icon-button:hover { background: #343741; }
.widget-icon-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.widget-send-button { background: #4a5bd4; color: white; }
.widget-send-button:hover { background: #3b4bb9; }
.attachment-preview { display: flex; align-items: center; gap: 10px; padding: 10px; margin-bottom: 10px; border: 1px solid #4a4e5d; border-radius: 10px; background: #2e3039; }
.attachment-preview img { width: 64px; height: 64px; object-fit: contain; border-radius: 6px; background: #1e2027; flex-shrink: 0; }
.attachment-info { display: grid; gap: 4px; flex: 1; min-width: 0; }
.attachment-info strong { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-info .muted { font-size: 10px; }
.attachment-status { grid-column: 1 / -1; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.attachment-status:empty { display: none; }
.widget-page .attachment-status[data-state="sent"] { color: #a8dfc7; }
.customer-composer.dragging { outline: 2px dashed #a7b9ff; outline-offset: -4px; background: #303b54; }
.widget-launcher { position: fixed; right: var(--widget-right); bottom: var(--widget-bottom); width: var(--launcher-size); height: var(--launcher-size); display: inline-grid; place-items: center; background: #4a5bd4; color: white; box-shadow: 0 7px 25px #34459b40; border-radius: 50%; padding: 14px; z-index: 3; }
.widget-launcher:hover { background: #3b4bb9; }
.widget-launcher svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.widget-launcher .launcher-close-icon { display: none; }
[data-widget-open="true"] .launcher-chat-icon { display: none; }
[data-widget-open="true"] .widget-launcher .launcher-close-icon { display: block; }
.launcher-count { position: absolute; top: -3px; right: -3px; min-width: 22px; background: #c83547; color: white; border: 2px solid #fff; border-radius: 20px; font-size: 10px; padding: 3px 5px; }
.launcher-status { position: fixed; right: var(--widget-right); bottom: calc(var(--widget-bottom) + var(--launcher-size) + 12px); max-width: min(340px, calc(100vw - 40px)); border-radius: 10px; z-index: 3; }
.preview-page { min-height: 100dvh; background: #f5f6fa; }
.preview-back { color: #5263b9; text-decoration: none; font-size: 12px; }
.widget-catalog { max-width: 1050px; margin: 40px auto; padding: 0 24px; }
.widget-catalog > .muted { max-width: 700px; margin: 15px 0 30px; }
.widget-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.widget-preview-card { background: white; border: 1px solid #e0e5ef; border-radius: 12px; padding: 24px; }
.widget-preview-card h2 { margin: 16px 0 10px; }
.preview-link { display: inline-block; border-radius: 8px; padding: 10px 14px; text-decoration: none; font-size: 12px; margin-top: 20px; }
.widget-loading { padding: 28px; }
.widget-page { min-height: 100dvh; background: white; --widget-right: 28px; --widget-bottom: 24px; --launcher-size: 60px; }
.widget-page .customer-widget { right: var(--widget-right); bottom: calc(var(--widget-bottom) + var(--launcher-size) + 12px); width: 380px; height: min(680px, calc(100dvh - var(--widget-bottom) - var(--launcher-size) - 36px)); border-radius: 12px; color-scheme: dark; animation: widget-enter .18s ease-out; z-index: 2; }
@keyframes widget-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.widget-page .customer-widget, .widget-page .messages { background: #23252c; color: #f0f1f5; border-color: #3c3e48; }
.widget-page .widget-header { background: #1b1d24; border-bottom: 1px solid #383b45; }
.widget-page :is(input, select, textarea) { background: #2e3039; color: #f0f1f5; border-color: #4a4e5d; }
.widget-page .customer-composer { border-color: #393c46; }
.widget-page .customer-composer textarea { background: #23252c; }
.widget-page .widget-status { background: #1e2027; color: #b6bdcc; border-color: #393c46; }
.widget-page :is(.muted, .prechat-help) { color: #bbc1cf; }
.widget-page .message { background: #343741; }
.widget-page .message.outgoing { background: #2e60f5; color: #fff; }
.widget-page .message.outgoing .message-meta { color: #e1e9ff; }
.widget-page .message.system { background: transparent; color: #b0b8c8; }
.widget-page .message-meta { color: #b8c2d6; }
.widget-page .day-divider { color: #b7bfce; background: #30333e; }
.agent-page { background: #1c1d22; color: var(--view-text); color-scheme: dark; --surface: #24252c; --edge: #393b46; --view-text: #e7e9ef; --view-muted: #adb7cb; --view-soft: #30323b; --view-hover: #343741; --view-link: #a7b9ff; --view-field: #30323b; --view-warning-bg: #433c27; --view-warning-text: #efcf97; --view-success: #a8dfc7; }
.agent-page { --button-bg: var(--view-soft); --button-text: var(--view-text); --button-hover: var(--view-hover); }
.agent-page :is(button, a, summary):focus-visible { outline-color: var(--view-link); }
.agent-page .notification-toast { background: var(--surface); color: var(--view-text); border-color: var(--edge); }
.agent-page .notification-toast .text-button { color: var(--view-link); }
.agent-page .navigation { background: #15161b; }
.agent-page .navigation > .brand-mark { width: 34px; height: 34px; }
.agent-page .nav-item.selected { background: #343741; }
.agent-page :is(.chat-panel, .details-panel, .inbox-panel, .team-card, .composer, .login-card) { background: var(--surface); border-color: var(--edge); }
.agent-page .workspace { grid-template-columns: 54px minmax(0, 1fr); }
.agent-page .global-alerts { left: 54px; }
.agent-page .workspace-header { padding: 0 12px; min-height: 56px; gap: 12px; }
.workspace-header #search-form { display: flex; align-items: center; gap: 8px; width: min(416px, 100%); border: 1px solid #393b46; border-radius: 6px; padding-left: 10px; background: #24252c; color: #adb7cb; }
.agent-page .workspace-header #search { border: 0; padding: 7px 8px 7px 0; font-size: 14px; background: transparent; color: #e7e9ef; }
.workspace-header #search::placeholder { color: #adb7cb; opacity: 1; }
.workspace-header #search-form:focus-within { outline: 2px solid #abb8f7; }
.workspace-header #search:focus { outline: none; }
.accepting-agents { position: relative; flex-shrink: 0; margin-left: auto; color: var(--view-text); }
.accepting-agents > summary { display: flex; align-items: center; gap: 8px; padding: 3px 9px; border: 1px solid #393b46; border-radius: 20px; cursor: pointer; list-style: none; font-size: 12px; white-space: nowrap; background: #24252c; color: #e7e9ef; }
.accepting-agents > summary::-webkit-details-marker { display: none; }
.accepting-agents[open] > summary, .accepting-agents > summary:hover { background: #343741; }
.accepting-avatars { display: flex; padding-left: 5px; }
.accepting-avatars:empty { display: none; }
.accepting-agents .accepting-avatar { position: relative; width: 26px; height: 26px; min-width: 26px; font-size: 10px; border: 2px solid var(--surface); }
.accepting-avatars .accepting-avatar { margin-left: -5px; border-color: #24252c; }
.accepting-avatar::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 7px; height: 7px; border-radius: 50%; background: #27c788; border: 1px solid var(--surface); }
.accepting-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; width: 300px; max-width: calc(100vw - 76px); max-height: 60vh; overflow-y: auto; padding: 14px; background: var(--surface); border: 1px solid var(--edge); border-radius: 10px; box-shadow: 0 10px 30px #0004; font-size: 13px; }
.accepting-panel > p { font-size: 12px; margin: 8px 0; }
.accepting-list { list-style: none; padding: 0; margin: 0; }
.accepting-person { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.accepting-person-info { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.accepting-person-info > span { font-size: 11px; }
.customer-location { font-size: 13px; margin: 8px 0 4px; }
.customer-local-time { color: var(--view-muted); font-size: 12px; margin: 4px 0 10px; }
.customer-location-map { margin: 0 0 16px; }
.customer-location-map svg { display: block; width: 100%; aspect-ratio: 2; background: #17191f; border-radius: 6px; }
.customer-location-map figcaption, .location-attribution { color: var(--view-muted); font-size: 10px; line-height: 1.6; margin-top: 6px; }
.customer-location-map a, .location-attribution a { color: var(--view-link); }
.workspace-header #search-form { min-width: 0; flex-shrink: 1; }
.agent-page .navigation { padding: 6px 6px 12px; gap: 6px; }
.agent-page .navigation > .brand-mark { margin-bottom: 6px; }
.agent-page .nav-item { width: 42px; height: 42px; padding: 10px; font-size: 0; gap: 0; }
.agent-page .primary { background: #2e60f5; }
.agent-page .primary:hover { background: #2452da; }
.agent-page .workspace-header h1 { font-size: 19px; }
.agent-page .workspace-notice { background: #3b3222; color: #efcf97; border-color: #57482e; }
.agent-page :is(input, select, textarea), .agent-page #search { background: #30323b; color: #e7e9ef; border-color: #4a4d5b; }
.agent-page :is(.conversation-header, .composer-area, .inbox-progress, .customer-profile, .policy-section, .visitor-section) { border-color: var(--edge); }
.agent-page .messages { background: #202024; }
.agent-page .message { background: var(--view-soft); border: 1px solid #3c3d43; font-size: 14px; line-height: 1.5; padding: 9px 12px; border-radius: 14px; }
.agent-page .message:not(.private):not(.legacy) { border: 0; }
.agent-page .message.outgoing { background: #2e60f5; border-color: #2e60f5; border-radius: 14px; }
.agent-page .message.outgoing .message-meta { color: #e1e9ff; }
.agent-page .message:not(.system):not(.private) { position: relative; display: flex; flex-direction: column; margin-top: 22px; }
.agent-page .message:not(.system):not(.private) .message-meta { order: 1; justify-content: flex-end; margin: 3px 0 0; line-height: 1.2; }
.agent-page .message:not(.system):not(.private) .message-meta strong { position: absolute; top: -22px; left: 0; font-size: 12px; line-height: 18px; font-weight: 400; color: #adb7cb; }
.agent-page .message.outgoing:not(.private) .message-meta strong { left: auto; right: 0; }
.agent-page .message.continuation { margin-top: -6px; }
.agent-page .message.private { background: #433c27; border-color: #6a5a32; }
.agent-page .message.system { background: transparent; border: 0; color: #b2b9c9; font-size: 11px; }
.agent-page .message.system.internal-system { border-left: 2px dashed #8994a9; border-radius: 0; }
.agent-page .message.legacy { background: #2b2d36; border-color: #62677a; }
.agent-page :is(.message-meta, .chat-owner, .chat-preview, .detail-list dt, .muted) { color: #adb7cb; }
.agent-page .detail-list dd { color: #d3d9e7; }
.agent-page .customer-profile { display: flex; flex-direction: column; align-items: center; gap: 0; text-align: center; padding: 20px 0 16px; border-bottom: 0; }
.agent-page .customer-profile .avatar.large { width: 60px; height: 60px; font-size: 20px; border-radius: 50%; margin-bottom: 12px; }
.agent-page .customer-profile h3 { margin: 0 0 6px; font-size: 16px; }
.agent-page .detail-list { margin: 14px 0; }
.agent-page .detail-list dt { margin-top: 12px; }
.customer-section { border-top: 1px solid var(--edge); padding: 14px 0; }
.customer-section > summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.customer-section .detail-list { margin-bottom: 0; }
.agent-page .inbox-section-heading { color: #d3d9e7; border-color: var(--edge); }
.agent-page .inbox-page-scope { color: #adb7cb; }
.agent-page .chat-owner.mine { color: #a8dfc7; }
.agent-page .detail-disclosure { border-color: var(--edge); }
.agent-page .detail-disclosure summary { color: #adb7cb; }
.agent-page .chat-card { border-bottom-color: var(--edge); }
.agent-page .chat-card:hover { background: #30333d; }
.agent-page .chat-card.selected { background: #313136; border-left-color: #2e60f5; }
.agent-page :is(.segmented, .day-divider, .read-only, .counter) { background: #30323b; border-color: #454958; color: #bdc5d6; }
.agent-page .segmented button { color: #c1c8d7; }
.agent-page .segmented button.selected { background: #454b5c; color: white; }
.agent-page .secondary { background: #30333d; color: #e1e5ef; border-color: #4a4f5f; }
.agent-page .secondary:hover { background: var(--view-hover); color: var(--view-text); }
.agent-page .text-button, .agent-page .preview-back { color: #a7b9ff; }
.agent-page .routing-button { background: #30323b; border-color: #4a4d5b; color: #c4cada; }
.agent-page .routing-button.accepting { background: #203d34; color: #a8dfc7; }
.agent-page .composer textarea { background: #24252c; }
.agent-page .internal-composer, .agent-page .internal-composer textarea { background: #393425; border-color: #6a5a32; }
.agent-page .login-screen { background: radial-gradient(ellipse at top, #30394f, #191b22 70%); }
.agent-page .settings-card { background: var(--surface); border: 1px solid var(--edge); border-radius: 10px; padding: 24px; min-width: 0; }
.settings-open .navigation { background: #000; color: #fff; border-color: #000; }
.settings-panel { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 0; min-width: 0; background: #000; padding: 0; overflow: hidden; }
.settings-sidebar { overflow-y: auto; color: #fff; padding: 18px 16px; }
.settings-sidebar h2 { font-size: 20px; margin: 0 8px 24px; }
.settings-sidebar details { margin-bottom: 8px; }
.settings-sidebar summary { cursor: pointer; font-size: 14px; padding: 12px 8px; font-weight: 600; }
.settings-sidebar summary:hover { background: #202020; border-radius: 6px; }
.settings-sidebar button { width: 100%; display: block; text-align: left; background: transparent; color: #d7d7dc; padding: 10px 24px; font-size: 13px; font-weight: 400; }
.settings-sidebar button:hover, .settings-sidebar button.selected { background: #292929; color: #fff; }
.settings-main { min-width: 0; min-height: 0; overflow-y: auto; background: var(--surface); color: var(--view-text); border-radius: 16px 16px 0 0; }
.settings-heading { padding: 22px 28px; border-bottom: 1px solid var(--edge); }
.settings-heading h2 { font-size: 20px; }
.settings-heading .muted { margin-top: 10px; }
.settings-content { padding: 24px 28px; max-width: 950px; }
.settings-content .settings-card { border-radius: 6px; }
.settings-content h3 { font-size: 16px; }
.settings-content h4 { margin: 24px 0 10px; }
.settings-content .muted { font-size: 12px; line-height: 1.7; }
.agent-page .api-documentation { border: 0; padding: 0; }
.api-documentation { max-width: 760px; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.api-documentation p { color: var(--view-muted); }
.api-intro h3 { margin: 6px 0 8px; font-size: 22px; letter-spacing: -.3px; }
.api-eyebrow { color: var(--view-muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.api-notice { margin-top: 24px; padding: 15px 18px; border-left: 3px solid #d5a649; border-radius: 6px; background: var(--view-warning-bg); color: var(--view-warning-text); }
.api-notice p { margin-top: 4px; color: inherit; }
.api-section { padding-top: 26px; margin-top: 26px; border-top: 1px solid var(--edge); }
.settings-content .api-section h3 { margin-bottom: 10px; font-size: 17px; }
.api-section > p + p { margin-top: 12px; }
.api-section > .api-endpoint + p { margin-top: 12px; }
.api-documentation code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; color: var(--view-text); }
.api-endpoints { display: grid; gap: 10px; margin-top: 16px; }
.api-endpoint { min-width: 0; padding: 15px 17px; border: 1px solid var(--edge); border-radius: 8px; background: var(--view-soft); }
.api-endpoint-heading { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.api-endpoint-heading code { font-weight: 600; }
.api-method { flex: 0 0 auto; padding: 2px 7px; border-radius: 4px; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .03em; }
.api-get { background: #226246; }
.api-post { background: #4059a1; }
.api-endpoint p { margin-top: 9px; font-size: 13px; }
.api-documentation pre { margin: 10px 0 14px; padding: 15px 17px; overflow-x: auto; border: 1px solid var(--edge); border-radius: 7px; background: var(--view-soft); line-height: 1.65; tab-size: 4; }
.api-documentation pre code { font-size: 12px; white-space: pre; }
.api-code-label { margin-top: 18px; color: var(--view-muted); font-size: 11px; font-weight: 600; }
.api-statuses { display: grid; gap: 0; margin: 14px 0; border-top: 1px solid var(--edge); }
.api-statuses div { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--edge); }
.api-statuses dt { font-weight: 700; }
.api-statuses dd { margin: 0; color: var(--view-muted); }
.settings-main :is(input, select, textarea) { min-width: 0; }
.settings-widget-selector { display: grid; gap: 8px; padding-bottom: 22px; margin-bottom: 24px; border-bottom: 1px solid var(--edge); }
.settings-widget-selector label { margin: 0; }
.settings-widget-selector select { margin: 0; }
.settings-scope-note { margin-top: 24px; }
.settings-main .settings-status { color: var(--view-success); }
.tags-settings .settings-heading { padding: 16px 30px; }
.tags-settings .settings-heading h2 { font-size: 18px; }
.tags-settings #settings-page-description, .tags-settings .settings-scope-note { display: none; }
.tags-settings .settings-content { padding: 0; max-width: none; }
.tags-settings #settings-error, .tags-settings #settings-status { margin: 0 30px; }
.tags-settings #settings-error:empty, .tags-settings #settings-status:empty { display: none; }
.tags-group-bar { display: flex; align-items: center; gap: 12px; padding: 8px 30px; border-bottom: 1px solid var(--edge); }
.tags-group-bar label { margin: 0; font-size: 13px; font-weight: 400; }
.tags-group-bar select { width: 215px; margin: 0; padding: 7px 10px; font-size: 13px; }
.tags-body { padding: 30px; }
.tags-description { font-size: 13px; line-height: 1.65; color: var(--view-muted); margin: 0 0 28px; }
.tags-body h3 { font-size: 14px; margin: 0 0 16px; }
.tags-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 10px; }
#tags-create-form { display: flex; align-items: center; gap: 12px; }
#tags-name { width: 172px; margin: 0; padding: 8px 12px; font-size: 13px; }
#tags-create { white-space: nowrap; padding: 9px 14px; font-size: 12px; }
.tags-reminder { position: relative; display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 400; white-space: nowrap; cursor: pointer; }
.tags-reminder input { position: absolute; right: 0; width: 40px; height: 24px; opacity: 0; cursor: pointer; }
.tags-switch { display: inline-block; width: 40px; height: 22px; background: #85858b; border-radius: 12px; padding: 3px; }
.tags-switch::before { content: ''; display: block; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .12s; }
.tags-reminder input:checked + .tags-switch { background: #26883f; }
.tags-reminder input:checked + .tags-switch::before { transform: translateX(18px); }
.tags-reminder input:focus-visible + .tags-switch { outline: 2px solid #3376e8; outline-offset: 3px; }
.tags-reminder input:disabled + .tags-switch { opacity: .5; }
.tags-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.tags-table th { text-align: left; height: 42px; color: var(--view-muted); font-weight: 500; border-bottom: 1px solid var(--edge); }
.tags-table th:nth-child(1), .tags-table th:nth-child(2) { width: 32%; }
.tags-table th:nth-child(3) { width: 16%; }
.tags-table th:nth-child(4) { width: 20%; }
.tags-table th button { background: transparent; color: inherit; padding: 8px 14px; font-size: inherit; font-weight: 500; }
.tags-table th[aria-sort="ascending"] button::after { content: ' \2191'; }
.tags-table th[aria-sort="descending"] button::after { content: ' \2193'; }
.tags-table td { padding: 14px; height: 67px; border-bottom: 1px solid var(--edge); overflow-wrap: anywhere; }
.tags-name { display: inline-block; background: var(--view-soft); color: var(--view-text); border-radius: 5px; padding: 3px 7px; line-height: 1.1; }
.tags-table .tags-author { display: flex; align-items: center; gap: 10px; }
.tags-avatar { flex: 0 0 32px; width: 32px; height: 32px; display: grid; place-items: center; background: #9646ed; color: #fff; border-radius: 50%; font-size: 16px; }
.tags-date { font-size: 13px; }
.tags-table .tags-actions { white-space: nowrap; padding-left: 0; }
.tags-link { color: #2464c9; font-size: 13px; font-weight: 400; background: transparent; padding: 4px; }
.tags-menu { display: inline-block; position: relative; margin-left: 8px; }
.tags-menu summary { list-style: none; cursor: pointer; padding: 4px; font-size: 20px; }
.tags-menu summary::-webkit-details-marker { display: none; }
.tags-menu > div { position: absolute; z-index: 4; right: 0; top: 100%; width: 140px; padding: 5px; border: 1px solid var(--edge); border-radius: 7px; background: var(--surface); box-shadow: 0 5px 18px #0002; }
.tags-menu button { display: block; width: 100%; padding: 9px 12px; text-align: left; color: var(--view-text); background: transparent; font-size: 13px; }
.tags-menu button:hover { background: var(--view-soft); }
.tags-menu .tags-delete { color: #cf263b; }
.tags-empty { color: var(--view-muted); text-align: center; }
.tag-reminder-notice { padding: 12px; border: 1px solid #e8c960; background: #fff8df; color: #664d05; border-radius: 6px; }
@media (max-width: 760px) {
  .tags-toolbar { align-items: flex-start; flex-direction: column; }
  .tags-body { padding: 20px 16px; overflow-x: auto; }
  .tags-table { min-width: 600px; }
  .tags-group-bar { padding: 10px 16px; }
}
#access-current-ip { overflow-wrap: anywhere; min-width: 0; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.settings-card > .muted { margin-top: 10px; }
.widget-settings { grid-column: 1 / -1; max-width: 850px; width: 100%; }
.settings-list { display: grid; gap: 5px; margin: 20px 0; }
.knowledge-proposals pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.knowledge-diff { margin: 14px 0; border: 1px solid var(--edge); border-radius: 5px; overflow: hidden; }
.knowledge-diff-headings, .knowledge-diff-row, .knowledge-diff-fallback { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.knowledge-diff-headings > strong { padding: 8px; background: var(--view-soft); font-size: 12px; }
.knowledge-diff-headings > strong + strong, .knowledge-diff-cell + .knowledge-diff-cell { border-left: 1px solid var(--edge); }
.knowledge-diff-body { max-height: 480px; overflow: auto; font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.knowledge-diff-cell { display: grid; grid-template-columns: 3.5em minmax(0, 1fr); min-width: 0; }
.knowledge-diff-number { text-align: right; padding: 0 7px; color: var(--view-muted); user-select: none; }
.knowledge-diff-text { white-space: pre-wrap; overflow-wrap: anywhere; padding: 0 6px; }
.knowledge-diff-cell.removed { background: #663535; }
.knowledge-diff-cell.added { background: #264d37; }
.knowledge-diff-cell.removed mark { background: #a64c4c; color: inherit; }
.knowledge-diff-cell.added mark { background: #347d4e; color: inherit; }
.knowledge-diff-cell.empty { background: var(--view-soft); }
.knowledge-diff-fold summary { cursor: pointer; padding: 5px 12px; color: var(--view-muted); background: var(--view-soft); }
.knowledge-diff-fallback textarea { min-width: 0; margin: 0; }
.settings-group { display: flex; justify-content: space-between; gap: 14px; text-align: left; background: #30333d; color: #e7e9ef; }
.settings-group-logo { width: 34px; height: 34px; object-fit: contain; flex: 0 0 auto; border-radius: 4px; background: #fff; }
.settings-group:hover { background: #3c4251; }
.settings-group :is(strong, span) { overflow-wrap: anywhere; min-width: 0; }
.group-logo-panel { border-top: 1px solid var(--edge); margin-top: 26px; padding-top: 20px; max-width: 500px; }
.group-logo-preview { display: block; width: 150px; height: 100px; object-fit: contain; border-radius: 6px; background: #fff; margin: 14px 0; }
.settings-actions { display: flex; align-items: center; gap: 16px; margin-top: 22px; flex-wrap: wrap; }
.check-list { border: 1px solid #4a4d5b; border-radius: 8px; margin: 20px 0 0; padding: 12px; }
.check-list legend { font-size: 12px; padding: 0 5px; }
.checkbox-label { display: flex; align-items: center; gap: 10px; font-weight: 400; line-height: 1.6; margin-top: 12px; overflow-wrap: anywhere; }
.checkbox-label input { width: 16px; height: 16px; flex-shrink: 0; }
.settings-status { color: #a8dfc7; padding: 12px 0; font-size: 12px; }
.settings-status:empty { display: none; }
.automate-open .navigation { background: #000; border-color: #000; }
.reports-open .navigation { background: #000; border-color: #000; }
.reports-workspace { display: grid; grid-template-columns: 296px minmax(0, 1fr); min-height: 0; min-width: 0; background: #000; }
.reports-sidebar { overflow-y: auto; padding: 16px 28px 28px; color: #eee; }
.reports-sidebar > h2 { font-size: 18px; padding: 0 12px; margin-bottom: 20px; }
.report-nav-group { margin: 4px 0 16px; }
.report-nav-group > summary { cursor: pointer; min-height: 32px; padding: 7px 12px; font-size: 14px; }
.report-nav-item { display: flex; align-items: center; justify-content: space-between; gap: 5px; width: 100%; min-height: 32px; padding: 7px 12px; margin: 2px 0; text-align: left; background: transparent; color: #a0a0a5; font-size: 13px; font-weight: 400; }
.report-nav-group .report-nav-item { padding-left: 36px; }
.report-nav-item:hover { background: #202020; color: #fff; }
.report-nav-item.selected { background: #292929; color: #fff; }
.report-unavailable-dot { font-size: 9px; color: #a0a0a5; flex-shrink: 0; }
.reports-main { min-width: 0; min-height: 0; overflow-y: auto; background: var(--surface); color: var(--view-text); border-radius: 16px 16px 0 0; color-scheme: inherit; }
.reports-heading { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 12px 24px; border-bottom: 1px solid var(--edge); background: var(--surface); }
.reports-heading h2 { font-size: 18px; }
.reports-heading > div { display: flex; gap: 6px; flex-wrap: wrap; }
.report-button { padding: 7px 10px; background: var(--surface); border: 1px solid var(--edge); border-radius: 8px; color: var(--view-text); font-size: 12px; white-space: nowrap; }
.report-button:hover { background: var(--view-hover); }
.reports-filters { padding: 16px 32px; border-bottom: 1px solid var(--edge); }
.reports-filter-toolbar, .reports-filter-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.reports-filter-chips { margin-top: 8px; }
.reports-filter { position: relative; }
.reports-filter > summary { cursor: pointer; list-style: none; padding: 7px 12px; border: 1px solid var(--edge); border-radius: 7px; background: var(--view-soft); font-size: 13px; }
.reports-filter > summary::-webkit-details-marker { display: none; }
.reports-filter > summary:hover { background: var(--view-hover); }
#reports-add-filter > summary { background: var(--surface); font-weight: 600; }
.reports-filter-popup { position: absolute; top: calc(100% + 6px); left: 0; z-index: 6; width: 264px; max-width: calc(100vw - 90px); padding: 12px; background: var(--surface); border: 1px solid var(--edge); border-radius: 8px; box-shadow: 0 5px 20px #0002; }
.reports-filter-popup > button { display: block; width: 100%; text-align: left; font-weight: 400; color: var(--view-text); background: var(--surface); }
.reports-filter-popup > button:hover { background: var(--view-hover); }
.reports-filter-popup input { margin-bottom: 8px; }
.reports-hourly { display: flex; align-items: center; gap: 8px; margin: 0 0 0 auto; font-size: 12px; font-weight: 400; }
.reports-hourly input { width: 16px; height: 16px; accent-color: #2e60f5; }
.agent-page .reports-workspace :is(input, select) { color: var(--view-text); background: var(--view-field); border-color: var(--edge); font-size: 13px; }
.reports-select-filter { display: flex; align-items: center; background: var(--view-soft); border-radius: 7px; max-width: 240px; }
.reports-select-filter select { border: 0; padding: 7px 8px; background: transparent; }
.reports-select-filter button { background: transparent; color: var(--view-muted); padding: 5px 9px; }
.reports-content { padding: 24px 32px; }
.report-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.report-card { min-width: 0; border: 1px solid var(--edge); border-radius: 3px; margin-bottom: 20px; overflow: hidden; }
.report-kpi { padding: 20px; margin: 0; }
.report-kpi h3 { font-weight: 500; font-size: 13px; color: var(--view-muted); margin-bottom: 16px; }
.report-kpi strong { font-size: 25px; line-height: 1.4; }
.report-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 18px 22px; border-bottom: 1px solid var(--edge); }
.report-card-heading h3 { font-size: 14px; }
.report-chart-value { display: block; padding: 22px 24px 0; font-size: 25px; }
.report-drill-link { border: 0; padding: 0; background: transparent; color: #3277ee; font: inherit; cursor: pointer; }
.report-drill-link:hover, .report-drill-link:focus-visible { text-decoration: underline; }
.report-drill-bar { cursor: pointer; }
.report-drill-bar:focus-visible { outline: 2px solid #3277ee; }
.reports-chart { display: block; width: 100%; height: 200px; }
.reports-chart rect { fill: #3277ee; }
.reports-chart text { fill: var(--view-muted); font-size: 12px; }
.report-grid-line { stroke: var(--edge); stroke-width: 1; }
.report-table-scroll { overflow-x: auto; }
.report-table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; white-space: nowrap; }
.report-table :is(th, td) { padding: 14px 18px; border-bottom: 1px solid var(--edge); }
.report-table th { font-weight: 500; color: var(--view-muted); background: var(--view-soft); }
.report-table tbody tr:last-child td { border-bottom: 0; }
.report-note, .reports-footer { font-size: 11px; color: var(--view-muted); line-height: 1.7; }
.report-card > .report-note { padding: 12px 20px; }
.reports-footer { padding: 0 32px 28px; }
.report-empty { padding: 60px 20px; text-align: center; color: var(--view-muted); font-size: 13px; line-height: 1.8; }
.report-empty h3 { color: var(--view-text); margin-bottom: 14px; font-size: 20px; }
.report-empty p + p { margin-top: 12px; }
.report-saved-view { display: grid; gap: 6px; text-align: left; width: 100%; background: var(--surface); color: var(--view-text); border: 1px solid var(--edge); padding: 18px; margin-bottom: 10px; }
.report-saved-view span { color: var(--view-muted); font-size: 12px; font-weight: 400; }
.report-saved-view:hover { background: var(--view-hover); }
.report-legend { display: flex; flex-wrap: wrap; gap: 12px 24px; padding: 14px 22px; color: var(--view-muted); font-size: 12px; }
.report-legend > span { display: inline-flex; align-items: center; gap: 7px; flex-direction: row-reverse; }
.report-legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.report-status-accepting { background: #15a87c; }
.report-status-not_accepting { background: #ed9654; }
.report-status-logged_out { background: #abb2be; }
.report-status-unknown { background: repeating-linear-gradient(135deg, #9aa2b333 0 3px, transparent 3px 6px); }
.report-check { display: inline-flex; align-items: center; flex-direction: row-reverse; gap: 8px; cursor: pointer; font-size: 12px; }
.report-check input { width: auto; margin: 0; accent-color: #3277ee; }
.report-heatmap td { min-width: 62px; text-align: center; background: rgb(50 119 238 / var(--heat, 0)); color: var(--view-text); border: 2px solid var(--surface); padding: 7px 10px; }
.report-heatmap th { padding: 8px 10px; text-align: center; }
.report-form > summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.report-form > summary::before { content: '\25be'; margin-right: 10px; }
.report-form:not([open]) > summary::before { content: '\25b8'; }
.report-form-meta { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; padding: 18px 22px; color: var(--view-muted); font-size: 12px; }
.report-question { padding: 20px 22px; border-top: 1px solid var(--edge); }
.report-question h4 { font-size: 14px; margin-bottom: 5px; }
.report-answer { display: grid; grid-template-columns: minmax(80px, 1fr) minmax(80px, 2fr) 55px; gap: 16px; align-items: center; margin-top: 16px; font-size: 12px; }
.report-answer > span { overflow-wrap: anywhere; }
.report-answer-track { height: 12px; background: var(--view-soft); border-radius: 2px; overflow: hidden; }
.report-answer-track > span { display: block; height: 100%; background: #3277ee; }
.report-answer strong { text-align: right; }
.report-activity-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 22px; }
.report-activity-controls label { margin-left: auto; }
.report-activity-controls input[type=date] { width: auto; }
.report-activity-grid { min-width: 760px; }
.report-activity-row { display: grid; grid-template-columns: minmax(190px, 28%) minmax(420px, 1fr); gap: 24px; align-items: center; min-height: 71px; padding: 18px 22px; border-top: 1px solid var(--edge); font-size: 12px; }
.report-activity-head { min-height: 60px; color: var(--view-muted); font-size: 11px; }
.report-activity-axis { height: 18px; position: relative; margin-right: 8px; }
.report-activity-axis > span { position: absolute; transform: translateX(-50%); top: 0; white-space: nowrap; }
.report-activity-axis > span:first-child { transform: none; }
.report-activity-axis > .report-axis-end { left: 100%; transform: translateX(-100%); }
.report-activity-agent { display: flex; align-items: center; gap: 12px; min-width: 0; }
.report-activity-agent > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-activity-agent .avatar { flex: 0 0 32px; width: 32px; height: 32px; font-size: 10px; }
.report-activity-timeline { display: grid; gap: 8px; min-width: 0; }
.report-activity-summary { display: flex; flex-wrap: wrap; gap: 8px 12px; font-size: 12px; line-height: 1; }
.report-activity-summary > span { white-space: nowrap; }
.report-activity-track { height: 6px; position: relative; background: var(--view-soft); }
.report-activity-track > span { display: block; position: absolute; height: 100%; top: 0; min-width: 1px; }
.report-export-fields { display: grid; gap: 24px; max-width: 560px; padding: 24px; }
.report-export-fields > label { display: grid; gap: 10px; font-size: 13px; }
.report-export-fields select { width: 100%; }
.report-export-fields > button { justify-self: start; }
@media (max-width: 760px) {
  .reports-workspace { grid-template-columns: 200px minmax(0, 1fr); }
  .reports-sidebar { padding: 16px 12px; }
  .reports-content, .reports-filters { padding: 16px; }
  .reports-heading { padding: 12px 16px; flex-wrap: wrap; }
  .report-kpis { grid-template-columns: 1fr; }
  .reports-footer { padding: 0 16px 20px; }
}
@media (max-width: 520px) {
  .reports-workspace { grid-template-columns: 150px minmax(0, 1fr); }
  .reports-sidebar { padding: 16px 4px; }
  .report-nav-group .report-nav-item { padding-left: 18px; }
  .report-unavailable-dot { display: none; }
}
.agent-page .archive-open { color: var(--view-text); }
.archive-open .navigation { background: #000; border-color: #000; }
.agent-page .archive-open :is(.inbox-panel, .chat-panel, .details-panel, .messages) { background: var(--surface); }
.archive-tools { flex-shrink: 0; border-bottom: 1px solid var(--edge); }
.archive-heading { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 10px 16px; border-bottom: 1px solid var(--edge); }
.archive-heading h2 { font-size: 18px; }
.archive-reset { display: grid; place-items: center; padding: 8px; width: 36px; height: 36px; background: transparent; color: var(--view-text); }
.archive-tools svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.archive-search { display: flex; align-items: center; gap: 8px; margin: 10px 12px; padding-left: 12px; border: 1px solid var(--edge); border-radius: 4px; color: var(--view-muted); }
.agent-page .archive-search input { height: 40px; padding: 8px 8px 8px 0; border: 0; background: var(--surface); color: var(--view-text); font-size: 13px; }
.archive-search input:focus { outline: none; }
.archive-search:focus-within { outline: 2px solid #abb8f7; outline-offset: 1px; }
.archive-filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 0 12px; }
.archive-add-filter, .archive-filter { position: relative; min-width: 0; max-width: 100%; }
.archive-add-filter > summary, .archive-filter > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; min-height: 32px; border: 1px solid var(--edge); border-radius: 6px; padding: 6px 10px; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.archive-add-filter > summary::-webkit-details-marker, .archive-filter > summary::-webkit-details-marker { display: none; }
.archive-add-filter > summary > span { font-size: 20px; font-weight: 400; line-height: 16px; }
.archive-filter > summary { background: var(--view-soft); border-color: var(--edge); }
.archive-filter-menu, .archive-filter-popup { position: absolute; top: calc(100% + 8px); left: 0; z-index: 15; border: 1px solid var(--edge); border-radius: 8px; box-shadow: 0 6px 22px #0003; background: var(--surface); color: var(--view-text); }
.archive-filter-menu { width: 195px; padding: 6px; }
.archive-filter-menu button { display: block; width: 100%; padding: 9px 10px; border-radius: 4px; text-align: left; font-size: 13px; font-weight: 400; background: var(--surface); color: var(--view-text); }
.archive-filter-menu button span { display: block; font-size: 10px; color: var(--view-muted); }
.archive-filter-menu button:hover, .archive-reset:hover, .archive-add-filter > summary:hover, .archive-filter > summary:hover { background: var(--view-hover); }
.archive-filter-popup { width: 280px; max-width: calc(100vw - 80px); padding: 12px; }
.archive-filter-popup h3 { margin-bottom: 14px; }
.agent-page .archive-filter-popup :is(input, select) { color-scheme: inherit; background: var(--view-field); color: var(--view-text); border-color: var(--edge); font-size: 13px; }
.archive-filter-popup .primary { margin-top: 12px; width: 100%; }
.archive-remove-filter { width: 100%; margin-top: 12px; border: 1px solid var(--edge); font-size: 12px; background: var(--surface); color: var(--view-muted); }
.archive-remove-filter:hover { background: var(--view-hover); }
.archive-results { display: flex; align-items: center; justify-content: space-between; min-height: 40px; padding: 5px 12px; gap: 12px; }
.archive-results > span { color: var(--view-muted); font-size: 12px; }
.agent-page .archive-results select { width: auto; padding: 5px 18px 5px 6px; border: 0; background: var(--surface); color: var(--view-text); font-size: 13px; }
.agent-page .archive-open .chat-card { padding: 12px 14px; border-left-width: 3px; border-bottom: 0; }
.agent-page .archive-open .chat-card .avatar { display: none; }
.agent-page .archive-open .chat-card:hover { background: var(--view-hover); }
.agent-page .archive-open .chat-card.selected { background: var(--view-soft); border-left-color: #2e60f5; }
.agent-page .archive-open .chat-select:hover { background: transparent; }
.archive-open .chat-card-content { gap: 7px; }
.archive-open .chat-list:empty { display: none; }
.archive-open .list-empty { flex: 1; display: grid; place-content: center; }
.archive-open .chat-card-title strong { font-size: 13px; }
.archive-open .chat-card-title time { color: var(--view-muted); font-size: 10px; }
.archive-card-agent { color: var(--view-muted); font-size: 12px; font-weight: 400; }
.archive-card-group { justify-self: start; max-width: 100%; padding: 3px 6px; border-radius: 4px; background: var(--view-soft); font-size: 11px; font-weight: 400; overflow-wrap: anywhere; }
.agent-page .archive-open :is(.chat-preview, .muted, .detail-list dt, .message-meta) { color: var(--view-muted); }
.agent-page .archive-open .detail-list dd { color: var(--view-text); }
.agent-page .archive-open .details-panel select { color-scheme: inherit; background: var(--view-field); color: var(--view-text); border-color: var(--edge); }
.agent-page .archive-open .message { color: var(--view-text); border-color: var(--edge); }
.agent-page .archive-open .message:not(.outgoing):not(.system):not(.private) { background: var(--view-soft); }
.agent-page .archive-open .message.outgoing { color: #fff; border-color: #2e60f5; }
.agent-page .archive-open .message.outgoing .message-meta { color: #e1e9ff; }
.agent-page .archive-open .message:not(.system):not(.private) .message-meta strong { color: var(--view-muted); }
.agent-page .archive-open .message.system { color: var(--view-muted); }
.agent-page .archive-open .message.private { background: var(--view-warning-bg); border-color: var(--edge); }
.agent-page .archive-open :is(.read-only, .day-divider, .status-chip),
.agent-page .archive-open #conversation-workspace .avatar { background: var(--view-soft); color: var(--view-muted); border-color: var(--edge); }
.agent-page .archive-open .secondary { background: var(--surface); color: var(--view-text); border-color: var(--edge); }
.agent-page .archive-open .secondary:hover { background: var(--view-hover); }
.agent-page .archive-open .text-button { color: var(--view-link); }
.automate-workspace { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 0; padding: 0 6px 6px 16px; background: #000; gap: 20px; }
.automate-sidebar { color: #fff; padding: 16px 0; overflow-y: auto; }
.automate-sidebar h2 { font-size: 20px; margin: 0 12px 24px; }
.automate-sidebar summary { cursor: pointer; font-size: 14px; font-weight: 600; padding: 12px; }
.automate-sidebar button { display: block; width: 100%; padding: 8px 36px; text-align: left; font-size: 14px; color: #fff; background: transparent; }
.automate-sidebar button:hover, .automate-sidebar button.selected { background: #292929; }
.automate-sidebar button:disabled { color: #818181; background: transparent; }
.canned-page { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--surface); color: var(--view-text); border-radius: 16px; overflow: hidden; font-size: 14px; }
.canned-page-heading { display: flex; align-items: center; min-height: 56px; padding: 14px 24px; border-bottom: 1px solid var(--edge); gap: 12px; flex-shrink: 0; }
.canned-page-heading h2 { font-size: 20px; line-height: 26px; }
.canned-back { width: 28px; height: 28px; padding: 4px; background: transparent; color: var(--view-text); }
.canned-back:hover { background: var(--view-hover); }
.canned-back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.canned-browser { padding: 32px; overflow-y: auto; min-height: 0; }
.canned-page > :is(.error, .settings-status):not(:empty) { padding: 12px 24px; margin: 0; }
.canned-page .settings-status { color: var(--view-success); }
.canned-page :is(input, select, textarea) { background: var(--view-field); border-color: var(--edge); color: var(--view-text); font-size: 14px; }
.canned-page input::placeholder, .canned-page textarea::placeholder { color: var(--view-muted); }
.canned-page label { font-size: 14px; font-weight: 400; }
.canned-group-filter { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.canned-group-filter label { white-space: nowrap; margin: 0; }
.canned-group-filter select { flex: 1; min-width: 0; margin: 0; }
.canned-help { margin-bottom: 32px; }
.canned-help summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; font-size: 16px; font-weight: 600; list-style: none; }
.canned-help summary::-webkit-details-marker { display: none; }
.canned-help summary span { font-size: 13px; font-weight: 400; }
.canned-help-show, .canned-help[open] .canned-help-hide { display: inline; }
.canned-help-hide, .canned-help[open] .canned-help-show { display: none; }
.canned-help > div { padding: 20px; margin-top: 20px; border: 1px solid var(--edge); border-radius: 4px; line-height: 1.6; }
.canned-page .primary { background: #2457df; border: 1px solid #2457df; color: #fff; font-size: 14px; padding: 8px 16px; border-radius: 6px; }
.canned-page .primary:hover { background: #1948c7; }
.canned-new { margin-bottom: 32px; }
.canned-new span { margin-right: 8px; font-size: 20px; line-height: 16px; }
.canned-list-tools { display: flex; align-items: center; gap: 4px; margin-bottom: 16px; }
.canned-sharing-tabs { display: flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid var(--edge); border-radius: 6px; width: fit-content; flex-shrink: 0; }
.canned-sharing-tabs :is(button, span) { padding: 6px 12px; background: transparent; color: var(--view-text); font-size: 14px; border-radius: 4px; }
.canned-sharing-tabs button:hover, .canned-sharing-tabs .selected { background: var(--view-hover); }
.canned-sharing-tabs :is(button:disabled, .unavailable) { color: var(--view-muted); cursor: not-allowed; background: transparent; }
.canned-list-tools input { min-width: 65px; margin: 0; flex: 1; width: 0; }
.canned-total { background: var(--view-soft); padding: 10px 28px; border-radius: 4px; margin-bottom: 16px; font-size: 14px; }
.canned-responses-list { display: grid; gap: 12px; }
.canned-response { border: 1px solid var(--edge); border-radius: 4px; padding: 16px; }
.canned-response-edit { display: block; width: 100%; padding: 0; text-align: left; background: transparent; color: var(--view-text); }
.canned-response-edit:hover { background: transparent; }
.canned-shortcut-chip { display: inline-block; padding: 6px 8px; border: 1px solid var(--edge); border-radius: 4px; font-weight: 600; font-size: 14px; }
.canned-response-text { display: block; margin: 12px 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; font-size: 14px; }
.canned-response-delete { padding: 6px 8px; background: transparent; color: var(--view-muted); font-size: 12px; }
.canned-response-delete:hover { background: var(--view-hover); color: var(--view-text); }
.canned-empty { color: var(--view-muted); line-height: 1.6; padding: 20px 0; }
.canned-editor { flex: 1; min-height: 0; }
.canned-editor form { height: 100%; display: flex; flex-direction: column; }
.canned-editor-body { padding: 24px; overflow-y: auto; flex: 1; min-height: 0; }
.canned-sharing-hint, .canned-shortcut-hint { color: var(--view-muted); line-height: 1.6; font-size: 13px; }
.canned-sharing-hint { margin: 10px 0 28px; }
.canned-editor-body label { margin-top: 24px; }
.canned-editor-body textarea { height: 144px; min-height: 144px; resize: vertical; }
.canned-shortcut-field { display: flex; align-items: center; border: 1px solid var(--edge); border-radius: 6px; padding-left: 12px; }
.canned-shortcut-field input { border: 0; margin: 0; min-width: 0; }
.canned-shortcut-hint { margin-top: 8px; }
.canned-editor-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--edge); flex-shrink: 0; }
.canned-page .secondary { background: var(--surface); color: var(--view-text); border-color: var(--edge); font-size: 14px; padding: 8px 16px; }
.canned-page .secondary:hover { background: var(--view-hover); }
#save-canned { order: 2; }
.agent-page.theme-light { background: #f7f7f9; color: var(--view-text); color-scheme: light; --surface: #fff; --edge: #e4e5e9; --view-text: #242429; --view-muted: #686e7a; --view-soft: #f1f3f7; --view-hover: #edf0f5; --view-link: #2457ce; --view-field: #fff; --view-warning-bg: #fff6d8; --view-warning-text: #80621d; --view-success: #28704b; }
.agent-page.theme-light :is(input, select, textarea) { background: #fff; color: #242429; border-color: #d7d9df; }
.agent-page.theme-light :is(.messages, .login-screen) { background: #fafafb; }
.agent-page.theme-light :is(.profile-hint, .profile-environment, .muted, .chat-owner, .chat-preview, .detail-list dt, .inbox-page-scope, .inbox-filters, .agent-icon-button, .inbox-tab, .chat-card-meta, .list-empty) { color: #686e7a; }
.agent-page.theme-light :is(.inbox-section-heading, .detail-list dd) { color: #3c4350; }
.agent-page.theme-light .chat-owner.mine { color: #28704b; }
.agent-page.theme-light .chat-card:hover { background: #f2f3f6; }
.agent-page.theme-light .chat-card.selected { background: #edf2ff; }
.agent-page.theme-light :is(.chat-card-close, .secondary, .settings-group, .chat-scope-options, .inbox-filter-options, .composer-mode-options, .supervise-actions-menu, .canned-popup, .transfer-dialog) { background: #fff; color: #3c4350; border-color: #d7d9df; }
.agent-page.theme-light :is(.chat-scope-options button, .composer-mode-options button, .supervise-actions-menu button, .canned-option) { color: #3c4350; }
.agent-page.theme-light :is(.secondary:hover, .settings-group:hover, .chat-scope-options button:hover, .composer-mode-options button:hover, .canned-option:hover, .canned-option.selected, .chat-card-close:hover, .inbox-filters summary:hover, .agent-icon-button:hover, .composer-mode summary:hover, .inbox-tab:hover) { background: #edf0f5; color: #242429; }
.agent-page.theme-light .inbox-tab.selected { background: #edf2ff; color: #2457ce; border-bottom-color: #2457ce; }
.agent-page.theme-light :is(.segmented, .day-divider, .read-only, .counter) { background: #f1f3f7; border-color: #e1e4eb; color: #686e7a; }
.agent-page.theme-light .segmented button { color: #686e7a; }
.agent-page.theme-light .segmented button.selected { background: #fff; color: #2457ce; }
.agent-page.theme-light :is(.detail-disclosure summary, .message-meta, .message.system, .canned-popup p) { color: #686e7a; }
.agent-page.theme-light .message:not(.system):not(.private) .message-meta strong { color: #686e7a; }
.agent-page.theme-light .message { border-color: #dedfe5; }
.agent-page.theme-light .message.outgoing { background: #2e60f5; color: #fff; border-color: #2e60f5; }
.agent-page.theme-light .message.outgoing .message-meta { color: #e1e9ff; }
.agent-page.theme-light .message.legacy { background: #f1f3f7; border-color: #cdd1dc; }
.agent-page.theme-light .message.private { background: #fff6d8; border-color: #e4d59e; }
.agent-page.theme-light .composer textarea { background: #fff; }
.agent-page.theme-light :is(.internal-composer, .internal-composer textarea) { background: #fff8e6; border-color: #e4d59e; }
.agent-page.theme-light .internal-composer .composer-mode summary { color: #8b6a24; }
.agent-page.theme-light :is(.check-list, .agent-image-preview) { border-color: #d7d9df; }
.agent-page.theme-light .agent-image-preview img { background: #f1f3f7; }
.agent-page.theme-light .composer-area.dragging { background: #edf2ff; outline-color: #2457ce; }
.agent-page.theme-light :is(.text-button, .preview-back) { color: #2457ce; }
.agent-page.theme-light .settings-status { color: #28704b; }
.agent-page.theme-light .workspace-notice { background: #fff8e8; color: #80621d; border-color: #e8dfc7; }
@media (max-width: 680px) {
  .automate-workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 8px; padding: 0 6px 6px; }
  .automate-sidebar { padding: 8px; }
  .automate-sidebar h2 { display: none; }
  .automate-sidebar details:not([open]) { margin-bottom: 0; }
  .automate-sidebar button { padding: 8px 24px; }
  .canned-browser, .canned-editor-body { padding: 20px; }
  .canned-list-tools { flex-wrap: wrap; gap: 8px; }
  .canned-list-tools input { min-width: 100%; }
}
@media (max-width: 1250px) {
  .conversation-workspace { grid-template-columns: 320px minmax(0, 1fr) 225px; }
  .workspace-header { padding: 16px; }
  .details-panel { padding: 18px 14px; }
  .composer-footer .muted { max-width: 130px; }
}
@media (max-width: 1100px) {
  .conversation-workspace { grid-template-columns: 320px minmax(0, 1fr); }
  .details-panel { display: none; position: absolute; right: 0; top: 0; bottom: 0; width: 285px; z-index: 10; box-shadow: -15px 0 40px #29385b15; }
  .details-open .details-panel { display: block; }
  .compact-only { display: inline-block; }
  .details-heading button { font-size: 10px; }
}
@media (max-width: 760px) {
  .archive-filter-bar { position: relative; }
  .archive-filter { position: static; }
  .archive-filter-popup { left: 12px; }
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-panel { grid-template-columns: 150px minmax(0, 1fr); }
  .settings-sidebar { padding: 16px 6px; }
  .settings-sidebar button { padding: 10px 16px; }
  .settings-heading, .settings-content { padding: 16px; }
  .agent-page .settings-card { padding: 16px; }
  .widget-settings { grid-column: auto; }
  .workspace { grid-template-columns: 56px minmax(0, 1fr); }
  .navigation { padding: 15px 3px; gap: 10px; }
  .navigation > .brand-mark { width: 30px; height: 30px; font-size: 17px; }
  .nav-item { width: 48px; font-size: 9px; }
  .navigation .local-badge { font-size: 6px; padding: 4px; }
  .workspace-header { align-items: flex-start; flex-wrap: wrap; padding: 12px; gap: 10px; }
  .workspace-header h1 { font-size: 18px; }
  .workspace-header .eyebrow { font-size: 8px; }
  .profile-menu { left: 62px; }
  .workspace-notice { font-size: 8px; padding: 5px; }
  .conversation-workspace { grid-template-columns: minmax(0, 1fr); }
  .chat-panel { display: none; }
  .chat-selected .chat-panel { display: flex; }
  .chat-selected .inbox-panel { display: none; }
  .mobile-only { display: inline-block; font-size: 10px; padding: 4px; }
  .conversation-header { padding: 12px; gap: 7px; flex-wrap: wrap; }
  .conversation-header > .avatar { display: none; }
  .conversation-heading h2 { font-size: 13px; }
  .conversation-heading p { font-size: 9px; }
  .conversation-actions { gap: 3px; }
  .conversation-actions button { font-size: 9px; padding: 6px; }
  .messages { padding: 14px; }
  .message { max-width: 95%; font-size: 11px; }
  .composer-area { padding: 8px; }
  .composer-footer button { font-size: 10px; padding: 8px; }
  .details-panel { position: fixed; top: 0; width: min(320px, 100vw); }
  .team-panel { padding: 18px; }
  .team-heading { display: block; }
  .team-heading > p { margin-top: 14px; }
  .global-alerts { left: 56px; }
  .preview-header { padding: 18px; }
  .preview-intro { width: auto; padding: 10vh 26px; }
  .preview-intro h1 { font-size: 36px; }
  .customer-widget, .widget-page .customer-widget { width: 100%; height: 100dvh; right: 0; bottom: 0; border-radius: 0; border: 0; z-index: 2; }
  .widget-header { padding: max(19px, env(safe-area-inset-top)) 18px 19px; }
  .prechat { padding: 24px; }
  .widget-page { --widget-right: max(20px, env(safe-area-inset-right)); --widget-bottom: max(20px, env(safe-area-inset-bottom)); }
  .widget-page[data-widget-open="true"] { overflow: hidden; }
  .widget-page[data-widget-open="true"] .widget-launcher { display: none; }
  .customer-composer { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}
@media (max-height: 560px) {
  .widget-header { padding: 12px; }
  .widget-header .eyebrow { display: none; }
  .widget-header .avatar { width: 30px; height: 30px; }
  .widget-history-bar { padding: 6px; }
  .widget-history-bar label { display: none; }
  .widget-history-bar select { padding: 5px; }
  .widget-status { padding: 6px; }
  .widget-conversation .messages { padding: 8px; }
  .widget-conversation { overflow-y: auto; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; animation: none !important; } }
.prechat-card { align-self: center; width: min(440px, 100%); padding: 14px 16px; border: 1px solid var(--edge, #dce1ea); border-radius: 10px; background: var(--view-soft, #f3f5f8); font-size: 13px; }
.prechat-card > strong { display: block; margin-bottom: 10px; }
.prechat-card .detail-list { display: grid; grid-template-columns: minmax(100px, 1fr) 2fr; gap: 8px 12px; }
.prechat-card .detail-list :is(dt, dd) { margin: 0; overflow-wrap: anywhere; }
.tag-search-label { font-size: 11px; margin: 8px 12px 0; color: var(--view-muted); }
.tag-search { margin: 4px 12px 8px; width: calc(100% - 24px); padding: 6px 9px; }
.tag-list, .suggested-responses { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px 0; }
.tag-chip, .suggested-response { border: 1px solid var(--edge); border-radius: 16px; padding: 4px 9px; color: var(--view-text); background: var(--view-soft); font-size: 12px; }
.suggested-responses { padding: 4px 12px; }
.suggested-responses:empty, .widget-traffic-status:empty { display: none; }
.thread-tag-bar { display: flex; align-items: center; flex-wrap: wrap; flex-shrink: 0; gap: 8px; min-height: 48px; padding: 8px 24px; color: var(--view-text); }
.thread-tag-bar .tag-list { padding: 0; min-width: 0; flex: 1; max-height: 112px; overflow-y: auto; }
.thread-tag-bar .tag-chip { border: 0; border-radius: 5px; padding: 3px 7px; font-size: 13px; font-weight: 400; max-width: 100%; overflow-wrap: anywhere; text-align: left; }
.thread-tag-bar .tag-chip:disabled { opacity: 1; cursor: default; }
.tag-picker { position: relative; flex-shrink: 0; }
.tag-picker summary { display: flex; align-items: center; gap: 5px; list-style: none; cursor: pointer; font-size: 13px; padding: 5px 0; }
.tag-picker summary::-webkit-details-marker { display: none; }
.tag-picker summary svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.tag-picker-panel { position: absolute; z-index: 8; bottom: calc(100% + 8px); left: 0; width: min(290px, calc(100vw - 100px)); padding: 12px; background: var(--surface); border: 1px solid var(--edge); border-radius: 8px; box-shadow: 0 5px 20px #0002; }
#tag-form { display: flex; gap: 6px; margin: 0; }
#tag-form :is(input, select) { min-width: 0; margin: 0; padding: 8px; font-size: 13px; }
#tag-add { flex-shrink: 0; padding: 8px; font-size: 12px; }
.whisper-list { max-height: 260px; overflow-y: auto; }
.whisper-message { padding: 10px; margin-top: 8px; border-radius: 8px; background: var(--view-warning-bg, #fff5d5); }
.whisper-message time { display: block; margin: 3px 0; font-size: 11px; }
.whisper-message p, .template-row p { white-space: pre-wrap; overflow-wrap: anywhere; }
.workspace-dialog { width: min(860px, calc(100vw - 32px)); max-height: 85dvh; overflow-y: auto; padding: 22px; background: var(--surface, #fff); color: var(--view-text, #222); border: 1px solid var(--edge, #dce1ea); border-radius: 14px; }
.workspace-dialog > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.workspace-dialog form { margin-top: 14px; }
.traffic-visitor, .template-row { border: 1px solid var(--edge, #dce1ea); padding: 12px; margin: 12px 0; border-radius: 10px; overflow-wrap: anywhere; }
.traffic-visitor ol { padding-left: 20px; }
.traffic-visitor a { color: var(--view-link, #2358cd); }
.traffic-visitor summary { cursor: pointer; margin: 10px 0; }
.template-edit { text-align: left; }
.form-question { border: 1px solid var(--edge, #dce1ea); padding: 12px; margin: 14px 0; border-radius: 8px; }
.form-question legend { padding: 0 6px; }
.widget-page .customer-widget { color-scheme: light; background: #fff; color: #24262d; border-color: #e2e5eb; box-shadow: 0 12px 50px #12204624; }
.widget-page .messages { background: #fff; color: #24262d; }
.widget-page .widget-header { background: #fff; color: #24262d; border-color: #e7e9ef; padding: 16px; gap: 10px; }
.widget-page .widget-header .eyebrow { display: none; }
.widget-page .widget-header h2 { font-size: 15px; font-weight: 600; }
.widget-page .widget-header .avatar { width: 36px; height: 36px; background: #2e60f5; color: #fff; }
.widget-page .widget-header .avatar.brand-logo { width: 60px; height: 40px; border-radius: 0; background: transparent; color: #515967; }
.widget-page .widget-header .brand-logo > img { object-fit: contain; background: #fff; }
.widget-page .widget-minimize { color: #515967; }
.widget-page #close-chat { display: none; }
.widget-page :is(input, select, textarea) { color: #24262d; background: #fff; border-color: #cdd3df; }
.widget-page .customer-composer { background: #fff; border-color: #e7e9ef; }
.widget-page .customer-composer textarea { background: #fff; color: #24262d; }
.widget-page .message { background: #f0f2f6; color: #24262d; border-color: #e4e8ef; }
.widget-page .message.outgoing { background: #2e60f5; color: #fff; }
.widget-page .message-meta, .widget-page :is(.muted, .prechat-help, .welcome-text, .typing-status) { color: #697386; }
.widget-page .message.outgoing .message-meta { color: #e4edff; }
.widget-page .widget-status { background: #f5f7fb; color: #4a5870; border-color: #e4e8ef; }
.widget-page .widget-alerts { background: #fff; }
.widget-page .attachment-status[data-state="sent"] { color: #23734c; }
.widget-menu { position: relative; }
.widget-menu > summary { cursor: pointer; font-size: 21px; list-style: none; line-height: 1; padding: 8px; letter-spacing: 1px; }
.widget-menu > summary::-webkit-details-marker { display: none; }
.widget-menu-options { position: absolute; z-index: 5; right: 0; top: 36px; min-width: 180px; padding: 6px; background: #fff; border: 1px solid #dfe3eb; border-radius: 10px; box-shadow: 0 8px 26px #12204624; }
.widget-menu-options button { width: 100%; text-align: left; color: #24262d; padding: 10px; background: transparent; border-radius: 6px; }
.widget-menu-options button:hover { background: #eef2f8; }
.widget-invitation { flex-shrink: 0; padding: 12px 16px; background: #edf3ff; border-bottom: 1px solid #d7e3fd; }
.widget-invitation p { white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 8px; }
.widget-invitation button { margin-right: 8px; }
.widget-traffic-status { margin: 6px; font-size: 11px; color: #9c4e16; }
:root:has(body.widget-embedded) { background: transparent; }
.widget-embedded { background: transparent !important; --widget-right: 16px; --widget-bottom: 16px; }
.widget-embedded .customer-widget { width: min(380px, calc(100vw - 32px)); }
@media (max-width: 480px) {
  .widget-page[data-widget-open="true"] .customer-widget { inset: 0; width: 100%; height: 100dvh; border: 0; border-radius: 0; }
  .widget-page[data-widget-open="true"] .widget-launcher { display: none; }
  .widget-page .customer-composer { padding-bottom: env(safe-area-inset-bottom); }
}
.widget-direct .widget-launcher, .widget-direct .widget-minimize#minimize { display: none; }
.widget-direct .customer-widget { top: 24px; bottom: auto; right: auto; left: 50%; transform: translateX(-50%); width: min(420px, calc(100vw - 32px)); height: min(780px, calc(100dvh - 48px)); animation: none; }
.widget-direct .launcher-status { left: 16px; right: 16px; bottom: 8px; }
@media (max-width: 760px) {
  .widget-direct .customer-widget { inset: 0; transform: none; width: 100%; height: 100dvh; }
}
[hidden] { display: none !important; }

/* Compact Setup AI */
.ai-setup .ai-setup-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.ai-setup .ai-setup-head h3 { margin: 0; }
.ai-setup .ai-setup-head p { margin: 0; }
.ai-setup #ai-active-info { margin: 8px 0 0; font-size: 13px; }
.ai-setup details > summary { cursor: pointer; font-size: 13px; padding: 6px 0; }
.ai-setup .ai-help ul { margin: 4px 0 0; padding-left: 18px; }
.ai-setup .ai-help li { margin: 2px 0; }
.ai-setup .ai-roster { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--edge); }
.ai-setup #ai-roster-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px 14px; margin: 6px 0 10px; }
.ai-setup #ai-roster-choices .checkbox-label { align-items: flex-start; margin-top: 4px; }
.ai-setup #ai-roster-choices .checkbox-label input { margin-top: 2px; }
.ai-setup #ai-roster-group-list p { margin: 2px 0; font-size: 12px; }
.ai-setup #ai-roster-proposals { margin: 8px 0; }
.ai-setup .ai-agent-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 8px; }
.ai-setup .ai-agent-picker label { margin: 0; }
.ai-setup .ai-agent-picker select { flex: 1 1 200px; width: auto; }
.ai-setup #ai-form { margin-top: 14px; }
.ai-setup .ai-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.ai-setup .ai-slot { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px 10px; align-content: start; margin: 0; padding: 10px 12px 12px; min-width: 0; }
.ai-setup .ai-slot legend { padding: 0 4px; font-weight: 600; }
.ai-setup .ai-field { display: grid; gap: 4px; min-width: 0; }
.ai-setup .ai-field label { margin: 0; font-size: 12px; }
.ai-setup .ai-field :is(input, select) { width: 100%; min-width: 0; margin: 0; }
.ai-setup .ai-field-wide { grid-column: 1 / -1; }
.ai-setup .ai-model-row { display: flex; gap: 6px; }
.ai-setup .ai-model-row input { flex: 1 1 auto; }
.ai-setup .ai-model-row button { flex: 0 0 auto; white-space: nowrap; margin: 0; }
.ai-setup .ai-field .muted { line-height: 1.4; }
.ai-setup .ai-slot-unused .ai-slot-detail { display: none; }
.ai-setup #ai-submit { margin-top: 12px; }
