:root{--bg:#f4f7fb;--surface:#fff;--text:#111827;--muted:#667085;--line:#e4e7ec;--accent:#111827;--soft:#eef2f7;--danger:#b42318;--warning:#b54708;--success:#027a48}*{box-sizing:border-box}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Tahoma,Arial,sans-serif;background:var(--bg);color:var(--text)}a{color:inherit;text-decoration:none}.topbar{height:72px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:32px;padding:0 4vw;position:sticky;top:0;z-index:5}.brand{display:flex;align-items:center;gap:10px}.brand-mark{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#111827;color:white;font-weight:800}.brand strong,.brand small{display:block}.brand small{font-size:11px;color:var(--muted);margin-top:2px}.topbar nav{display:flex;gap:8px;flex:1}.topbar nav a{padding:9px 12px;border-radius:9px;color:#475467}.topbar nav a:hover{background:#f2f4f7;color:#111827}.userbox{display:flex;align-items:center;gap:12px;color:#475467}.linkbtn{border:0;background:none;color:#b42318;cursor:pointer}.container{width:min(1180px,92vw);margin:32px auto 64px}.auth-container{min-height:90vh;display:grid;place-items:center}.auth-card{width:min(430px,92vw);background:#fff;border:1px solid var(--line);border-radius:20px;padding:32px;box-shadow:0 18px 50px rgba(16,24,40,.06)}.auth-brand{margin-bottom:24px}.auth-card h1{margin:0 0 8px}.form-grid{display:grid;gap:18px;margin-top:24px}.form-grid label{display:grid;gap:8px;font-size:14px;font-weight:600}input,select{width:100%;border:1px solid #d0d5dd;border-radius:10px;padding:12px 13px;background:#fff;font:inherit;outline:none}input:focus,select:focus{border-color:#667085;box-shadow:0 0 0 3px #f2f4f7}.btn{display:inline-flex;align-items:center;justify-content:center;padding:11px 16px;border:1px solid #d0d5dd;background:#fff;border-radius:10px;font-weight:700;cursor:pointer}.btn.primary{background:#111827;color:#fff;border-color:#111827}.hero{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin:12px 0 28px}.hero.compact{margin-bottom:20px}.hero h1{font-size:34px;line-height:1.1;margin:4px 0 8px}.eyebrow{font-size:12px;font-weight:800;letter-spacing:.12em;color:#667085;margin:0}.muted{color:var(--muted)}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:22px}.stats article{background:#fff;border:1px solid var(--line);border-radius:16px;padding:20px}.stats span{display:block;color:#667085;font-size:13px}.stats strong{display:block;margin-top:10px;font-size:30px}.panel{background:#fff;border:1px solid var(--line);border-radius:17px;padding:20px;margin-bottom:18px}.panel h2{margin:0 0 8px}.panel-head{display:flex;justify-content:space-between;align-items:center}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;min-width:760px}th,td{text-align:right;padding:13px 12px;border-bottom:1px solid #eaecf0;font-size:14px}th{font-size:12px;color:#667085;font-weight:700;background:#fcfcfd}tbody tr:hover{background:#fcfcfd}.case-link{font-weight:800;color:#344054}.status{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;background:#f2f4f7;font-size:12px;font-weight:700;color:#475467;white-space:nowrap}.status.big{font-size:13px;padding:8px 12px}.s-completed{background:#ecfdf3;color:#027a48}.s-manual_review,.s-missing_information,.s-exception{background:#fffaeb;color:#b54708}.s-cancelled{background:#fef3f2;color:#b42318}.s-understood,.s-validated,.s-ready,.s-email_sent,.s-waiting_internal_response,.s-response_received{background:#eff8ff;color:#175cd3}.empty{text-align:center;color:#98a2b3;padding:32px}.grid-2{display:grid;grid-template-columns:1.15fr .85fr;gap:18px}.details{display:grid;grid-template-columns:130px 1fr;gap:10px 18px}.details dt{color:#667085}.details dd{margin:0;font-weight:600}pre{background:#101828;color:#d0d5dd;border-radius:12px;padding:16px;overflow:auto;direction:ltr;text-align:left;font-size:12px;line-height:1.6}.status-form{display:flex;gap:10px}.status-form select{flex:1}.mt{margin-top:28px!important}.timeline{display:grid;gap:10px}.event{border:1px solid #eaecf0;border-radius:12px;padding:13px 14px;margin-top:10px}.event strong,.event small{display:block}.event small{color:#98a2b3;margin-top:3px}.event p{margin:8px 0 0;color:#475467}.alert{padding:12px;border-radius:10px}.alert.danger{background:#fef3f2;color:#b42318}@media(max-width:820px){.topbar{padding:0 18px}.topbar nav{display:none}.container{width:min(94vw,1180px);margin-top:20px}.stats{grid-template-columns:repeat(2,1fr)}.grid-2{grid-template-columns:1fr}.hero{align-items:flex-start;flex-direction:column}.hero h1{font-size:28px}.userbox>span{display:none}}@media(max-width:480px){.stats{grid-template-columns:1fr 1fr}.stats article{padding:16px}.stats strong{font-size:25px}.panel{padding:14px}.auth-card{padding:22px}}

.panel,.grid-2>*,.hero>div{min-width:0}.event p,.hero h1,.hero .muted,.details dd{overflow-wrap:anywhere}.details dd{min-width:0}.case-link{unicode-bidi:plaintext}.alert{margin-bottom:12px}.status-form{flex-wrap:wrap}.topbar{position:static}input[type=email]{direction:ltr;text-align:left}.form-grid{margin-top:16px}button:focus-visible,a:focus-visible{outline:3px solid #98a2b3;outline-offset:3px}@media(max-width:480px){.details{grid-template-columns:90px minmax(0,1fr);gap:10px}.topbar{gap:12px}.container{width:94vw}.hero h1{font-size:26px}}
.user-filters{display:grid;grid-template-columns:minmax(180px,2fr) minmax(140px,1fr) minmax(140px,1fr) auto;align-items:end;gap:12px}.user-filters label{display:grid;gap:8px;font-size:14px;font-weight:600;min-width:0}.cell-detail{display:block;color:var(--muted);margin-top:5px;overflow-wrap:anywhere;text-align:right}.user-table{min-width:680px}.pagination{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:14px;margin-top:20px}.alert.success{background:#ecfdf3;color:#05603a}.btn.danger{color:var(--danger);border-color:#fecdca}.archive-action{margin-top:20px;color:var(--danger);font-size:14px}.archive-action summary{cursor:pointer;line-height:1.6}.archive-action p{color:var(--muted)}.link-command{display:block;user-select:all;padding:12px;background:white;border:1px solid var(--line);border-radius:8px;overflow-wrap:anywhere;text-align:left}.telegram-settings{max-width:640px;margin-inline:auto}.userbox{min-width:0}.topbar{height:auto;min-height:72px;gap:18px;padding-block:12px}.topbar nav{flex-wrap:wrap}.topbar nav a{white-space:nowrap}.table-wrap:focus-visible{outline:2px solid var(--muted);outline-offset:3px}@media(max-width:820px){.topbar{flex-wrap:wrap}.topbar nav{display:flex;order:3;flex-basis:100%;gap:4px}.topbar nav a{padding:8px 10px;font-size:13px}.topbar .userbox{margin-inline-start:auto}.user-filters{grid-template-columns:1fr 1fr}.user-filters label:first-child{grid-column:1/-1}}@media(max-width:480px){.user-filters{grid-template-columns:1fr}.user-filters label:first-child{grid-column:auto}.link-command{font-size:12px}}

/* SalesOps AJAX/live update layer */
#ajax-progress{position:fixed;inset:0 0 auto 0;height:3px;z-index:9999;pointer-events:none;opacity:0;transition:opacity .16s ease;background:transparent;overflow:hidden}#ajax-progress span{display:block;width:34%;height:100%;background:var(--accent);transform:translateX(300%)}.ajax-busy #ajax-progress{opacity:1}.ajax-busy #ajax-progress span{animation:ajax-progress-run 1s ease-in-out infinite}@keyframes ajax-progress-run{0%{transform:translateX(300%)}100%{transform:translateX(-300%)}}.ajax-toast-region{position:fixed;inset:auto 20px 20px auto;z-index:10020;display:grid;gap:10px;width:min(390px,calc(100vw - 40px));pointer-events:none}.ajax-toast{background:#101828;color:#fff;border:1px solid rgba(255,255,255,.12);box-shadow:0 16px 42px rgba(16,24,40,.24);border-radius:12px;padding:12px 14px;font-size:14px;line-height:1.55;opacity:0;transform:translateY(8px);transition:opacity .18s ease,transform .18s ease;pointer-events:auto}.ajax-toast.show{opacity:1;transform:none}.ajax-toast-success{background:#05603a}.ajax-toast-error{background:#912018}.ajax-toast-info{background:#344054}.ajax-live-status{position:fixed;left:16px;bottom:16px;z-index:9990;display:flex;align-items:center;gap:7px;background:rgba(255,255,255,.94);backdrop-filter:blur(8px);border:1px solid var(--line);border-radius:999px;padding:7px 10px;color:#475467;font-size:12px;font-weight:700;box-shadow:0 8px 24px rgba(16,24,40,.08);pointer-events:none}.ajax-live-dot{width:8px;height:8px;border-radius:50%;background:var(--success);box-shadow:0 0 0 4px rgba(2,122,72,.10)}.ajax-live-status.is-busy .ajax-live-dot{background:#175cd3;box-shadow:0 0 0 4px rgba(23,92,211,.10);animation:ajax-live-pulse 1s ease-in-out infinite}.ajax-live-status.is-offline .ajax-live-dot{background:var(--danger);box-shadow:0 0 0 4px rgba(180,35,24,.10)}@keyframes ajax-live-pulse{50%{opacity:.35}}form[aria-busy="true"]{opacity:.72;pointer-events:none}.ajax-submit-busy{position:relative}.ajax-submit-busy::after{content:"";width:13px;height:13px;margin-inline-start:8px;border-radius:50%;border:2px solid currentColor;border-inline-end-color:transparent;animation:ajax-spin .65s linear infinite}@keyframes ajax-spin{to{transform:rotate(360deg)}}@media(max-width:600px){.ajax-toast-region{inset:auto 12px 12px 12px;width:auto}.ajax-live-status{left:10px;bottom:10px}.ajax-toast{font-size:13px}}

/* Customer Telegram conversation */
textarea{width:100%;border:1px solid #d0d5dd;border-radius:10px;padding:12px 13px;background:#fff;font:inherit;outline:none;resize:vertical;line-height:1.6}textarea:focus{border-color:#667085;box-shadow:0 0 0 3px #f2f4f7}.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.telegram-case-panel{display:flex;flex-direction:column;min-height:520px}.telegram-peer{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid var(--line)}.telegram-peer small{display:block;color:var(--muted);margin-top:2px}.telegram-avatar{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#e8f5ee;color:#05603a;font-weight:800;font-size:18px}.telegram-thread{display:flex;flex-direction:column;gap:9px;min-height:220px;max-height:520px;overflow:auto;padding:16px 2px;scrollbar-gutter:stable}.telegram-message{display:flex}.telegram-message.outbound{justify-content:flex-start}.telegram-message.inbound{justify-content:flex-end}.telegram-bubble{max-width:min(82%,620px);padding:10px 12px;border-radius:14px;background:#f2f4f7;border:1px solid #eaecf0}.telegram-message.outbound .telegram-bubble{background:#e8f5ee;border-color:#cde9d8;border-bottom-right-radius:4px}.telegram-message.inbound .telegram-bubble{background:#f5f7fa;border-bottom-left-radius:4px}.telegram-bubble p{margin:0;white-space:normal;overflow-wrap:anywhere;line-height:1.65}.telegram-bubble small{display:block;margin-top:6px;color:#7a8699;font-size:11px}.telegram-composer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end;margin-top:auto;padding-top:12px;border-top:1px solid var(--line)}.telegram-composer textarea{min-height:72px}.telegram-composer .btn{min-height:46px}.telegram-empty{padding:24px 0;text-align:center}.telegram-link-box{border:1px solid #b7dfc6;background:#f3fbf6;border-radius:12px;padding:14px;margin:14px 0}.telegram-account-details{margin-top:16px}.inline-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:14px}.customer-tabs{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:18px}.customer-tabs a{padding:8px 11px;border:1px solid var(--line);border-radius:999px;background:#fff;color:#475467;font-size:13px}.telegram-no-messages{padding:22px 10px}@media(max-width:620px){.telegram-composer{grid-template-columns:1fr}.telegram-composer .btn{width:100%}.telegram-bubble{max-width:92%}.telegram-case-panel{min-height:440px}}

/* AI conversation summary workflow */
.ai-summary-panel{position:relative;overflow:hidden}
.ai-summary-panel:before{content:"";position:absolute;inset-inline-start:0;top:0;bottom:0;width:4px;background:linear-gradient(180deg,currentColor,transparent);opacity:.18}
.ai-summary-meta,.ai-summary-actions,.summary-flow{display:flex;gap:.75rem;align-items:center;flex-wrap:wrap}
.ai-summary-meta{margin:.75rem 0 1rem;color:var(--muted,#667085);font-size:.92rem}
.ai-summary-meta span{padding:.45rem .7rem;border:1px solid rgba(127,127,127,.18);border-radius:.65rem;background:rgba(127,127,127,.04)}
.ai-summary-review label{display:grid;gap:.5rem;font-weight:700}
.ai-summary-review textarea,.ai-settings-panel textarea{width:100%;line-height:1.8;resize:vertical;min-height:220px}
.ai-summary-review textarea:disabled{opacity:.7}
.ai-summary-actions{margin-top:.8rem}
.ai-summary-output pre{white-space:pre-wrap;word-break:break-word;font-family:inherit;line-height:1.85;background:rgba(127,127,127,.055);padding:1rem;border-radius:.8rem;border:1px solid rgba(127,127,127,.14)}
.ai-summary-info{margin:.35rem 0 .75rem;color:var(--muted,#667085)}
.ai-summary-generate{margin-top:1rem}
.ai-summary-empty{padding:1rem;border:1px dashed rgba(127,127,127,.3);border-radius:.8rem;margin-bottom:.8rem}
.summary-flow{margin:.5rem 0 1rem}
.summary-flow span{padding:.65rem .85rem;border:1px solid rgba(127,127,127,.2);border-radius:.7rem;background:rgba(127,127,127,.05)}
.success-text{font-weight:700}
@media (max-width:720px){.summary-flow b{display:none}.summary-flow span{width:100%}.ai-summary-actions .btn{width:100%}}

/* Telegram customer inbox */
.telegram-inbox-page{display:flex;flex-direction:column;gap:16px;min-height:calc(100vh - 150px)}
.telegram-inbox-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px}
.telegram-inbox-heading h1{margin:.15rem 0}
.telegram-live-pill{display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border:1px solid var(--border,#dfe3e8);border-radius:999px;background:var(--surface,#fff);font-size:.82rem;font-weight:700}
.telegram-live-pill span{width:8px;height:8px;border-radius:50%;background:#18a957;box-shadow:0 0 0 4px rgba(24,169,87,.12)}
.telegram-inbox-shell{display:grid;grid-template-columns:minmax(270px,340px) minmax(0,1fr);min-height:670px;border:1px solid var(--border,#dfe3e8);border-radius:18px;overflow:hidden;background:var(--surface,#fff);box-shadow:0 8px 30px rgba(20,30,45,.06)}
.telegram-inbox-sidebar{border-left:1px solid var(--border,#e1e5ea);background:#fbfcfd;display:flex;flex-direction:column;min-width:0}
.telegram-inbox-search{display:flex;gap:8px;padding:12px;border-bottom:1px solid var(--border,#e1e5ea)}
.telegram-inbox-search input{min-width:0;flex:1}
.telegram-conversation-list{overflow:auto;max-height:720px}
.telegram-conversation-item{display:flex;gap:11px;padding:13px 12px;text-decoration:none;color:inherit;border-bottom:1px solid #edf0f3;transition:background .15s ease,border-color .15s ease}
.telegram-conversation-item:hover{background:#f2f7fb}
.telegram-conversation-item.active{background:#eaf5ff;border-inline-start:3px solid #229ed9}
.telegram-list-avatar,.telegram-avatar{display:grid;place-items:center;flex:0 0 auto;width:42px;height:42px;border-radius:50%;background:linear-gradient(135deg,#229ed9,#58bde9);color:#fff;font-weight:800}
.telegram-list-copy{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.telegram-list-top{display:flex;justify-content:space-between;gap:10px;align-items:center}
.telegram-list-top strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.telegram-list-top small{font-size:.69rem;color:#7b8794;white-space:nowrap}
.telegram-username{color:#229ed9}
.telegram-preview{font-size:.78rem;color:#66717d;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.telegram-preview.outgoing{color:#4f5f6f}
.telegram-list-empty{padding:30px 18px;text-align:center;color:#6a7480}
.telegram-inbox-main{display:flex;flex-direction:column;min-width:0;background:linear-gradient(180deg,#f7fbfe 0,#eef5f8 100%)}
.telegram-chat-header{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 16px;background:rgba(255,255,255,.96);border-bottom:1px solid var(--border,#e1e5ea)}
.telegram-peer-large .telegram-avatar{width:46px;height:46px}
.telegram-chat-actions{display:flex;gap:8px;flex-wrap:wrap}
.telegram-inbox-thread{flex:1;min-height:440px;max-height:590px;overflow:auto;padding:22px 22px 14px;background-image:radial-gradient(circle at 12px 12px,rgba(34,158,217,.035) 1.4px,transparent 1.5px);background-size:24px 24px}
.telegram-inbox-thread .telegram-message{display:flex;margin:7px 0}
.telegram-inbox-thread .telegram-message.outbound{justify-content:flex-start}
.telegram-inbox-thread .telegram-message.inbound{justify-content:flex-end}
.telegram-inbox-thread .telegram-bubble{max-width:min(76%,680px);padding:10px 12px;border-radius:15px;background:#fff;box-shadow:0 2px 8px rgba(25,45,65,.08)}
.telegram-inbox-thread .telegram-message.outbound .telegram-bubble{background:#dff3d8;border-bottom-right-radius:5px}
.telegram-inbox-thread .telegram-message.inbound .telegram-bubble{border-bottom-left-radius:5px}
.telegram-inbox-thread .telegram-bubble p{margin:0 0 5px;white-space:normal;overflow-wrap:anywhere}
.telegram-inbox-thread .telegram-bubble small{display:block;color:#73808c;font-size:.69rem}
.telegram-case-divider{display:flex;align-items:center;justify-content:center;gap:8px;margin:14px 0 8px;color:#6f7d88;font-size:.72rem}
.telegram-case-divider a,.telegram-case-divider span{padding:4px 8px;border-radius:999px;background:rgba(255,255,255,.82);border:1px solid rgba(80,110,130,.13)}
.telegram-inbox-composer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:12px;background:#fff;border-top:1px solid var(--border,#e1e5ea);align-items:end}
.telegram-inbox-composer textarea{resize:vertical;min-height:58px;max-height:160px}
.telegram-inbox-placeholder{margin:auto;text-align:center;padding:40px;color:#6b7785}
.telegram-inbox-placeholder.compact{padding:25px}
.telegram-placeholder-icon{display:grid;place-items:center;margin:0 auto 12px;width:62px;height:62px;border-radius:50%;background:#229ed9;color:#fff;font-size:1.8rem;transform:rotate(-12deg)}
.telegram-readonly-note{padding:13px 16px;background:#fff8df;border-top:1px solid #f2df9c;color:#75611c}
.telegram-case-history{background:#fff;border-top:1px solid var(--border,#e1e5ea);padding:10px 14px}
.telegram-case-history summary{cursor:pointer;font-weight:700}
.telegram-case-history-list{display:grid;gap:6px;padding-top:10px}
.telegram-case-history-list a{display:grid;grid-template-columns:auto 1fr auto;gap:9px;text-decoration:none;color:inherit;padding:7px 9px;border-radius:9px;background:#f8fafb}
.telegram-case-history-list span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.telegram-case-history-list small{color:#75818d}
@media (max-width:900px){
  .telegram-inbox-shell{grid-template-columns:1fr;min-height:0}
  .telegram-inbox-sidebar{border-left:0;border-bottom:1px solid var(--border,#e1e5ea);max-height:310px}
  .telegram-conversation-list{max-height:245px}
  .telegram-inbox-thread{min-height:420px;max-height:58vh;padding:14px}
  .telegram-chat-header{align-items:flex-start;flex-direction:column}
  .telegram-inbox-composer{grid-template-columns:1fr}
  .telegram-inbox-heading{align-items:flex-start;flex-direction:column}
}

/* Telegram mini inbox — fixed bottom popup */
.telegram-mini-root{position:fixed;inset:auto 22px 18px auto;z-index:80;direction:rtl;font-family:inherit}.telegram-mini-launcher{display:none;align-items:center;gap:8px;border:0;border-radius:999px;background:#111827;color:#fff;padding:11px 15px;box-shadow:0 16px 42px rgba(16,24,40,.24);font:inherit;font-weight:800;cursor:pointer}.telegram-mini-launcher-icon{font-size:16px}.telegram-mini-panel{width:min(720px,calc(100vw - 34px));height:560px;max-height:calc(100vh - 110px);display:flex;flex-direction:column;background:#fff;border:1px solid #d0d5dd;border-radius:18px 18px 10px 10px;box-shadow:0 24px 70px rgba(16,24,40,.26);overflow:hidden;transform:translateY(0);opacity:1;transition:transform .22s ease,opacity .18s ease,width .2s ease,height .2s ease}.telegram-mini-header{height:52px;min-height:52px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 10px 0 8px;background:#111827;color:#fff}.telegram-mini-title{display:flex;align-items:center;gap:8px;min-width:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:800;cursor:pointer;padding:10px}.telegram-mini-status-dot{width:8px;height:8px;border-radius:50%;background:#32d583;box-shadow:0 0 0 4px rgba(50,213,131,.14)}.telegram-mini-controls{display:flex;align-items:center;gap:3px}.telegram-mini-control{width:34px;height:34px;border:0;border-radius:9px;background:rgba(255,255,255,.08);color:#fff;display:grid;place-items:center;cursor:pointer;font:inherit;font-size:17px}.telegram-mini-control:hover{background:rgba(255,255,255,.18)}.telegram-mini-body{display:grid;grid-template-columns:230px minmax(0,1fr);min-height:0;flex:1;background:#fff}.telegram-mini-list{overflow:auto;border-left:1px solid var(--line);background:#f8fafc}.telegram-mini-list-item{width:100%;border:0;border-bottom:1px solid #eaecf0;background:transparent;padding:11px 12px;text-align:right;cursor:pointer;display:grid;gap:4px;font:inherit}.telegram-mini-list-item:hover{background:#f2f4f7}.telegram-mini-list-item.active{background:#eef4ff}.telegram-mini-list-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.telegram-mini-list-top strong{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.telegram-mini-list-top small{font-size:10px;color:#98a2b3;white-space:nowrap}.telegram-mini-list-user{font-size:10px;color:#667085;direction:ltr;text-align:right}.telegram-mini-list-preview{font-size:12px;color:#667085;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.telegram-mini-list-preview.outgoing:before{content:'أنت: ';color:#344054;font-weight:700}.telegram-mini-chat{min-width:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;background:#fff}.telegram-mini-peer{min-height:48px;padding:10px 14px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;font-size:13px;font-weight:800}.telegram-mini-peer small{font-weight:500;color:#667085;direction:ltr}.telegram-mini-thread{overflow:auto;padding:14px;background:linear-gradient(180deg,#f9fafb,#fff);display:flex;flex-direction:column;gap:9px}.telegram-mini-message{display:flex}.telegram-mini-message.inbound{justify-content:flex-start}.telegram-mini-message.outbound{justify-content:flex-end}.telegram-mini-bubble{max-width:82%;padding:9px 11px;border-radius:14px;background:#f2f4f7;border:1px solid #eaecf0;box-shadow:0 1px 2px rgba(16,24,40,.04)}.telegram-mini-message.outbound .telegram-mini-bubble{background:#111827;color:#fff;border-color:#111827}.telegram-mini-bubble p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.6}.telegram-mini-bubble small{display:block;margin-top:5px;font-size:10px;color:#98a2b3}.telegram-mini-message.outbound .telegram-mini-bubble small{color:#d0d5dd}.telegram-mini-composer{display:flex;gap:8px;padding:10px;border-top:1px solid var(--line);background:#fff}.telegram-mini-composer textarea{min-width:0;flex:1;resize:none;border:1px solid #d0d5dd;border-radius:11px;padding:9px 10px;font:inherit;outline:none}.telegram-mini-composer textarea:focus{border-color:#667085;box-shadow:0 0 0 3px #f2f4f7}.telegram-mini-composer .btn{align-self:stretch}.telegram-mini-loading,.telegram-mini-empty{padding:22px 14px;text-align:center;color:#98a2b3;font-size:12px}.telegram-mini-badge{min-width:19px;height:19px;border-radius:999px;padding:0 5px;display:inline-flex;align-items:center;justify-content:center;background:#f04438;color:#fff;font-size:10px;line-height:1}.telegram-mini-root.is-minimized .telegram-mini-panel{width:310px;height:52px;max-height:52px}.telegram-mini-root.is-minimized .telegram-mini-body{display:none}.telegram-mini-root.is-hidden .telegram-mini-panel{display:none}.telegram-mini-root.is-hidden .telegram-mini-launcher{display:flex}.telegram-mini-root.is-opening .telegram-mini-panel{animation:telegramMiniRise .2s ease-out}.telegram-mini-root.is-offline .telegram-mini-status-dot{background:#f79009;box-shadow:0 0 0 4px rgba(247,144,9,.14)}@keyframes telegramMiniRise{from{transform:translateY(24px);opacity:.3}to{transform:translateY(0);opacity:1}}@media(max-width:820px){.telegram-mini-root{inset:auto 8px 8px 8px}.telegram-mini-panel{width:100%;height:min(68vh,560px);max-height:calc(100vh - 80px);border-radius:16px}.telegram-mini-root.is-minimized .telegram-mini-panel{width:100%;height:52px}.telegram-mini-body{grid-template-columns:150px minmax(0,1fr)}.telegram-mini-list-item{padding:10px 8px}.telegram-mini-list-top small{display:none}.telegram-mini-bubble{max-width:92%}}@media(max-width:520px){.telegram-mini-panel{height:min(74vh,620px)}.telegram-mini-body{grid-template-columns:118px minmax(0,1fr)}.telegram-mini-list-user{display:none}.telegram-mini-list-preview{font-size:11px}.telegram-mini-list-top strong{font-size:12px}.telegram-mini-thread{padding:10px}.telegram-mini-composer{padding:8px}.telegram-mini-composer .btn{padding-inline:12px}.telegram-mini-control{width:32px;height:32px}}
.telegram-mini-list-item.unread{background:#fff7f6}.telegram-mini-list-item.unread .telegram-mini-list-top strong:after{content:'';display:inline-block;width:7px;height:7px;margin-inline-start:7px;border-radius:50%;background:#f04438;vertical-align:middle}.telegram-mini-root.is-live .telegram-mini-status-dot{background:#12b76a;animation:telegramLivePulse 1.8s ease-in-out infinite}@keyframes telegramLivePulse{0%,100%{box-shadow:0 0 0 3px rgba(18,183,106,.12)}50%{box-shadow:0 0 0 7px rgba(18,183,106,.04)}}

/* alpha.6 — compact Telegram mini messenger */
.telegram-mini-root{inset:auto 16px 14px auto}
.telegram-mini-panel{width:min(360px,calc(100vw - 24px));height:420px;max-height:calc(100vh - 88px);border-radius:16px;box-shadow:0 18px 52px rgba(16,24,40,.22)}
.telegram-mini-header{height:46px;min-height:46px;padding-inline:7px}
.telegram-mini-title{padding:8px;font-size:13px}
.telegram-mini-control{width:30px;height:30px;border-radius:8px;font-size:15px}
.telegram-mini-body{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:76px minmax(0,1fr)}
.telegram-mini-list{display:flex;gap:6px;overflow-x:auto;overflow-y:hidden;border-left:0;border-bottom:1px solid var(--line);padding:7px;background:#f8fafc;scrollbar-width:thin}
.telegram-mini-list-item{flex:0 0 128px;min-width:128px;max-width:128px;border:1px solid #eaecf0;border-radius:10px;background:#fff;padding:8px;text-align:right;display:grid;gap:2px}
.telegram-mini-list-item.active{border-color:#b2ccff;background:#eef4ff}
.telegram-mini-list-top strong{font-size:12px}
.telegram-mini-list-top small{font-size:9px}
.telegram-mini-list-user{display:none}
.telegram-mini-list-preview{font-size:10px}
.telegram-mini-chat{min-height:0;grid-template-rows:40px minmax(0,1fr) auto}
.telegram-mini-peer{min-height:40px;padding:7px 10px;font-size:12px}
.telegram-mini-thread{padding:10px;gap:7px}
.telegram-mini-bubble{max-width:88%;padding:7px 9px;border-radius:12px}
.telegram-mini-bubble p{font-size:12px;line-height:1.5}
.telegram-mini-bubble small{font-size:9px;margin-top:3px}
.telegram-mini-composer{padding:7px;gap:6px}
.telegram-mini-composer textarea{min-height:38px;max-height:84px;padding:7px 8px;border-radius:9px;font-size:12px}
.telegram-mini-composer .btn{padding:7px 11px;font-size:12px}
.telegram-mini-root.is-minimized .telegram-mini-panel{width:276px;height:46px;max-height:46px}
.telegram-mini-launcher{padding:9px 12px;font-size:12px;box-shadow:0 12px 32px rgba(16,24,40,.2)}
@media(max-width:520px){
  .telegram-mini-root{inset:auto 6px 6px 6px}
  .telegram-mini-panel{width:100%;height:min(52vh,420px);max-height:calc(100vh - 64px);border-radius:14px}
  .telegram-mini-root.is-minimized .telegram-mini-panel{width:100%;height:46px}
  .telegram-mini-body{grid-template-rows:72px minmax(0,1fr)}
  .telegram-mini-list-item{flex-basis:120px;min-width:120px;max-width:120px;padding:7px}
  .telegram-mini-thread{padding:8px}
}

/* Telegram conversation AI review workbench */
.telegram-ai-workbench{margin:0 12px 12px;padding:14px;border:1px solid #d7deea;border-radius:14px;background:#fff;box-shadow:0 5px 18px rgba(16,24,40,.055);display:grid;gap:12px}
.telegram-ai-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.telegram-ai-head .eyebrow{margin:0 0 2px}.telegram-ai-head strong{display:block;font-size:1rem}.telegram-ai-head small{display:block;margin-top:3px;color:#667085}.telegram-ai-review-badge{white-space:nowrap;border-radius:999px;padding:5px 9px;background:#fff7e8;color:#7a4d00;font-size:.72rem;font-weight:800;border:1px solid #f3d59a}.telegram-ai-actions{display:flex;gap:8px;flex-wrap:wrap}.telegram-ai-status{padding:8px 10px;border-radius:9px;font-size:.82rem}.telegram-ai-status.is-loading{background:#eef4ff;color:#3448a4}.telegram-ai-status.is-ready{background:#ecfdf3;color:#067647}.telegram-ai-status.is-error{background:#fef3f2;color:#b42318}.telegram-ai-result{display:grid;gap:8px;padding-top:11px;border-top:1px solid #eaecf0}.telegram-ai-result[hidden]{display:none!important}.telegram-ai-result label{display:grid;gap:6px;font-weight:800}.telegram-ai-result textarea{width:100%;resize:vertical;min-height:118px;line-height:1.65}.telegram-ai-result small{color:#667085}.telegram-ai-reply-form textarea{min-height:132px}.telegram-ai-send-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.telegram-ai-send-row .muted{font-size:.78rem}.telegram-ai-workbench.is-busy .telegram-ai-actions button:not(:disabled){opacity:.65}.telegram-ai-summary-result textarea{background:#f8fafc}
@media(max-width:720px){.telegram-ai-workbench{margin:0 8px 8px;padding:11px}.telegram-ai-head{flex-direction:column}.telegram-ai-review-badge{white-space:normal}.telegram-ai-actions{display:grid;grid-template-columns:1fr}.telegram-ai-send-row{align-items:stretch;flex-direction:column}.telegram-ai-send-row .btn{width:100%}}
