/* Shared Hitop-inspired palette. Layout and status semantics stay in their own stylesheets. */
:root{
  --hi-ink:#253648;--hi-muted:#76889b;--hi-border:#e1e9ef;
  --hi-page:#f3f6f9;--hi-soft:#edf5fc;--hi-selected:#e3f0fc;
  --hi-purple:#3390ec;--hi-purple-dark:#237ccc;--hi-pink:#64b4fa;
  --hi-green:#238559;--hi-online:#20bb79;
  --blue:var(--hi-purple);--nav:#26394d;--border:var(--hi-border);
  --muted:var(--hi-muted);--green:var(--hi-green);
  color:var(--hi-ink);background:var(--hi-page);accent-color:var(--hi-purple);
}
body,main,.main-content,.page-wrap,.live-workspace{background:var(--hi-page);color:var(--hi-ink)}
::selection{background:#e6eff7;color:#26394d}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,
select:focus-visible,summary:focus-visible,.desk-login-card :focus-visible{
  outline:3px solid #a3b5c6;outline-offset:2px;
}
/* A restrained dark plum navigation keeps the pale conversation canvas readable. */
.sidebar{background:#26394d;color:#a3b5c6}
.brand-mark,.desk-login-brand span{background:#3390ec;color:#fff}
.brand-caption{color:#a3b5c6}
.workspace{background:#ffffff05;border-color:#5c417055;color:#f3f7fa}
.workspace small{color:#a3b5c6}
.workspace-icon,.avatar.small{background:#456078;color:#f3f7fa}
.nav-label{color:#a3b5c6}
.nav-item{color:#a3b5c6}
.nav-item:hover{background:#ffffff0c;color:#fff}
.nav-item.active{background:#3390ec;color:#fff;box-shadow:inset 3px 0 #a3b5c6}
.nav-count{background:#456078;color:#fff}
.operator,.safe-note{border-color:#5c417055;color:#f3f7fa}
.safe-note b{color:#f3f7fa}.safe-note p,.operator-more{color:#a3b5c6}.shield{color:#a3b5c6}
.sidebar .desk-logout{border-color:#456078;color:#e6eff7}
.topbar{background:#fff;border-color:var(--hi-border)}
.breadcrumb,.top-right{color:var(--hi-muted)}
.breadcrumb strong{color:#456078}.breadcrumb span{color:#a3b5c6}
.env-label{color:#6d8499;border-color:var(--hi-border);background:#f3f7fa}
.page-heading,.page-title{background:#eaf3fc}
.page-heading h1,.page-title h1,.live-heading-title h1{color:#456078}
.page-heading .subtitle,.page-title p:last-child{color:#6d8499}
.live-workspace .live-heading{background:none}
.button{background:#fff;color:#456078;border-color:var(--hi-border)}
.button:hover{background:var(--hi-soft);border-color:#e6eff7}
.button.primary{background:var(--hi-purple);border-color:var(--hi-purple);color:#fff}
.button.primary:hover{background:var(--hi-purple-dark);border-color:var(--hi-purple-dark)}
.button.dark{background:#26394d;border-color:#26394d;color:#fff}
.card,.table-wrap,.stat,.panel,.desk,.live-desk{border-color:var(--hi-border);background:#fff}
.card p,.card dt,.stat-label{color:var(--hi-muted)}
.card dd,td{color:#456078}.stat-value{color:var(--hi-ink)}
th{background:#f3f7fa;color:#6d8499}td{border-color:var(--hi-border)}
.stat-icon,.account-letter,.avatar,.avatar.tiny{background:#f3f7fa;color:#6d8499}
.pill.blue,.desk-member-grant{background:#f3f7fa;color:#6d8499}
.pill.gray{background:#f3f7fa;color:#6d8499}
.pill.green{background:#e8f8ef;color:var(--hi-green)}
.notice:not(.error):not(.success){background:#f3f7fa;border-color:var(--hi-border);color:#6d8499}
.policy-number{color:#6d8499}
.toast{background:#26394d}
dialog,.live-remove-dialog,.live-quick-dialog{border-color:var(--hi-border);color:var(--hi-ink);box-shadow:0 24px 65px #35194829}
dialog::backdrop,.live-remove-dialog::backdrop{background:#23133166}
/* Account tabs and conversation list. Red unread and error indicators remain red. */
.live-workspace .live-heading-title #live-count,.live-account-count{color:var(--hi-muted)}
.live-account-chip{border-color:var(--hi-border);background:#fff}
.live-account-chip.is-selected{border-color:#a3b5c6;background:#eaf3fc;box-shadow:inset 0 -2px #a3b5c6}
.live-account-tab{color:#6d8499}.live-account-tab:hover{background:#f3f7fa}
.live-account-chip.is-selected .live-account-tab{color:#456078}
.live-account-chip .live-sync-toggle{border-color:var(--hi-border)}
.live-account-dot.online{background:var(--hi-online)}
.live-status.online{color:var(--hi-green)}
.live-list,.live-controls,.live-chat-header,.live-conversation{border-color:var(--hi-border)}
.live-conversation{background:#fff}
.live-conversation:hover{background:#f3f7fa}
.live-conversation.selected{background:#f3f7fa;box-shadow:inset 3px 0 var(--hi-purple)}
.live-conversation-info>strong{color:#456078}
.live-conversation-info>span,.live-conversation-info small,.live-conversation time{color:var(--hi-muted)}
.live-controls input,.live-controls select,.live-search,.live-filter,
.live-reply-form textarea,.live-quick-picker input,.live-quick-dialog input,.live-quick-dialog textarea,
.ai-workspace input:not([type=checkbox]),.ai-workspace select,.ai-workspace textarea,
.desk-login-card input,.desk-members input,.desk-member-assignment select,.desk-member-dialog input,
.login-page input{background:#f3f7fa;border-color:var(--hi-border);color:#456078}
input::placeholder,textarea::placeholder{color:#6d8499}
.live-chat-header{border-color:var(--hi-border)}#live-reply-host{background:#fff;border-color:var(--hi-border)}
.live-chat-header h2{color:var(--hi-ink)}.live-chat-header p{color:var(--hi-muted)}
.live-workspace .live-message>div{background:#f3f7fa;color:#456078}
.live-workspace .live-message.out>div{background:#eaf3fc;color:#456078}
.live-message small{color:#6d8499}
.live-workspace .live-message-translation{background:#f3f7fa;border-left-color:#a3b5c6;color:#6d8499}
.live-workspace .live-message-translation.pending{color:#6d8499}
.live-workspace .live-message-translation.error{color:#a36539;border-left-color:#d49c70;background:#fff7ef}
.live-empty-symbol{background:#f3f7fa;color:#6d8499}
.live-empty h2{color:#456078}.live-empty p,.live-empty small{color:var(--hi-muted)}
.live-reply-form label,.live-compose-heading .live-translate-toggle{color:#456078}
.live-reply-form textarea[readonly]{background:#f3f7fa}
.live-ai-toolbar a{color:var(--hi-purple)}.live-ai-toolbar>span{color:var(--hi-muted)}
.live-ai-suggestion{background:#f3f7fa;border-color:#e6eff7;color:#456078}
.live-ai-toggle input,.live-translate-toggle input{accent-color:var(--hi-purple)}
.live-send-status.success{color:var(--hi-green)}
.live-quick-picker{background:#fff;border-color:#e6eff7;color:#456078;box-shadow:0 10px 38px #56217e26}
.live-quick-picker::backdrop{background:transparent;backdrop-filter:none}
.live-quick-picker-heading button{color:var(--hi-purple)}
.live-quick-choice{color:#456078}
.live-quick-choice:hover,.live-quick-choice:focus-visible{background:#eaf3fc;color:#456078}
.live-quick-picker-notice,.live-quick-help{color:var(--hi-muted)}
.live-quick-item{border-color:var(--hi-border)}
.live-quick-title{color:#456078}.live-quick-text{color:#6d8499}
.ai-provider-card{border-top-color:#6d8499}
.ai-workspace label,.desk-login-card label,.desk-member-create label,.desk-member-dialog label{color:#456078}
/* Authentication and Telegram connection screens share the same palette. */
.desk-login-body{background:radial-gradient(ellipse at 10% 10%,#f3f7fa,transparent 55%),radial-gradient(ellipse at 95% 95%,#e6eff7,transparent 55%),#f3f7fa;color:var(--hi-ink)}
.desk-login-card{border-color:var(--hi-border);box-shadow:0 20px 65px #783ba218}
.desk-login-brand{color:#6d8499}.desk-login-card>p{color:var(--hi-muted)}
.login-page a,.live-ai-toolbar a{color:var(--hi-purple)}
.login-page .back-link{color:#6d8499}
.login-page label,.guide strong{color:#456078}
.eyebrow,.hint,.summary-note,.guide ol,.qr-instructions ol{color:#6d8499}
.section-heading,summary,.tabs,.password-form{border-color:var(--hi-border)}
.status-badge{border-color:var(--hi-border);color:#6d8499}
.step-number,.real-account .account-symbol{background:#f3f7fa;color:#6d8499}
.tabs button{color:#6d8499}.tabs button[aria-selected=true]{color:var(--hi-purple);border-bottom-color:var(--hi-purple)}
.guide-note,.real-account{background:#f3f7fa;border-color:var(--hi-border);color:#6d8499}
.qr-placeholder{background:#f3f7fa;border-color:var(--hi-border);color:#6d8499}
.local-badge,.notice.success{background:#e9f9f0;color:var(--hi-green);border-color:#d1eddc}
.verified,.inline-feedback{color:var(--hi-green)}

.live-type-filter{display:flex;gap:4px;background:#f3f7fa;border-radius:7px;padding:3px}
.live-type-filter button{flex:1;border:0;border-radius:5px;padding:5px 8px;background:transparent;color:#6d8499;font-size:12px}
.live-type-filter button[aria-pressed=true]{background:#fff;color:var(--hi-purple);box-shadow:0 1px 4px #67358614}
.live-message-sender{font-size:11px;color:#6d8499;margin:0 3px 4px}
.live-avatar{background:#f3f7fa;color:#6d8499}
.live-ai-toolbar[hidden]{display:none!important}

.live-quick-number-help{display:flex;align-items:center;gap:10px;color:var(--hi-muted);font-size:11px;line-height:1.6;margin:0 0 12px}
#real-reply-count[hidden]{display:none}
.live-reply-actions #real-quick-replies{margin-left:auto}

/* Telegram-inspired blue-gray workspace. */
.sidebar{background:#26394d;color:#cbd9e5}.brand-caption,.workspace small,.nav-label{color:#a9bdcd}
.workspace{background:#ffffff06;border-color:#ffffff15}.workspace-icon,.avatar.small{background:#395771;color:#fff}
.nav-item{color:#d3e0eb}.nav-item.active{background:#3390ec;box-shadow:none;color:#fff}.nav-item:hover{background:#36516a}
.nav-item.active:hover{background:#2885df}.operator,.safe-note{border-color:#ffffff15}.sidebar .desk-logout{border-color:#658098;color:#e7f0f7}
.page-heading,.page-title{background:#edf3f8}.page-heading h1,.live-heading-title h1{color:#24394d}
.brand-mark,.desk-login-brand span{background:#3390ec}.brand-name{color:#fff}
.live-chat,.live-messages{background:#eaf1f5}.live-workspace .live-message>div{background:#fff;color:#253648;box-shadow:0 1px 2px #24394d08}
.live-workspace .live-message.out>div{background:#e3f2d9;color:#253648}
.live-workspace .live-message-translation{background:#f5f8fa;border-left-color:#b6c9d8;color:#61768a}
.live-workspace .live-message.out .live-message-translation{background:#eef7e8;border-left-color:#b7d7a6}
.live-workspace .live-message-translation.error{background:#fff7ef;color:#a36539;border-left-color:#d49c70}
.live-conversation.selected{background:#e5f1fc;box-shadow:inset 3px 0 #3390ec}.live-conversation-info>strong{color:#253648}
.live-account-chip.is-selected{background:#eef6fe;border-color:#79b9f5;box-shadow:inset 0 -2px #3390ec}
.live-account-chip.is-selected .live-account-tab{color:#237dcc}.live-type-filter{background:#edf3f8}
.live-reply-form textarea{background:#fff;color:#253648;border-color:#dce6ef}.live-reply-form label{color:#61768a}
.live-view-photo{color:#2584d9;border-color:#c5ddf2}.live-photo-dialog::backdrop{background:#182c4088}
.live-avatar{position:relative;flex-shrink:0;overflow:hidden;background:#dfedfa;color:#3390ec}
.live-avatar img{width:100%;height:100%;object-fit:cover;display:block;border-radius:50%}
.live-chat-header .live-avatar{width:42px;height:42px;display:grid;place-items:center;border-radius:50%;font-size:18px}
.live-chat-header>div{margin-right:auto}.live-avatar .unread-dot{z-index:1}
.ai-provider-card{border-top-color:#3390ec}.ai-checkbox input{accent-color:#3390ec}
.desk-login-body{background:#edf3f8}.desk-login-brand{color:#2584d9}.desk-login-card{box-shadow:0 20px 65px #26394d12}

.distill-dialog{width:min(1100px,94vw);max-height:90dvh;padding:24px;border:1px solid #dce6ef;border-radius:16px;background:#fff;color:#253648;overflow:auto}
.distill-dialog header{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}.distill-dialog h2{margin:0 0 8px;font-size:22px}.distill-dialog p{font-size:13px;color:#6d8499;line-height:1.7}.distill-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px}.distill-dialog label{display:block;font-size:13px;margin:14px 0}.distill-dialog input,.distill-dialog select,.distill-dialog textarea{display:block;width:100%;box-sizing:border-box;margin-top:8px;padding:12px;border:1px solid #dce6ef;border-radius:8px;background:#f9fbfd;color:#253648;font:inherit}.distill-dialog textarea{resize:vertical;line-height:1.65}.distill-dialog::backdrop{background:#182c4077}.ai-library-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:16px 0 22px;padding-bottom:18px;border-bottom:1px solid #edf1f7}.ai-library-toolbar .button{min-height:40px;padding:9px 15px;white-space:nowrap;font-size:14px}.ai-library-toolbar #ai-distill-open{float:none;margin:0;margin-left:auto}@media(max-width:600px){.ai-library-toolbar #ai-distill-open{margin-left:0}.ai-library-toolbar .button{flex:1 1 auto}}@media(max-width:750px){.distill-grid{grid-template-columns:1fr}.distill-dialog{padding:16px}}

.distill-dialog textarea{height:29dvh;min-height:150px;max-height:40dvh}.distill-dialog [data-status]:empty{display:none}

/* Keep account actions together and give the inbox the former header space. */
#desk-shell:has(.live-workspace) .topbar{display:none}
#desk-shell .operator{flex-wrap:wrap;gap:10px;padding:14px 5px}
#desk-shell .desk-operator-actions{display:flex;gap:8px;width:100%}
#desk-shell .desk-operator-actions .desk-logout{display:inline-flex;justify-content:center;flex:1;padding:7px 5px}
.live-recall{border:0;background:transparent;color:#51758e;font-size:12px;padding:3px 8px;border-radius:4px}
.live-recall:hover{background:#dbeaf4;color:#185e9c}
@media(max-width:1050px){#desk-shell .desk-operator-actions{flex-direction:column;gap:5px}#desk-shell .desk-operator-actions .desk-logout{font-size:10px;white-space:normal}}
#desk-shell:has(.live-workspace)>.sidebar{overflow:hidden;padding-top:20px}
#desk-shell:has(.live-workspace) .sidebar nav{min-height:0;overflow:auto;display:block;flex:1}
#desk-shell:has(.live-workspace) .sidebar .brand,#desk-shell:has(.live-workspace) .sidebar .workspace,#desk-shell:has(.live-workspace) .sidebar .nav-label,#desk-shell:has(.live-workspace) .sidebar-bottom{flex-shrink:0}
#desk-shell:has(.live-workspace) .sidebar-bottom{padding-top:10px}
#desk-shell:has(.live-workspace) .workspace{margin-top:8px;margin-bottom:18px}

/* Clearer reading rhythm without changing the chosen blue and sage palette. */
.live-workspace .live-desk{border-radius:14px;box-shadow:0 8px 28px #2749660c}
.live-workspace .live-controls{background:#fff}
.live-workspace .live-conversations{background:#fff}
.live-workspace .live-conversation{border-bottom:1px solid #edf2f6;transition:background-color .15s ease}
.live-workspace .live-conversation:hover{background:#f4f9fd}
.live-workspace .live-conversation.selected{background:#eaf5ff;box-shadow:inset 3px 0 #3390ec}
.live-workspace .live-chat-header{background:#fff;box-shadow:0 1px 0 #dce7ef}
.live-workspace .live-messages{background:#eaf1f5}
.live-workspace .live-message>div{border-radius:12px;box-shadow:0 2px 7px #26394d0b}
.live-workspace .live-message.out>div{background:#e3f2d9}
.live-workspace .live-reply-form{background:#fff;box-shadow:0 -2px 10px #26394d09}
.live-workspace .live-reply-form textarea:focus{border-color:#78b8ed;box-shadow:0 0 0 3px #3390ec14}
.live-workspace .live-account-chip{border-radius:10px}
.live-workspace .live-account-chip.is-selected{border-color:#69afe9;box-shadow:inset 0 -2px #3390ec,0 2px 7px #3390ec15}
.live-loading-conversation{gap:10px}.live-loading-indicator{width:26px;height:26px;border-radius:50%;border:3px solid #d7e9f8;border-top-color:#3390ec;animation:live-loading-spin .8s linear infinite}
@keyframes live-loading-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.live-loading-indicator{animation:none}.live-workspace .live-conversation{transition:none}}
.ai-distill-job{font-size:12px;padding:6px 10px;margin-top:8px}
.ai-job-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}.ai-job-actions .ai-distill-job{margin-top:0}.ai-reject-job{font-size:12px;padding:6px 10px;color:#b44c4c;border-color:#efcccc;background:#fff8f8}.ai-reject-job:hover:not(:disabled){background:#fff0f0}.ai-reject-job:disabled{color:#6e879c;background:#f3f6f9;border-color:#dce5ec;cursor:default}
.live-host-reminder{color:#2786ce;background:#eaf5ff;border-color:#c4e2fa;white-space:nowrap}
.host-reminder-dialog{width:min(420px,calc(100vw - 40px));padding:26px;border:1px solid #dce7ef;border-radius:18px;color:#263e50;box-shadow:0 18px 70px #163b5a30}
.host-reminder-dialog::backdrop{background:#17354d66;backdrop-filter:blur(3px)}
.host-reminder-dialog h2{margin:0 0 18px;font-size:21px}
.host-reminder-dialog label{display:block;margin:18px 0 8px;font-weight:600}
.host-reminder-dialog label[hidden]{display:none}
.host-reminder-dialog input,.host-reminder-dialog select,.host-reminder-dialog textarea{display:block;width:100%;box-sizing:border-box;margin-top:8px;padding:11px;border:1px solid #d5e3ef;border-radius:9px;background:#f7fbfe;font:inherit;color:inherit}
.host-reminder-dialog [data-status]{font-size:13px;line-height:1.6;color:#45768e;min-height:21px}
.host-reminder-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}
.host-report-controls{display:flex;align-items:end;gap:12px;flex-wrap:wrap}
.host-report-controls label{font-size:13px;color:#617c91}
.date-range-separator{padding-bottom:10px;color:#7b8fa3;font-size:13px}
.host-report-controls input{display:block;margin-top:6px;padding:9px 12px;background:#fff;border:1px solid #dce7ef;border-radius:9px;color:#263e50;font:inherit}
.host-report-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:20px 0}
.host-report-stats .card{padding:24px;background:linear-gradient(140deg,#fff,#f2f9ff)}
.host-report-stats span{font-size:14px;color:#617c91}
.host-report-stats strong{display:block;margin-top:14px;font-size:34px;line-height:1.15;color:#2586d4;font-variant-numeric:tabular-nums}
.host-dashboard>.card,.host-dashboard #host-report-body>.card{margin-bottom:20px}
.host-report-table{overflow:auto}.host-report-table table{width:100%;border-collapse:collapse;min-width:630px;text-align:left;font-size:14px}
.host-report-table th{padding:14px 12px;background:#f1f7fb;color:#617c91;font-weight:500;white-space:nowrap}
.host-report-table td{padding:16px 12px;border-bottom:1px solid #e7eff5;vertical-align:top;overflow-wrap:anywhere;max-width:320px}
.host-report-table small{display:block;margin-top:5px;color:#7890a2;white-space:pre-wrap}
.host-report-bar{height:4px;margin-top:8px;width:110px;background:#edf4fa;border-radius:4px;overflow:hidden}.host-report-bar span{display:block;height:100%;background:#55a7ed;border-radius:4px}
.host-report-empty{padding:38px;text-align:center;color:#7890a2}
@media(max-width:760px){.host-report-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.host-report-stats .card{padding:18px}.host-report-controls{margin-top:12px}}
.host-report-overview{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,2fr);gap:18px;margin:20px 0}
.host-report-overview .card{padding:24px;margin:0!important}
.host-report-metric>span{color:#617c91;font-size:14px}.host-report-metric>strong{display:block;font-size:42px;color:#2586d4;line-height:1.2;margin:12px 0 8px;font-variant-numeric:tabular-nums}.host-report-metric strong small{display:inline;font-size:14px;font-weight:400;color:#7b91a3;margin-left:9px}.host-report-metric p{margin:0;color:#7b91a3;font-size:12px}
.host-reason-summary h2{font-size:16px;margin:0 0 18px}.host-reason-counts{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.host-reason-counts>div>span{font-size:12px;color:#617c91;display:flex;align-items:center;gap:6px}.host-reason-counts strong{font-size:25px;display:block;margin-top:7px;color:#274457}.host-reason-counts small{display:inline;font-size:11px;font-weight:400;margin-left:5px;color:#7b91a3}
.reason-color{display:inline-block;width:7px;height:7px;border-radius:50%;flex-shrink:0}.reason-0{background:#3999ef}.reason-1{background:#f1aa54}.reason-2{background:#a6b8c9}.host-reason-total{height:7px;display:flex;overflow:hidden;border-radius:8px;background:#edf3f8;margin-top:16px}
.host-rank-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px;flex-wrap:wrap}.host-rank-heading h2{margin:0;font-size:20px}.host-rank-heading p{margin:7px 0 0;font-size:12px;color:#7b91a3}.host-rank-legend{display:flex;gap:16px;font-size:12px;color:#617c91}.host-rank-legend span,.host-rank-breakdown span{display:inline-flex;align-items:center;gap:6px}
.host-rank-row{display:flex;gap:16px;padding:18px 0;border-bottom:1px solid #edf2f7}.host-rank-row:last-child{border:0}.host-rank-position{width:27px;height:27px;display:grid;place-items:center;flex-shrink:0;border-radius:9px;background:#f0f4f8;color:#8297a8;font-size:13px;margin-top:1px}.host-rank-position.top{background:#e7f3ff;color:#2586d4;font-weight:700}.host-rank-main{flex:1;min-width:0}.host-rank-label{display:flex;justify-content:space-between;gap:16px;align-items:center}.host-rank-label>strong{font-size:15px;overflow-wrap:anywhere}.host-rank-label>span{font-size:12px;white-space:nowrap;color:#7b91a3}.host-rank-label b{font-size:23px;color:#284b65;font-variant-numeric:tabular-nums}
.host-rank-track{height:12px;border-radius:6px;background:#f0f5f9;margin:10px 0}.host-rank-fill{height:100%;display:flex;border-radius:6px;overflow:hidden;min-width:2px}.host-rank-breakdown{display:flex;gap:20px;flex-wrap:wrap;font-size:12px;color:#7890a2}.host-rank-breakdown b{color:#405f74}.host-report-footnote{font-size:12px;color:#8ba0b0;margin:18px 0 0}.host-report-details summary{cursor:pointer;color:#314f64}.host-report-details summary>span{font-size:12px;font-weight:400;margin-left:14px;color:#8196a8}
@media(max-width:1050px){.host-report-overview{grid-template-columns:1fr 1fr}.host-reason-summary{grid-column:1/-1}}@media(max-width:600px){.host-report-overview{gap:10px}.host-report-overview .card{padding:17px}.host-rank-card{padding:18px!important}.host-reason-counts small{display:block;margin-left:0}.host-report-details summary>span{display:block;margin:8px 0}.host-rank-legend{gap:10px}}
.live-user-label{display:flex;align-items:center;gap:8px;margin-left:16px;font-size:12px;color:#6b8498;flex-wrap:wrap}.live-user-label select{width:100px;padding:7px 10px;border:1px solid #cee4f7;border-radius:8px;background:#eff7ff;color:#247fc4}.live-user-label span{max-width:220px;font-size:11px}.reply-filter{display:flex;align-items:center;gap:20px;margin:20px 0;color:#7890a2;font-size:13px;flex-wrap:wrap}.reply-filter select{margin-left:8px;padding:9px 15px;border:1px solid #d9e7f1;border-radius:9px;background:white;color:#31516b}.reply-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:20px 0}.reply-metrics .card{margin:0!important}.reply-metrics span{color:#6e879c;font-size:14px}.reply-metrics strong{display:block;font-size:32px;color:#298bd6;margin:12px 0}.reply-metrics small{color:#8ca0b1}.reply-waiting{color:#d78a29!important}.reply-user-chip{padding:4px 10px;background:#e7f3ff;color:#2c88ce;border-radius:6px;font-size:12px}.reply-method{font-size:12px;color:#7b91a3;line-height:1.8}.reply-dashboard .host-report-table{max-height:480px;overflow:auto}@media(max-width:700px){.reply-metrics{grid-template-columns:1fr}.live-user-label{margin-left:0}.reply-metrics strong{font-size:26px}}
/* Conversation AI switch: native checkbox retains keyboard and saving state. */
.live-ai-optin{gap:10px;color:#29445b;font-weight:600;cursor:pointer;padding:3px 0}.live-ai-optin input{appearance:none;-webkit-appearance:none;position:relative;box-sizing:border-box;width:42px;height:24px;flex:0 0 42px;margin:0;border:0;border-radius:999px;background:#b7c5d3;cursor:pointer;transition:background .18s ease;vertical-align:middle}.live-ai-optin input::before{content:'';position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #16324930;transition:transform .18s ease}.live-ai-optin input:checked{background:#1687ff}.live-ai-optin input:checked::before{transform:translateX(18px)}.live-ai-optin input:focus-visible{outline:3px solid #9dd0ff;outline-offset:3px}.live-ai-optin input:disabled{opacity:.5;cursor:wait}@media(prefers-reduced-motion:reduce){.live-ai-optin input,.live-ai-optin input::before{transition:none}}
.reply-waiting-link{appearance:none;border:0;border-radius:7px;padding:6px 10px;background:#fff4e5;color:#c87516;font:inherit;cursor:pointer}.reply-waiting-link:hover{background:#ffe8c6;color:#a95e0e}.reply-waiting-link:focus-visible{outline:3px solid #ffd59d;outline-offset:2px}
.reply-section-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px;flex-wrap:wrap}.reply-section-heading h2,.reply-section-heading h3{margin:0}.reply-sort-tabs{display:flex;gap:5px;flex-wrap:wrap;padding:5px;border:1px solid #dfe8f6;border-radius:11px;background:#f8fbff}.reply-sort-tabs button{padding:7px 11px;border:0;border-radius:8px;background:transparent;color:#58728a;font:inherit;font-size:12px;cursor:pointer}.reply-sort-tabs button:hover,.reply-sort-tabs button:focus-visible,.reply-sort-tabs button.active{background:#e6f1ff;color:#2768e8;outline:none}.reply-sort-tabs button.active{font-weight:600;box-shadow:0 2px 7px rgba(57,139,255,.12)}
.reply-dashboard-nav{margin-top:4px;margin-bottom:18px}.reply-dashboard [data-reply-panel][hidden]{display:none!important}.reply-dashboard [data-reply-panel]>.card:first-child{margin-top:0}
.reply-vip-section{margin-top:26px}.reply-vip-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin:14px 0 18px}.reply-vip-metrics .card{margin:0!important}.reply-vip-metrics span{color:#6e879c;font-size:13px}.reply-vip-metrics strong{display:block;margin:9px 0;font-size:26px;color:#298bd6}.reply-vip-metrics small{color:#8ca0b1}.reply-vip-chip{padding:4px 10px;border-radius:6px;background:#fff0d7;color:#b66b13;font-size:12px;font-weight:600}.reply-affinity{color:#d47716}.reply-vip-section>.card{margin-bottom:16px}.reply-vip-section h3{margin-bottom:14px}@media(max-width:1100px){.reply-vip-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:700px){.reply-vip-metrics{grid-template-columns:1fr 1fr}}
.nav-group{display:grid;gap:4px}.nav-group-toggle{width:100%;border:0;background:transparent;text-align:left}.nav-group.has-active>.nav-group-toggle{color:#fff;background:#ffffff0b}.nav-chevron{margin-left:auto;font-size:18px;line-height:1;transition:transform .18s ease}.nav-group.open .nav-chevron{transform:rotate(180deg)}.nav-group:not(.open) .nav-submenu{display:none}.nav-submenu{display:grid;gap:3px;margin-left:20px;padding-left:10px;border-left:1px solid #ffffff1f}.nav-subitem{padding:10px 10px;font-size:13px}.nav-subitem svg{width:16px;height:16px}.nav-subitem.active{box-shadow:none!important;background:#3390ec!important}@media(max-width:1000px) and (min-width:731px){.nav-submenu{margin-left:0;padding-left:0;border:0}.nav-group-toggle,.nav-subitem{justify-content:center}.nav-chevron{display:none}}@media(max-width:730px){.nav-group{display:contents}.nav-group-toggle{display:none}.nav-group .nav-submenu{display:contents!important}}

/* Daily learning and group registration dashboard. */
.reply-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
.live-learn-today{color:#1479bd;background:#eff8ff;border-color:#c8e4f7;white-space:nowrap}.learn-today-dialog ul{padding-left:20px;color:#617c91;font-size:13px;line-height:1.9}
.group-daily-filter{display:flex;align-items:center;gap:22px;margin:20px 0;color:#7890a2;font-size:13px;flex-wrap:wrap}.group-daily-filter select{margin-left:8px;padding:9px 15px;border:1px solid #d9e7f1;border-radius:9px;background:#fff;color:#31516b}.group-daily-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:20px 0}.group-daily-stats .card{margin:0;padding:22px}.group-daily-stats span{color:#6e879c;font-size:14px}.group-daily-stats strong{display:block;margin:10px 0;font-size:32px;color:#298bd6}.group-daily-stats small{color:#8ca0b1}.group-daily-groups{margin-bottom:20px}.group-daily-groups>div{display:flex;gap:10px;flex-wrap:wrap}.group-daily-groups button{display:grid;gap:5px;padding:11px 15px;border:1px solid #dbe8f2;border-radius:10px;background:#f5faff;color:#31516b;text-align:left;cursor:pointer}.group-daily-groups button:hover{background:#eaf5ff;border-color:#9bcef2}.group-daily-groups button span{font-size:12px;color:#7890a2}.group-daily-status{display:inline-block;padding:4px 9px;border-radius:6px;font-size:12px}.group-daily-status.complete{background:#e7f8ef;color:#228b58}.group-daily-status.incomplete{background:#fff3e4;color:#bc721e}@media(max-width:900px){.reply-metrics,.group-daily-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.group-daily-stats{grid-template-columns:1fr}}
.group-daily-codes{display:flex;align-items:center;gap:9px;max-width:min(760px,100%);padding:8px 10px;border:1px solid #dbe8f2;border-radius:10px;background:#f7fbff}.group-daily-codes>span{font-size:12px;color:#6f879a;white-space:nowrap}.group-daily-codes code{min-width:120px;max-width:560px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#31516b;font:12px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace}.group-daily-codes .button{padding:6px 12px;white-space:nowrap}.group-daily-codes small{min-width:36px;color:#258458;font-size:11px}@media(max-width:760px){.group-daily-codes{width:100%;flex-wrap:wrap}.group-daily-codes code{order:3;width:100%;max-width:none;white-space:normal;overflow-wrap:anywhere}}
.group-daily-actions{display:flex;gap:6px;white-space:nowrap}.group-edit-button,.group-delete-button{padding:6px 10px;font-size:12px}.group-delete-button{color:#d84b4b;border-color:#f0caca;background:#fff}.group-delete-button:hover{background:#fff4f4}.desk-member-dialog select{width:100%;min-height:42px;padding:9px 11px;border:1px solid var(--hi-border);border-radius:7px;background:#f3f7fa;color:#456078;font:inherit}.desk-member-dialog select:disabled{opacity:.6}#group-edit-error{color:#a45238;background:#fff2ec;border-radius:7px;padding:9px;font-size:12px;line-height:1.7}
.live-private-alert-stack{position:fixed;right:24px;bottom:24px;z-index:30;width:min(360px,calc(100vw - 32px));display:flex;flex-direction:column;gap:10px}.live-private-alert{width:100%;display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--hi-border);border-radius:10px;background:#fff;box-shadow:0 8px 28px rgba(26,55,82,.2);text-align:left;color:var(--hi-text);cursor:pointer}.live-private-alert-avatar{width:46px;height:46px;display:grid;place-items:center;flex:none;border-radius:50%;background:#e1effc;color:#348ddd;font-size:20px}.live-private-alert-copy{min-width:0;display:flex;flex:1;flex-direction:column;gap:4px}.live-private-alert-copy strong,.live-private-alert-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.live-private-alert-copy small{color:#6c8498}.live-private-alert-close{font-size:22px;color:#9aabb8}

/* Youthful visual refresh: keep the existing layout while adding brighter color, depth and motion. */
:root{--hi-text:#253648;--hi-purple:#398bff;--hi-purple-dark:#2768e8;--hi-pink:#8b6cff;--hi-page:#f5f7ff;--hi-soft:#eef4ff;--hi-selected:#e9f1ff;--hi-border:#e1e8f5}
body,main,.page,.workspace,.content{background:linear-gradient(135deg,#f7f9ff 0%,#f1f7ff 55%,#f8f3ff 100%)}
.sidebar{background:linear-gradient(180deg,#1f3150 0%,#25395e 58%,#2d3568 100%);box-shadow:6px 0 24px rgba(39,73,130,.12)}
.brand-mark{background:linear-gradient(135deg,#3d9dff,#8c6cff);box-shadow:0 6px 18px rgba(74,126,237,.32)}
.nav-item.active{background:linear-gradient(135deg,#3b98ff,#586cf0);border-radius:12px;box-shadow:0 7px 18px rgba(55,120,236,.25)}
.page-heading,.page-title{background:linear-gradient(135deg,#edf6ff,#f7f1ff);border:1px solid #e2eafb;border-radius:18px;box-shadow:0 10px 28px rgba(55,86,145,.08)}
.card,.table-wrap,.stat,.panel,.desk,.live-desk{border-radius:16px;box-shadow:0 8px 24px rgba(50,80,130,.07)}
.button{border-radius:10px;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}.button:hover{transform:translateY(-1px);box-shadow:0 5px 14px rgba(55,120,236,.16)}.button.primary{background:linear-gradient(135deg,#398bff,#6e70f4);box-shadow:0 6px 16px rgba(57,139,255,.24)}
.live-account-chip,.live-conversation{border-radius:12px}.live-conversation.selected{background:linear-gradient(90deg,#edf6ff,#f8fbff);box-shadow:inset 3px 0 #398bff,0 4px 12px rgba(57,139,255,.12)}
.live-chat-header{background:linear-gradient(90deg,#fff,#f8fbff)}.live-messages{background:linear-gradient(135deg,#eef5fb,#f8f4ff)}.live-message>div{border-radius:15px;box-shadow:0 4px 12px rgba(50,80,130,.08)}.live-message.out>div{background:linear-gradient(135deg,#e6f7db,#f3fae9)}
.live-private-alert-stack{gap:12px}.live-private-alert{border-radius:14px;border-color:#dbe8fb;box-shadow:0 12px 30px rgba(45,83,145,.18);animation:hi-toast-in .2s ease-out}.live-private-alert-avatar{background:linear-gradient(135deg,#e5f1ff,#eee8ff);color:#4f75eb}
@keyframes hi-toast-in{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.button,.live-private-alert{transition:none;animation:none}.button:hover{transform:none}}
.ai-section-nav{position:sticky;top:0;z-index:8;display:flex;gap:8px;flex-wrap:wrap;margin:0 0 16px;padding:10px 12px;border:1px solid #dfe8f6;border-radius:14px;background:#ffffffdd;backdrop-filter:blur(10px);box-shadow:0 6px 18px rgba(49,83,139,.08)}.ai-section-nav button{padding:8px 13px;border:0;border-radius:9px;background:transparent;color:#4a6682;font:inherit;font-size:13px;cursor:pointer}.ai-section-nav button:hover,.ai-section-nav button:focus-visible,.ai-section-nav button.active{background:#eaf3ff;color:#2768e8;outline:none}.ai-section-nav button.active{font-weight:600}.ai-section-panel-hidden{display:none!important}

/* Keep long knowledge lists readable without pushing actions below the viewport. */
#ai-entries{max-height:min(62vh,640px);overflow-y:auto;overscroll-behavior:contain;padding-right:8px;scrollbar-gutter:stable}
#ai-entries .ai-entry p{white-space:pre-wrap;overflow-wrap:anywhere}
#ai-entries::-webkit-scrollbar{width:8px}#ai-entries::-webkit-scrollbar-thumb{background:#c7d8eb;border-radius:999px}#ai-entries::-webkit-scrollbar-track{background:#f3f7fc;border-radius:999px}
.ai-library-readonly{grid-template-columns:minmax(0,1fr)}.ai-library-readonly>.card:last-child{min-width:0}.ai-library-readonly>.card[hidden]{display:none}
@media(max-width:700px){#ai-entries{max-height:55vh}}

/* Keep navigation inside its column, including long dashboard names. */
#desk-shell .sidebar #navigation{overflow-x:hidden;overflow-y:auto;min-width:0;scrollbar-width:thin;scrollbar-color:#68839e55 transparent;overscroll-behavior:contain}
#desk-shell .sidebar #navigation::-webkit-scrollbar{width:5px;height:0}
#desk-shell .sidebar #navigation::-webkit-scrollbar-thumb{background:#68839e55;border-radius:8px}
#desk-shell .sidebar #navigation::-webkit-scrollbar-track{background:transparent}
#desk-shell .sidebar .nav-group,#desk-shell .sidebar .nav-submenu{min-width:0;max-width:100%}
#desk-shell .sidebar .nav-item{min-width:0;max-width:100%;gap:8px}
#desk-shell .sidebar .nav-item svg{flex-shrink:0}
#desk-shell .sidebar .nav-text{min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.5}
#desk-shell .sidebar .nav-count,#desk-shell .sidebar .nav-chevron{flex-shrink:0}
@media(min-width:1001px){
 #desk-shell .sidebar .nav-submenu{margin-left:12px;padding-left:6px}
 #desk-shell .sidebar .nav-subitem{padding:10px 6px;font-size:13px}
}

#live-search-results{flex:1;min-height:0;overflow:auto;padding:10px;scrollbar-width:thin;scrollbar-gutter:stable;overscroll-behavior:contain}
#live-search-results[hidden]{display:none!important}
#live-search-results:not([hidden])~#live-conversations{display:none}
#live-search-results .live-search-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
#live-search-results .live-search-heading .button{width:auto;margin:0;flex-shrink:0}
#live-search-results .button{display:flex;flex-direction:column;align-items:flex-start;gap:4px;width:100%;margin:6px 0;white-space:normal;text-align:left;overflow-wrap:anywhere}
#live-search-results small{color:#7b90aa}
#live-handoff-status:empty{display:none}

.host-report-controls-wrap{display:flex;flex-direction:column;gap:10px;min-width:0}.host-date-presets{display:flex;flex-wrap:wrap;gap:7px}.host-date-presets .button{padding:7px 13px;min-height:34px}.host-date-presets .button[aria-pressed="true"]{background:#e8f3ff;border-color:#3390ec;color:#2179dc}.host-report-controls-wrap .host-report-controls{flex-wrap:wrap}

/* Keep the top controls compact so the conversation receives the remaining height. */
.live-workspace{gap:4px;padding-top:3px}
.live-workspace .live-heading{display:flex;justify-content:space-between;align-items:center;flex-wrap:nowrap;gap:10px;min-height:26px;padding:0;border:0;border-radius:0;box-shadow:none;background:none}
.live-workspace .live-heading-title{flex:1 1 auto;display:flex;flex-direction:row;align-items:center;gap:8px;min-width:0}
.live-workspace .live-heading-copy{display:flex;align-items:center;gap:12px;min-width:0;flex:1}
.live-workspace .live-heading-title h1{flex-shrink:0;margin:0;padding:0;border:0;background:none;box-shadow:none;font-size:15px;line-height:22px;font-weight:700;white-space:nowrap}
.live-workspace .live-heading-title #live-count{flex:1;min-width:0;max-width:none;font-size:11px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.live-workspace .live-heading .live-host-reminder{flex-shrink:0;min-height:26px;padding:3px 8px;font-size:11px;margin:0}
.live-workspace .live-heading-actions{flex:0 0 auto;display:flex;flex-wrap:nowrap;justify-content:flex-end;gap:5px;min-width:0;max-width:100%}
.live-workspace .live-heading-actions .button{float:none;margin:0;white-space:nowrap;min-height:26px;padding:3px 7px;font-size:11px}
.live-workspace .live-heading [hidden]{display:none!important}
.live-workspace .live-account-strip{max-height:34px;padding:0;gap:6px}
.live-workspace .live-account-chip{min-height:26px;border-radius:8px}
.live-workspace .live-account-tab{min-height:26px;padding:2px 7px;gap:6px}
.live-workspace .live-account-chip .live-sync-toggle,.live-workspace .live-account-remove{min-height:26px;padding-top:3px;padding-bottom:3px}
@media(max-width:730px){
 .live-workspace .live-heading{flex-wrap:wrap;gap:5px}
 .live-workspace .live-heading-title{flex-basis:100%;gap:8px}
 .live-workspace .live-heading-copy{gap:8px}
 .live-workspace .live-heading-title h1{font-size:16px;line-height:24px}
 .live-workspace .live-heading-title #live-count{font-size:10px;line-height:16px}
 .live-workspace .live-heading-actions{flex-basis:100%;justify-content:flex-start;overflow-x:auto;scrollbar-width:thin}
 .live-workspace .live-heading-actions .button{font-size:11px;padding:5px 8px}
 .live-workspace .live-account-strip{max-height:42px}
 .live-workspace .live-account-chip,.live-workspace .live-account-tab{min-height:34px}
 .live-workspace .live-account-chip .live-sync-toggle,.live-workspace .live-account-remove{min-height:30px}
}

/* Group member avatars occupy a separate column from message content. */
.live-workspace .live-message.has-member-avatar{display:grid;grid-template-columns:34px minmax(0,1fr);column-gap:10px;row-gap:0;max-width:85%;min-width:0}
.live-workspace .has-member-avatar>.live-member-avatar{grid-column:1;grid-row:1 / span 2;align-self:start;display:grid;place-items:center;width:34px;height:34px;margin:21px 0 0;padding:0;border:1px solid #ffffff;border-radius:50%;overflow:hidden;background:#dcecf9;color:#3390ec;font-size:14px;cursor:pointer;box-shadow:0 1px 3px #26394d12}
.live-workspace .has-member-avatar>.live-member-avatar:disabled{cursor:default;opacity:1}
.live-workspace .has-member-avatar>.live-member-avatar:focus-visible{outline:2px solid #3390ec;outline-offset:2px}
.live-workspace .has-member-avatar>.live-message-sender{grid-column:2;display:block;min-width:0;max-width:100%;margin:0 0 5px;font-size:12px;line-height:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.live-workspace .has-member-avatar>div,.live-workspace .has-member-avatar>.live-message-translation,.live-workspace .has-member-avatar>small{grid-column:2;min-width:0}
.live-workspace .has-member-avatar>div{padding:9px 13px;line-height:1.6;border-radius:12px}
.live-workspace .has-member-avatar>.live-message-translation{margin:5px 0 0;padding:5px 9px;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.live-workspace .has-member-avatar>small{margin-top:6px;line-height:20px}
@media(max-width:730px){.live-workspace .live-message.has-member-avatar{max-width:95%;grid-template-columns:30px minmax(0,1fr);column-gap:8px}.live-workspace .has-member-avatar>.live-member-avatar{width:30px;height:30px}}


/* Scoped registration table: readable identifiers and separate allocation state. */
.group-allocation-table{margin-top:16px;scrollbar-color:#a9b9cb #edf2f7;scrollbar-width:thin}
.group-allocation-table:focus-visible{outline:2px solid #397fc0;outline-offset:3px}
.group-allocation-table table{table-layout:fixed;min-width:1570px}
.group-allocation-table th:nth-child(1){width:140px}.group-allocation-table th:nth-child(2){width:112px}.group-allocation-table th:nth-child(3){width:76px}.group-allocation-table th:nth-child(4){width:108px}.group-allocation-table th:nth-child(5){width:140px}.group-allocation-table th:nth-child(6){width:168px}.group-allocation-table th:nth-child(7){width:154px}.group-allocation-table th:nth-child(8){width:250px}.group-allocation-table th:nth-child(9){width:112px}.group-allocation-table th:nth-child(10){width:88px}.group-allocation-table th:nth-child(11){width:220px}
.group-allocation-table td{padding-top:18px;padding-bottom:18px;color:#3f5872;line-height:1.6}
.group-allocation-table .group-customer-code{white-space:nowrap;overflow-wrap:normal;word-break:normal;font-variant-numeric:tabular-nums;color:#243e58}
.group-delivery-host strong{font-size:14px;color:#243e58}.group-delivery-host small{white-space:nowrap;font-variant-numeric:tabular-nums;color:#536c85}
.group-delivery-empty{color:#667b8e}.group-delivery-state{display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.group-allocation-table .group-delivery-state small{margin-top:0;color:#536c85;line-height:1.45}
.group-delivery-state .button{padding:5px 10px;font-size:12px;white-space:nowrap}
.group-allocation-table .reply-waiting-link{display:block;width:100%;text-align:left;padding:8px 10px;border-radius:7px;background:#f0f5fa;color:#315675;line-height:1.5;overflow-wrap:normal;word-break:normal}
.group-allocation-table .reply-waiting-link:hover{background:#e5eef8;color:#23466a}.group-allocation-table td>small{color:#536c85}
.group-allocation-table .group-daily-actions{flex-wrap:nowrap;gap:6px}.group-allocation-table .group-daily-actions .button{padding:6px 9px;font-size:12px}
.group-daily-dashboard{min-width:0}.group-daily-dashboard .page-heading,.group-daily-dashboard .host-report-controls{flex-wrap:wrap;max-width:100%}
.group-allocation-table .group-daily-status.complete{color:#176b41}.group-allocation-table .group-daily-status.incomplete{color:#8b5115}
