/* V46 Telegram channel — Telegram-like workspace layered over the call-center dashboard. */
:root{
  --tg-blue:#3390ec;--tg-blue-dark:#2b7fd4;--tg-brand:#2AABEE;
  --tg-bg:#ffffff;--tg-side:#ffffff;--tg-border:#e3e7eb;--tg-text:#0f1419;--tg-muted:#707579;
  --tg-hover:#f4f4f5;--tg-active:#3390ec;--tg-chat-bg:#c8d7b1;
  --tg-in:#ffffff;--tg-out:#e3fee0;--tg-out-meta:#4fae4e;--tg-in-meta:#a0acb6;
  --tg-quote-in:#3390ec;--tg-quote-out:#4fae4e;--tg-day:rgba(0,0,0,.22);
}
[data-theme="dark"]{
  --tg-bg:#212121;--tg-side:#212121;--tg-border:#303030;--tg-text:#ffffff;--tg-muted:#aaaaaa;
  --tg-hover:#2c2c2c;--tg-active:#8774e1;--tg-chat-bg:#0f0f0f;
  --tg-in:#212121;--tg-out:#766ac8;--tg-out-meta:#e8e4ff;--tg-in-meta:#8f8f8f;
  --tg-quote-in:#8774e1;--tg-quote-out:#ffffff;--tg-day:rgba(255,255,255,.12);
}
.tg-logo{width:22px;height:22px;flex:0 0 auto;display:block}
.tg-scope svg:not(.tg-logo),.tg-menu svg,.tg-modal svg:not(.tg-logo){width:22px;height:22px;display:block}

/* launch button next to "العملاء" in the workspace top bar */
.tg-launch{display:inline-flex;align-items:center;gap:7px;height:38px;padding:0 12px 0 14px;border-radius:19px;border:1px solid #cfe6f7;background:#eef8fe;color:#1d77b9;font:700 14px/1 Cairo,'IBM Plex Sans Arabic',sans-serif;cursor:pointer;position:relative;white-space:nowrap;flex:0 0 auto}
.tg-launch:hover{background:#dff1fd}
.cc-contacts-head .tg-launch{margin-inline-start:10px;margin-inline-end:auto;height:34px;align-self:center}
.tg-launch.tg-off{border-style:dashed}
.tg-launch-badge,.tg-unread{min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:var(--tg-blue);color:#fff;font:700 12px/20px system-ui,sans-serif;text-align:center}
[data-theme="dark"] .tg-launch{background:#1b2a36;border-color:#24435a;color:#7cc4f5}
.tg-nav-icon .tg-logo{width:18px;height:18px;display:inline-block;vertical-align:middle}

.tg-launch.active{background:var(--tg-blue);border-color:var(--tg-blue);color:#fff}
.tg-launch.active .tg-launch-badge{background:#fff;color:var(--tg-blue)!important}

/* Telegram inside the chat workspace: same columns, WhatsApp content hidden while Telegram is shown */
/* Telegram tab next to الكل / معلقة / أرشيف */
.tg-filter-tab{display:inline-flex!important;align-items:center;justify-content:center;gap:5px}
.tg-filter-tab .tg-logo{width:17px;height:17px}

.cc-chat-layout.tg-mode .cc-contacts-column>:not(.cc-contacts-head):not(.elmujib-filter-tabs):not(#tgTop):not(#tgSide){display:none!important}
.tg-top{display:flex;flex-direction:column;justify-content:center;flex:0 0 auto;box-sizing:border-box;overflow:hidden}
.cc-chat-layout.tg-mode .cc-chat-column>:not(#tgMain){display:none!important}
.cc-chat-layout.tg-mode .cc-chat-column{display:flex;flex-direction:column;padding:0;overflow:hidden}
.tg-scope{color:var(--tg-text);font-family:'IBM Plex Sans Arabic',Cairo,system-ui,sans-serif}
.tg-scope.hidden{display:none!important}
.tg-side{flex:1 1 auto;display:flex;flex-direction:column;min-height:0;background:var(--tg-side)}
.tg-side-head{display:flex;align-items:center;gap:8px;padding:10px 12px 6px}
.tg-brand{display:flex;align-items:center;gap:10px;flex:1;min-width:0}
.tg-brand .tg-logo{width:34px;height:34px}
.tg-brand strong{display:block;font-size:17px}
.tg-brand small{display:block;color:var(--tg-muted);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tg-icon-btn{width:40px;height:40px;border:0;border-radius:50%;background:transparent;color:var(--tg-muted);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;flex:0 0 auto;padding:0}
.tg-icon-btn:hover{background:var(--tg-hover)}
.tg-icon-btn.hidden{display:none}
.tg-search{padding:0 12px 8px}
.tg-search input{width:100%;height:40px;border-radius:20px;border:2px solid transparent;background:var(--tg-hover);color:var(--tg-text);padding:0 16px;font:inherit;font-size:15px;outline:none;box-sizing:border-box}
.tg-search input:focus{border-color:var(--tg-blue);background:var(--tg-bg)}
.tg-tabs{display:flex;gap:4px;padding:0 10px;border-bottom:1px solid var(--tg-border)}
.tg-tab{flex:1;border:0;background:none;color:var(--tg-muted);font:600 14px/1 inherit;font-family:inherit;padding:12px 6px 11px;border-bottom:3px solid transparent;cursor:pointer}
.tg-tab.active{color:var(--tg-blue);border-bottom-color:var(--tg-blue)}
.tg-tab span:not(:empty){display:inline-block;margin-inline-start:4px;min-width:18px;padding:0 5px;border-radius:9px;background:var(--tg-muted);color:#fff;font-size:11px;line-height:18px}
.tg-tab.active span:not(:empty){background:var(--tg-blue)}
.tg-list{flex:1;overflow-y:auto;padding:6px}
.tg-list-empty{padding:40px 16px;text-align:center;color:var(--tg-muted);line-height:2}
.tg-item{display:flex;gap:10px;align-items:center;padding:8px 9px;border-radius:12px;cursor:pointer;position:relative}
.tg-item:hover{background:var(--tg-hover)}
.tg-item.active{background:var(--tg-active);color:#fff}
.tg-item.active time,.tg-item.active .tg-item-last,.tg-item.active .tg-list-tick{color:#fff!important}
.tg-item.active .tg-unread{background:#fff;color:var(--tg-active)!important}
.tg-avatar{width:54px;height:54px;border-radius:50%;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:19px;flex:0 0 auto;font-family:system-ui,sans-serif}
.tg-avatar-sm{width:42px;height:42px;font-size:16px}
.tg-item-body{flex:1;min-width:0}
.tg-item-top,.tg-item-bottom{display:flex;align-items:center;gap:6px}
.tg-item-top strong{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15.5px}
.tg-item-top time{color:var(--tg-muted);font-size:12px;flex:0 0 auto}
.tg-item-bottom{margin-top:3px}
.tg-item-last{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--tg-muted);font-size:14.5px;display:flex;align-items:center;gap:3px}
.tg-list-tick{color:var(--tg-out-meta);display:inline-flex}
.tg-list-tick svg{width:17px!important;height:11px!important}
.tg-item-archive{display:none;width:30px;height:30px;border:0;border-radius:50%;background:transparent;color:inherit;cursor:pointer;padding:4px;opacity:.75}
.tg-item-archive svg{width:20px!important;height:20px!important}
.tg-item:hover .tg-item-archive{display:inline-flex}
.tg-item-archive:hover{opacity:1;background:rgba(0,0,0,.08)}
.tg-typing-text{color:var(--tg-blue)!important}

/* main area */
.tg-main{flex:1 1 auto;min-width:0;min-height:0;height:100%;display:flex;flex-direction:column;border-radius:inherit;overflow:hidden;background:var(--tg-chat-bg);background-image:radial-gradient(rgba(255,255,255,.18) 1px,transparent 1.5px),linear-gradient(135deg,#d0dfb6 0%,#a8c69a 45%,#c6d6a5 100%);background-size:22px 22px,100% 100%}
[data-theme="dark"] .tg-main{background-image:radial-gradient(rgba(255,255,255,.04) 1px,transparent 1.5px);background-size:22px 22px}
.tg-empty-main{flex:1;display:flex;align-items:center;justify-content:center}
.tg-empty-main>div{text-align:center;color:#fff;background:var(--tg-day);padding:14px 22px;border-radius:18px}
.tg-empty-main .tg-logo{width:64px;height:64px;margin:0 auto 6px}
.tg-empty-main p{margin:0;font-weight:600}
.tg-empty-main.hidden,.tg-chat.hidden{display:none}
.tg-chat{flex:1;display:flex;flex-direction:column;min-height:0}
.tg-chat-head{display:flex;align-items:center;gap:10px;padding:8px 14px;background:var(--tg-bg);border-bottom:1px solid var(--tg-border)}
.tg-chat-title{flex:1;min-width:0}
.tg-chat-title strong{display:block;font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tg-chat-title small{display:block;font-size:13px;color:var(--tg-muted)}
.tg-mobile-back{display:none}
.tg-messages{flex:1;overflow-y:auto;padding:10px max(14px,calc((100% - 760px)/2)) 12px;display:flex;flex-direction:column;gap:3px}
.tg-loading{color:#fff;text-align:center;margin:16px auto;background:var(--tg-day);padding:5px 14px;border-radius:14px;font-size:13px;align-self:center}
.tg-day{display:flex;justify-content:center;margin:10px 0 6px;position:static}
.tg-day span{background:var(--tg-day);color:#fff!important;padding:3px 11px;border-radius:14px;font-size:13px;font-weight:600;text-shadow:none;-webkit-text-stroke:0}
.tg-day.tg-service{position:static}
.tg-row{display:flex}
.tg-row.out{justify-content:flex-start}
.tg-row.in{justify-content:flex-end}
.tg-msg{position:relative;min-width:0;max-width:min(480px,78%);padding:6px 9px 6px;border-radius:15px;background:var(--tg-in);box-shadow:0 1px 2px rgba(16,35,47,.15);font-size:15px;line-height:1.45;word-wrap:break-word;overflow-wrap:anywhere;transition:background .3s}
.tg-msg.out{background:var(--tg-out);border-bottom-right-radius:5px}
.tg-msg.in{border-bottom-left-radius:5px}
.tg-msg.bare{background:none;box-shadow:none;padding:0}
.tg-msg.tg-flash{background:#bfe0ff!important}
.tg-text{white-space:normal;unicode-bidi:plaintext;text-align:start}
.tg-text a{color:var(--tg-blue)}
[data-theme="dark"] .tg-msg.out .tg-text a{color:#fff;text-decoration:underline}
.tg-sender{font-weight:700;font-size:13.5px;color:var(--tg-blue);margin-bottom:1px}
.tg-meta{float:left;display:inline-flex;align-items:center;gap:4px;margin:6px 10px -3px 0;font-size:12px;color:var(--tg-in-meta);position:relative;top:3px;white-space:nowrap;user-select:none}
.tg-msg.out .tg-meta{color:var(--tg-out-meta)}
.tg-msg.media-only .tg-meta{float:none;display:flex;justify-content:flex-start;margin:4px 0 0}
.tg-agent{font-weight:600;opacity:.85;max-width:110px;overflow:hidden;text-overflow:ellipsis}
.tg-ticks{display:inline-flex;cursor:pointer}
.tg-tick{width:16px!important;height:11px!important}
.tg-tick2{width:20px!important}
.tg-quote{display:flex;flex-direction:column;border-right:3px solid var(--tg-quote-in);background:rgba(51,144,236,.08);border-radius:6px;padding:3px 8px;margin:2px 0 5px;cursor:pointer;font-size:13.5px;max-width:100%}
.tg-msg.out .tg-quote{border-right-color:var(--tg-quote-out);background:rgba(79,174,78,.12)}
[data-theme="dark"] .tg-msg.out .tg-quote{background:rgba(255,255,255,.12)}
.tg-quote b{color:var(--tg-quote-in);font-size:13px}
.tg-msg.out .tg-quote b{color:var(--tg-out-meta)}
.tg-quote{min-width:0}
.tg-quote span,.tg-quote b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:.85}
.tg-msg-reply{position:absolute;top:50%;transform:translateY(-50%);left:-42px;width:32px;height:32px;border-radius:50%;border:0;background:rgba(0,0,0,.25);color:#fff;display:none;align-items:center;justify-content:center;cursor:pointer;padding:6px}
.tg-msg.in .tg-msg-reply{left:auto;right:-42px}
.tg-msg-reply svg{width:18px!important;height:18px!important}
.tg-msg:hover .tg-msg-reply{display:inline-flex}
.tg-photo img{display:block;max-width:100%;max-height:360px;border-radius:11px;margin:-2px -5px 2px;min-width:120px;background:rgba(0,0,0,.06)}
.tg-sticker{width:160px;height:160px;object-fit:contain}
.tg-sticker-emoji{font-size:64px;line-height:1.1}
.tg-video{max-width:100%;max-height:340px;border-radius:11px;display:block}
.tg-video.tg-round{width:220px;height:220px;border-radius:50%;object-fit:cover}
.tg-doc{display:flex;gap:10px;align-items:center;color:inherit;text-decoration:none;padding:3px 0;min-width:200px}
.tg-doc-icon{width:46px;height:46px;border-radius:50%;background:var(--tg-blue);color:#fff;display:flex;align-items:center;justify-content:center;flex:0 0 auto;font-size:20px}
.tg-msg.out .tg-doc-icon{background:var(--tg-out-meta)}
.tg-doc-name{display:block;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:260px}
.tg-doc small{color:var(--tg-muted);font-size:12.5px}
.tg-audio audio{width:260px;max-width:100%}
.tg-unsupported,.tg-deleted{color:var(--tg-muted);font-style:italic}
/* voice note */
.tg-voice{display:flex;align-items:center;gap:10px;min-width:220px;padding:2px 0}
.tg-voice-play{width:44px;height:44px;border-radius:50%;border:0;background:var(--tg-blue);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;flex:0 0 auto;padding:10px}
.tg-msg.out .tg-voice-play{background:var(--tg-out-meta)}
[data-theme="dark"] .tg-msg.out .tg-voice-play{background:#fff;color:#766ac8}
.tg-voice-track{flex:1;display:flex;flex-direction:column;gap:5px}
.tg-voice-bar{height:22px;position:relative;cursor:pointer;background:repeating-linear-gradient(90deg,rgba(51,144,236,.35) 0 2px,transparent 2px 5px);border-radius:2px;mask:linear-gradient(#000,#000)}
.tg-msg.out .tg-voice-bar{background:repeating-linear-gradient(90deg,rgba(79,174,78,.45) 0 2px,transparent 2px 5px)}
.tg-voice-bar i{position:absolute;inset:0 0 0 auto;width:0;background:repeating-linear-gradient(90deg,var(--tg-blue) 0 2px,transparent 2px 5px)}
.tg-msg.out .tg-voice-bar i{background:repeating-linear-gradient(90deg,var(--tg-out-meta) 0 2px,transparent 2px 5px)}
.tg-voice-time{font-size:12.5px;color:var(--tg-in-meta)}
.tg-msg.out .tg-voice-time{color:var(--tg-out-meta)}

/* composer */
.tg-reply-bar{display:flex;align-items:center;gap:10px;background:var(--tg-bg);margin:0 max(14px,calc((100% - 760px)/2));padding:6px 10px;border-radius:14px 14px 0 0;border-bottom:1px solid var(--tg-border)}
.tg-reply-bar.hidden{display:none}
.tg-reply-icon{color:var(--tg-blue)}
.tg-reply-bar>div{flex:1;min-width:0;border-right:3px solid var(--tg-blue);padding-right:8px}
.tg-reply-bar b{display:block;color:var(--tg-blue);font-size:13.5px}
.tg-reply-bar span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13.5px;color:var(--tg-muted)}
.tg-composer,.tg-recording{display:flex;align-items:flex-end;gap:6px;margin:0 max(14px,calc((100% - 760px)/2)) 14px;background:var(--tg-bg);border-radius:18px;padding:5px 6px;box-shadow:0 1px 2px rgba(16,35,47,.15)}
.tg-reply-bar:not(.hidden)+.tg-composer{border-radius:0 0 18px 18px}
.tg-composer.hidden,.tg-recording.hidden{display:none}
.tg-composer.tg-disabled{opacity:.55;pointer-events:none}
.tg-composer textarea{flex:1;border:0;outline:none;resize:none;background:transparent;color:var(--tg-text);font:inherit;font-size:15.5px;line-height:1.4;padding:9px 4px;max-height:160px;min-height:22px}
.tg-send-btn{color:var(--tg-blue)}
.tg-send-btn:hover{background:rgba(51,144,236,.1)}
.tg-recording{align-items:center;padding:6px 8px}
.tg-rec-dot{width:11px;height:11px;border-radius:50%;background:#e53935;animation:tg-pulse 1s infinite}
.tg-recording b{font-variant-numeric:tabular-nums;min-width:42px}
.tg-rec-hint{flex:1;color:var(--tg-muted)}
#tgRecCancel{color:#e53935}
@keyframes tg-pulse{50%{opacity:.25}}

/* context menu + modals */
.tg-menu{position:fixed;z-index:2600;min-width:190px;background:var(--tg-bg);color:var(--tg-text);border-radius:12px;box-shadow:0 6px 24px rgba(0,0,0,.22);padding:6px;font-family:'IBM Plex Sans Arabic',Cairo,sans-serif}
.tg-menu.hidden{display:none}
.tg-menu button{display:flex;align-items:center;gap:12px;width:100%;border:0;background:none;color:inherit;font:inherit;font-size:14.5px;padding:8px 12px;border-radius:8px;cursor:pointer;text-align:start}
.tg-menu button:hover{background:var(--tg-hover)}
.tg-menu svg{width:20px!important;height:20px!important;color:var(--tg-muted)}
.tg-modal{z-index:2500}
.tg-modal-card{background:var(--tg-bg);color:var(--tg-text);border-radius:18px;width:min(440px,92vw);max-height:90vh;overflow-y:auto;padding:16px 18px 20px;font-family:'IBM Plex Sans Arabic',Cairo,sans-serif;box-shadow:0 20px 50px rgba(0,0,0,.3)}
.tg-modal-head{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.tg-modal-head strong{flex:1;font-size:17px}
.tg-help{color:var(--tg-muted);font-size:14px;line-height:1.7;margin:6px 0 12px}
.tg-btn{height:42px;padding:0 20px;border:0;border-radius:12px;background:var(--tg-blue);color:#fff;font:700 15px/1 inherit;font-family:inherit;cursor:pointer}
.tg-btn:hover{background:var(--tg-blue-dark)}
.tg-btn:disabled{opacity:.5;cursor:not-allowed}
.tg-btn-ghost{background:var(--tg-hover);color:var(--tg-text)}
.tg-btn-ghost:hover{background:var(--tg-border)}
.tg-btn-danger{background:#e53935}
.tg-btn-danger:hover{background:#c62828}
.tg-admin-actions{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}
.tg-error{background:#fdecea;color:#b71c1c;border-radius:10px;padding:8px 12px;margin-bottom:10px;font-size:14px}
.tg-linked{display:flex;gap:12px;align-items:center;background:var(--tg-hover);border-radius:14px;padding:12px}
.tg-linked .tg-logo{width:44px;height:44px}
.tg-linked small{display:block;color:var(--tg-muted);font-size:13px}
.tg-seen-row{display:flex;gap:12px;align-items:center;padding:10px 4px;border-bottom:1px solid var(--tg-border)}
.tg-seen-row:last-child{border-bottom:0}
.tg-seen-row svg{color:var(--tg-out-meta);width:22px!important}
.tg-seen-row.unseen svg{color:var(--tg-muted)}
.tg-seen-row small{display:block;color:var(--tg-muted);font-size:13px}

/* mobile: the workspace's own list/chat switch (cc-mobile-chat-open) also drives Telegram */
@media (max-width:760px){
  .tg-mobile-back{display:inline-flex}
  .tg-filter-tab>span:not(.elmujib-filter-count){display:none}
  .tg-msg{max-width:86%}
  .tg-msg-reply{display:none!important}
  .tg-launch{padding:0 10px;font-size:13px}
  .tg-item-archive{display:inline-flex}
}

/* Compact sizing: the four tabs share the row equally, and Telegram text is a notch smaller. */
#messages .elmujib-filter-tabs{display:flex!important;gap:4px!important}
#messages .elmujib-filter-tabs>.elmujib-filter-tab{flex:1 1 0!important;min-width:0!important;height:32px!important;padding:0 4px!important;font-size:12px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:4px!important;white-space:nowrap!important;overflow:hidden}
#messages .elmujib-filter-tabs>.elmujib-filter-tab .elmujib-filter-count{min-width:16px!important;height:16px!important;padding:0 4px!important;font-size:10.5px!important;line-height:16px!important;margin:0!important}
.tg-filter-tab .tg-logo{width:14px;height:14px}
.tg-side-head{padding:4px 10px 4px}
.tg-brand .tg-logo{width:28px;height:28px}
.tg-brand strong{font-size:14.5px}
.tg-brand small{font-size:11px}
.tg-icon-btn{width:34px;height:34px}
.tg-search{padding:0 10px 4px}
.tg-search input{height:34px;font-size:13px;padding:0 14px}
.tg-tab{font-size:12.5px;padding:9px 6px 8px}
.tg-avatar{width:44px;height:44px;font-size:16px}
.tg-avatar-sm{width:38px;height:38px;font-size:14px}
.tg-item{padding:6px 8px;gap:9px}
.tg-item-top strong{font-size:14px}
.tg-item-top time{font-size:11px}
.tg-item-last{font-size:12.5px}
.tg-launch-badge,.tg-unread{min-width:18px;height:18px;font-size:11px;line-height:18px}
.tg-chat-head{padding:6px 12px}
.tg-chat-title strong{font-size:14.5px}
.tg-chat-title small{font-size:12px}
.tg-msg{font-size:13.5px;line-height:1.45}
.tg-sender{font-size:12.5px}
.tg-meta{font-size:11px}
.tg-quote{font-size:12.5px}
.tg-quote b{font-size:12px}
.tg-day span{font-size:12px}
.tg-doc-icon{width:40px;height:40px}
.tg-doc small{font-size:11.5px}
.tg-voice-play{width:40px;height:40px;padding:9px}
.tg-voice-time{font-size:11.5px}
.tg-reply-bar b,.tg-reply-bar span{font-size:12.5px}
.tg-composer textarea{font-size:14px;padding:8px 4px}
.tg-composer .tg-icon-btn,.tg-recording .tg-icon-btn{width:36px;height:36px}
.tg-list-empty{font-size:13px}
#messages .elmujib-filter-tabs>.tg-filter-tab{gap:3px!important;padding:0 2px!important}
/* Telegram content never stretches the workspace: the columns keep the height they had with WhatsApp. */
.cc-chat-layout.tg-mode,.cc-chat-layout.tg-mode .cc-contacts-column,.cc-chat-layout.tg-mode .cc-chat-column{min-height:0!important}
.cc-chat-layout.tg-mode .cc-contacts-column{overflow:hidden}
.tg-main{height:auto}
#messages .cc-workspace-shell:has(> .cc-chat-layout.tg-mode)>:not(.cc-chat-layout){flex-shrink:0!important}
/* Reactions (like Telegram: chips under the message, quick row in the context menu) */
.tg-reactions{display:flex;flex-wrap:wrap;gap:4px;margin:5px 0 1px;clear:both}
.tg-reaction{display:inline-flex;align-items:center;gap:3px;height:24px;padding:0 8px;border-radius:12px;border:0;background:rgba(51,144,236,.12);color:var(--tg-blue);font-size:14px;line-height:1;cursor:pointer;font-family:inherit}
.tg-reaction b{font-size:11.5px;font-weight:700}
.tg-msg.out .tg-reaction{background:rgba(79,174,78,.16);color:var(--tg-out-meta)}
.tg-reaction.mine{background:var(--tg-blue);color:#fff!important}
.tg-msg.out .tg-reaction.mine{background:var(--tg-out-meta)}
.tg-menu-react{display:flex;gap:2px;padding:4px 4px 6px;border-bottom:1px solid var(--tg-border);margin-bottom:4px}
.tg-menu .tg-menu-react button{width:32px;height:32px;padding:0;justify-content:center;font-size:19px;border-radius:50%}
.tg-menu .tg-menu-react button:hover{background:var(--tg-hover);transform:scale(1.15)}
.tg-menu .tg-menu-react button.mine{background:rgba(51,144,236,.18)}
.tg-menu button.danger,.tg-menu button.danger svg{color:#e53935!important}
/* Profile photos over the initials */
.tg-avatar{position:relative;overflow:hidden}
.tg-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:50%}
/* Per-agent pin and star */
.tg-pin-mark{font-size:11px;flex:0 0 auto;opacity:.8}
.tg-star-mark{color:#f5a623!important;font-size:13px;line-height:1}
.tg-item.active .tg-star-mark{color:#ffe08a!important}
.tg-star-from{font-weight:600;color:var(--tg-text)}
.tg-item.active .tg-star-from{color:#fff}
#tgPinBtn.on{color:var(--tg-blue);background:rgba(51,144,236,.12)}
.tg-tab{padding-inline:2px}
/* Tabs size to their own text so "تليجرام" shows in full and "معلقة" takes less room. */
#messages .elmujib-filter-tabs>.elmujib-filter-tab{flex:1 1 auto!important;padding:0 6px!important}
#messages .elmujib-filter-tabs>.tg-filter-tab{flex-grow:1.3!important}
/* Multi-select + bulk actions */
#tgSelectBtn.on{color:var(--tg-blue);background:rgba(51,144,236,.12)}
.tg-avatar-wrap{position:relative;flex:0 0 auto}
.tg-check{position:absolute;bottom:-2px;left:-2px;width:20px;height:20px;border-radius:50%;border:2px solid var(--tg-bg);background:var(--tg-hover);color:#fff!important;font:700 12px/16px system-ui,sans-serif;text-align:center;box-shadow:0 0 0 1.5px var(--tg-muted)}
.tg-check.on{background:var(--tg-blue);box-shadow:none}
.tg-item.selected{background:rgba(51,144,236,.12)}
.tg-item.selecting .tg-item-archive{display:none!important}
.tg-bulk-bar{border-bottom:1px solid var(--tg-border);padding:6px 8px;background:var(--tg-bg)}
.tg-bulk-bar.hidden{display:none}
.tg-bulk-top{display:flex;align-items:center;gap:6px}
.tg-bulk-top b{flex:1;font-size:13.5px}
.tg-bulk-link{border:0;background:none;color:var(--tg-blue);font:600 12.5px/1 inherit;font-family:inherit;cursor:pointer;padding:6px}
.tg-bulk-actions{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
.tg-bulk-actions button{display:inline-flex;align-items:center;gap:4px;height:30px;padding:0 9px;border-radius:15px;border:1px solid var(--tg-border);background:var(--tg-hover);color:var(--tg-text);font:600 12px/1 inherit;font-family:inherit;cursor:pointer}
.tg-bulk-actions button svg{width:16px!important;height:16px!important}
.tg-bulk-actions button:hover:not(:disabled){border-color:var(--tg-blue);color:var(--tg-blue)}
.tg-bulk-actions button:disabled{opacity:.45;cursor:not-allowed}
.tg-bulk-actions button.hidden{display:none}
/* Fixed tab widths (never change with the counts) so switching الكل / معلقة / أرشيف / تليجرام moves nothing. */
#messages .elmujib-filter-tabs{display:grid!important;grid-template-columns:minmax(0,.85fr) minmax(0,.95fr) minmax(0,.95fr) minmax(0,1.25fr)!important;gap:4px!important}
#messages .elmujib-filter-tabs>.elmujib-filter-tab{width:auto!important;min-width:0!important;padding:0 3px!important}
/* Unread line inside a chat */
.tg-unread-line{display:flex;justify-content:center;margin:8px -14px;padding:3px 0;background:rgba(255,255,255,.55)}
[data-theme="dark"] .tg-unread-line{background:rgba(255,255,255,.08)}
.tg-unread-line span{font-size:12px;font-weight:700;color:var(--tg-blue)}
/* Unanswered reminder: the Telegram logo pulses in and out, the waiting chats are marked */
@keyframes tg-logo-pulse{0%,100%{transform:scale(1)}15%{transform:scale(1.55)}30%{transform:scale(1)}45%{transform:scale(1.55)}60%{transform:scale(1)}}
.tg-filter-tab.tg-pulse .tg-logo{animation:tg-logo-pulse 2.4s ease-in-out}
.tg-filter-tab.tg-waiting .tg-logo{filter:drop-shadow(0 0 4px rgba(229,57,53,.9))}
.tg-item.tg-item-waiting time{color:#e53935!important;font-weight:700}
.tg-item.tg-item-waiting .tg-avatar-wrap::after{content:"";position:absolute;top:-1px;right:-1px;width:12px;height:12px;border-radius:50%;background:#e53935;border:2px solid var(--tg-bg)}
/* Our other accounts */
.tg-ours-badge{display:inline-block;margin-inline-start:4px;padding:0 6px;border-radius:8px;background:rgba(79,174,78,.18);color:#3b8f3a;font-size:10.5px;font-weight:700;vertical-align:middle}
.tg-own{margin-top:14px;border-top:1px solid var(--tg-border);padding-top:10px}
.tg-own-head b{display:block;font-size:14px}
.tg-own-head small{display:block;color:var(--tg-muted);font-size:12px;margin-top:2px}
.tg-own-list{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
.tg-own-chip{display:inline-flex;align-items:center;gap:4px;padding:4px 6px 4px 10px;border-radius:14px;background:var(--tg-hover);font-size:12.5px}
.tg-own-chip small{color:#3b8f3a}
.tg-own-chip button{border:0;background:none;color:var(--tg-muted);font-size:16px;line-height:1;cursor:pointer;padding:0 4px}
.tg-own-add{display:flex;gap:6px}
.tg-own-add .input{flex:1;min-width:0}
.tg-own-add .tg-btn{height:38px;padding:0 14px}
.tg-seen-by{flex:0 0 auto;max-width:96px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:1px 6px;border-radius:9px;background:#fff4e5;color:#b45309!important;font-size:10.5px;font-weight:700}
[data-theme="dark"] .tg-seen-by{background:#3a2a12;color:#fbbf68!important}
.tg-item.active .tg-seen-by{background:rgba(255,255,255,.22);color:#fff!important}
/* Strong "focus" zoom of the Telegram logo on a new/unanswered Telegram message, then back in place. */
#messages .elmujib-filter-tabs>.tg-filter-tab{overflow:visible!important;position:relative}
.tg-filter-tab .tg-logo{position:relative;z-index:5;transform-origin:center;will-change:transform}
@keyframes tg-logo-focus{0%{transform:scale(1);filter:none}18%{transform:scale(2.6);filter:drop-shadow(0 0 10px rgba(42,171,238,.95))}34%{transform:scale(1)}52%{transform:scale(2.6);filter:drop-shadow(0 0 10px rgba(42,171,238,.95))}70%,100%{transform:scale(1);filter:none}}
.tg-filter-tab.tg-pulse .tg-logo{animation:tg-logo-focus 2.6s cubic-bezier(.3,1.5,.5,1)}
/* Consistency with the WhatsApp list: same font family and the same name size (Cairo 13px). */
.tg-scope,.tg-menu,.tg-modal-card{font-family:Cairo,'IBM Plex Sans Arabic',system-ui,sans-serif}
.tg-item-top strong{font-size:13px;font-weight:800}
.tg-item-last{font-size:12px}
.tg-chat-title strong{font-size:14px;font-weight:800}
.tg-brand strong{font-size:14px}
.tg-sender{font-size:12px}
.tg-star-from{font-size:12px}
/* Admin alert switches */
.tg-alerts{margin-top:14px;border-top:1px solid var(--tg-border);padding-top:10px}
.tg-switch-row{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px dashed var(--tg-border);cursor:pointer}
.tg-switch-row>span{flex:1;min-width:0}
.tg-switch-row b{display:block;font-size:13.5px}
.tg-switch-row small{display:block;color:var(--tg-muted);font-size:11.5px}
.tg-switch-row input[type=checkbox]{position:absolute;opacity:0;pointer-events:none}
.tg-switch{position:relative;width:40px;height:22px;border-radius:11px;background:#c9d1d9;flex:0 0 auto;transition:background .2s}
.tg-switch::after{content:"";position:absolute;top:3px;right:3px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:transform .2s}
.tg-switch-row input:checked+.tg-switch{background:var(--tg-blue)}
.tg-switch-row input:checked+.tg-switch::after{transform:translateX(-18px)}
.tg-switch-row input:focus-visible+.tg-switch{outline:2px solid var(--tg-blue);outline-offset:2px}
.tg-disabled-row{opacity:.5}
.tg-minutes{width:auto;min-width:110px;height:34px;padding:0 8px}
.tg-test-sound{margin-top:10px;height:36px;font-size:13px}
.tg-alerts .tg-help{display:block;margin:8px 0 0}

/* High-resolution Telegram logo on the tab: drawn at 40px and shown at 0.4 scale (16px), so the zoom
   enlarges toward its real size instead of stretching a small bitmap — it stays sharp. */
#messages .elmujib-filter-tabs>.tg-filter-tab .tg-logo{width:40px;height:40px;margin:-12px;transform:scale(.4);will-change:auto;image-rendering:auto}
@keyframes tg-logo-focus-hd{0%{transform:scale(.4);filter:none}18%{transform:scale(1.05);filter:drop-shadow(0 0 4px rgba(42,171,238,.95))}34%{transform:scale(.4)}52%{transform:scale(1.05);filter:drop-shadow(0 0 4px rgba(42,171,238,.95))}70%,100%{transform:scale(.4);filter:none}}
#messages .elmujib-filter-tabs>.tg-filter-tab.tg-pulse .tg-logo{animation:tg-logo-focus-hd 2.6s cubic-bezier(.3,1.5,.5,1)}
.tg-steps{margin:4px 0 12px;padding-inline-start:20px;line-height:1.9;font-size:13.5px}
.tg-linked+.tg-help a{color:var(--tg-blue);direction:ltr;unicode-bidi:embed}
/* Linked device: QR, API credentials, media fetched from Telegram on demand */
.tg-qr{display:flex;flex-direction:column;align-items:center;gap:10px;margin:4px 0}
.tg-qr img{width:240px;height:240px;border-radius:14px;background:#fff;padding:8px;box-shadow:0 1px 6px rgba(0,0,0,.12)}
.tg-qr ol{margin:0;padding-inline-start:20px;line-height:1.9;font-size:13.5px;align-self:stretch}
.tg-creds{margin-top:14px;border-top:1px solid var(--tg-border);padding-top:10px;font-size:14px}
.tg-creds summary{cursor:pointer;font-weight:600}
.tg-creds label{display:flex;flex-direction:column;gap:4px;margin-top:8px;font-size:13px;color:var(--tg-muted)}
.tg-loading-media{min-width:160px;min-height:120px;background:var(--tg-hover);animation:tg-shimmer 1.2s ease-in-out infinite alternate}
@keyframes tg-shimmer{from{opacity:.55}to{opacity:1}}
.tg-media-failed{animation:none;opacity:.5}
/* Several Telegram accounts: filter chips, a small account tag per chat, one link card per account, access table */
.tg-accounts{display:flex;gap:6px;padding:6px 10px;overflow-x:auto;scrollbar-width:none;border-bottom:1px solid var(--tg-border)}
.tg-accounts button{flex:0 0 auto;border:1px solid var(--tg-border);background:none;color:inherit;border-radius:14px;padding:3px 10px;font:inherit;font-size:12px;cursor:pointer;white-space:nowrap}
.tg-accounts button.active{background:var(--tg-blue);border-color:var(--tg-blue);color:#fff}
.tg-accounts button.off{opacity:.55}
.tg-accounts button b{font-size:11px;margin-inline-start:2px}
.tg-account-mark{flex:0 0 auto;font-size:10.5px;font-weight:600;color:var(--tg-blue);background:var(--tg-hover);border-radius:8px;padding:0 6px;margin-inline:4px;max-width:90px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tg-acc-card{border:1px solid var(--tg-border);border-radius:12px;padding:10px 12px;margin-top:10px}
.tg-acc-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px;font-size:14px}
.tg-acc-state{font-size:12px;color:var(--tg-muted)}
.tg-acc-state.connected{color:#3b8f3a}
.tg-acc-state.error{color:#b71c1c}
.tg-acc-row{display:flex;gap:6px;align-items:center;margin-top:6px}
.tg-acc-row .input{flex:1;min-width:0}
.tg-acc-row small{color:var(--tg-muted);font-size:12px;min-width:40px}
.tg-access{overflow-x:auto;margin-top:6px}
.tg-access table{border-collapse:collapse;width:100%;font-size:13px}
.tg-access th,.tg-access td{border-bottom:1px solid var(--tg-border);padding:6px;text-align:center;white-space:nowrap}
.tg-access th:first-child,.tg-access td:first-child{text-align:start}
.tg-access input{width:16px;height:16px;cursor:pointer}
/* Photo viewer over the page: dark backdrop, zoom/drag, toolbar on top */
.tg-photo img{cursor:zoom-in}
.tg-viewer{position:fixed;inset:0;z-index:3000;background:rgba(10,12,14,.92);display:flex;flex-direction:column;font-family:Cairo,'IBM Plex Sans Arabic',system-ui,sans-serif;user-select:none}
.tg-viewer.hidden{display:none}
.tg-viewer-bar{display:flex;align-items:center;justify-content:flex-start;gap:6px;padding:10px 14px;color:#fff;z-index:2}
.tg-viewer-bar button{width:38px;height:38px;border:0;border-radius:50%;background:rgba(255,255,255,.12);color:#fff;font:700 18px/1 system-ui,sans-serif;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:9px}
.tg-viewer-bar button:hover{background:rgba(255,255,255,.24)}
.tg-viewer-bar button[data-v="fit"]{font-size:12px;width:auto;border-radius:19px;padding:0 12px}
.tg-viewer-bar b{min-width:52px;text-align:center;font-size:13px}
.tg-viewer-count{margin-inline-end:auto;font-size:13px;opacity:.8}
.tg-viewer-stage{flex:1;position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center}
.tg-viewer-stage img{max-width:92vw;max-height:calc(100vh - 80px);object-fit:contain;transform-origin:center;transition:transform .12s ease-out;cursor:zoom-in;touch-action:none}
.tg-viewer-stage img.zoomed{cursor:grab;transition:none}
.tg-viewer-stage img.zoomed:active{cursor:grabbing}
.tg-viewer-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:2;width:48px;height:48px;border:0;border-radius:50%;background:rgba(255,255,255,.14);color:#fff;font:400 34px/1 system-ui,sans-serif;cursor:pointer}
.tg-viewer-nav:hover{background:rgba(255,255,255,.26)}
.tg-viewer-nav.prev{right:16px}
.tg-viewer-nav.next{left:16px}
/* Forward: target picker and the "Forwarded from" line on messages */
.tg-forward-card{width:min(420px,92vw)}
.tg-forward-preview{background:var(--tg-hover);border-radius:10px;padding:8px 10px;margin-bottom:10px;font-size:13.5px;color:var(--tg-muted);border-right:3px solid var(--tg-blue);white-space:pre-wrap;max-height:66px;overflow:hidden}
.tg-forward-list{max-height:min(46vh,380px);overflow-y:auto;margin-top:8px;border-top:1px solid var(--tg-border)}
.tg-forward-item{display:flex;align-items:center;gap:10px;width:100%;border:0;background:none;color:inherit;font:inherit;text-align:start;padding:6px 4px;border-radius:10px;cursor:pointer;position:relative}
.tg-forward-item:hover{background:var(--tg-hover)}
.tg-forward-item.on{background:rgba(51,144,236,.12)}
.tg-forward-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.tg-forward-item .tg-check{position:static;flex:0 0 auto}
.tg-forwarded{display:flex;align-items:center;gap:4px;font-size:12.5px;color:var(--tg-blue);margin-bottom:3px}
.tg-forwarded svg{width:14px;height:14px;flex:0 0 auto}
.tg-msg.out .tg-forwarded{color:var(--tg-out-meta)}
/* Emoji picker next to the mic */
.tg-composer{position:relative}
#tgEmojiBtn.on{color:var(--tg-blue)}
.tg-emoji-panel{position:absolute;bottom:calc(100% + 8px);left:6px;width:min(340px,calc(100vw - 32px));max-height:300px;overflow-y:auto;background:var(--tg-bg);color:var(--tg-text);border-radius:14px;box-shadow:0 8px 28px rgba(0,0,0,.22);padding:8px;z-index:30}
.tg-emoji-panel.hidden{display:none}
.tg-emoji-title{font-size:12px;color:var(--tg-muted);margin:4px 4px 2px}
.tg-emoji-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:2px}
.tg-emoji-grid button{border:0;background:none;font-size:22px;line-height:1;padding:6px 0;border-radius:8px;cursor:pointer}
.tg-emoji-grid button:hover{background:var(--tg-hover)}
/* Sender name on every message (our agent on outgoing ones, for admin/manager) and the admin's edit details */
.tg-sender-out{color:var(--tg-out-meta)}
.tg-edited{cursor:help}
.tg-edit-history{margin:4px 0 2px;font-size:12.5px;color:var(--tg-muted)}
.tg-edit-history summary{cursor:pointer;color:#e08a00;font-weight:600}
.tg-edit-history div{border-right:2px solid #e08a00;padding:2px 8px;margin-top:4px;text-decoration:line-through;text-decoration-color:rgba(224,138,0,.5);white-space:pre-wrap}
.tg-edit-history time{display:block;text-decoration:none;font-size:11px;opacity:.8}
/* An account whose chats couldn't load, shown above the list with its reason */
.tg-list-warning{margin:8px 10px;padding:8px 10px;border-radius:10px;background:#fff4e5;color:#8a4b00;font-size:12.5px;line-height:1.6}
[data-theme="dark"] .tg-list-warning{background:#3a2a12;color:#ffcc80}
.tg-list-warning .tg-bulk-link{margin-top:4px}
/* WhatsApp Web tab (VPS), team pins/stars, "@" mentions, new chat */
#messages .elmujib-filter-tabs>.tg-wa-tab .tg-logo{width:40px;height:40px;margin:-12px;transform:scale(.4)}
.tg-brand .tg-wa-logo,.tg-empty-main .tg-wa-logo{filter:none}
.tg-pin-mark.tg-team,.tg-star-mark.tg-team{color:#e08a00;filter:drop-shadow(0 0 1px rgba(224,138,0,.6))}
.tg-acc-logo{display:inline-flex;width:20px;height:20px;flex:0 0 auto;margin-inline-end:4px;vertical-align:middle}
.tg-acc-logo .tg-logo{width:20px;height:20px}
.tg-acc-head b{display:inline-flex;align-items:center}
.tg-mention-box{position:absolute;bottom:calc(100% + 8px);right:6px;width:min(320px,calc(100vw - 32px));max-height:280px;overflow-y:auto;background:var(--tg-bg);color:var(--tg-text);border-radius:14px;box-shadow:0 8px 28px rgba(0,0,0,.22);padding:6px;z-index:31}
.tg-mention-box.hidden{display:none}
.tg-mention-box button{display:flex;align-items:center;gap:8px;width:100%;border:0;background:none;color:inherit;font:inherit;font-size:14px;text-align:start;padding:6px 8px;border-radius:10px;cursor:pointer}
.tg-mention-box button.active,.tg-mention-box button:hover{background:var(--tg-hover)}
.tg-mention-box small{color:var(--tg-muted);direction:ltr;margin-inline-start:auto}
.tg-avatar-xs{width:28px;height:28px;font-size:11px}
.tg-new-row{display:flex;flex-direction:column;gap:4px;font-size:13px;color:var(--tg-muted);margin-bottom:8px}
#tgNewTarget{margin-top:4px}

/* With WhatsApp Web on, five tabs share one row (WhatsApp Web sits last, at the left in RTL). */
#messages .elmujib-filter-tabs:has(>.tg-wa-tab:not(.hidden)){grid-template-columns:minmax(0,.8fr) minmax(0,.9fr) minmax(0,.9fr) minmax(0,1.1fr) minmax(0,1.35fr)!important;gap:3px!important}
#messages .elmujib-filter-tabs:has(>.tg-wa-tab:not(.hidden))>.elmujib-filter-tab{font-size:11.5px!important;padding:0 2px!important;gap:2px!important}
/* Admin shortcut to the QR when the account on screen isn't linked. */
.tg-quick-link{border:0;background:#25d366;color:#fff;font:inherit;font-size:11.5px;font-weight:700;border-radius:999px;padding:2px 10px;margin-top:3px;display:block;cursor:pointer;white-space:nowrap}
.tg-quick-link[data-platform="telegram"]{background:#2aabee}
.tg-quick-link:hover{filter:brightness(1.07)}
.tg-quick-link.hidden{display:none}
/* Telegram is logo only now: its column can be narrow. WhatsApp Web shows its logo + «ويب». */
#messages .elmujib-filter-tabs{grid-template-columns:minmax(0,1fr) minmax(0,1.1fr) minmax(0,1.1fr) minmax(0,.8fr)!important}
#messages .elmujib-filter-tabs:has(>.tg-wa-tab:not(.hidden)){grid-template-columns:minmax(0,1fr) minmax(0,1.1fr) minmax(0,1.1fr) minmax(0,.75fr) minmax(0,.95fr)!important}
/* New WhatsApp Web message: its logo zooms out and back like Telegram's, with a green glow. */
@keyframes tg-wa-logo-focus-hd{0%{transform:scale(.4);filter:none}18%{transform:scale(1.05);filter:drop-shadow(0 0 4px rgba(37,211,102,.95))}34%{transform:scale(.4)}52%{transform:scale(1.05);filter:drop-shadow(0 0 4px rgba(37,211,102,.95))}70%,100%{transform:scale(.4);filter:none}}
#messages .elmujib-filter-tabs>.tg-wa-tab.tg-pulse .tg-logo{animation:tg-wa-logo-focus-hd 2.6s cubic-bezier(.3,1.5,.5,1)}
/* New WhatsApp API / Facebook / website message: the channel logo on that chat's row does the same. */
@keyframes cc-icon-focus{0%{transform:scale(1)}18%{transform:scale(2.2);filter:drop-shadow(0 0 4px rgba(37,211,102,.9))}34%{transform:scale(1)}52%{transform:scale(2.2);filter:drop-shadow(0 0 4px rgba(37,211,102,.9))}70%,100%{transform:scale(1);filter:none}}
.cc-platform-icon.cc-icon-pulse{animation:cc-icon-focus 2.6s cubic-bezier(.3,1.5,.5,1);position:relative;z-index:2}
@media (prefers-reduced-motion:reduce){#messages .elmujib-filter-tabs>.tg-wa-tab.tg-pulse .tg-logo,.cc-platform-icon.cc-icon-pulse{animation:none}}
/* The tabs bar uses the column's full width; the tabs share it evenly (Telegram's logo-only tab a bit narrower). */
#messages .elmujib-filter-tabs{margin-inline:0!important;padding:4px!important;gap:4px!important;grid-template-columns:repeat(3,minmax(0,1fr)) minmax(0,.8fr)!important}
#messages .elmujib-filter-tabs:has(>.tg-wa-tab:not(.hidden)){grid-template-columns:repeat(3,minmax(0,1fr)) minmax(0,.8fr) minmax(0,1fr)!important;gap:4px!important}
#messages .elmujib-filter-tabs>.elmujib-filter-tab,#messages .elmujib-filter-tabs:has(>.tg-wa-tab:not(.hidden))>.elmujib-filter-tab{height:34px!important;font-size:12.5px!important;gap:5px!important;padding:0 4px!important}html[data-frontend][data-theme] :is(body,#saas) #messages .elmujib-filter-tabs{margin:8px 0!important}
/* Five tabs on one row in every browser (the class is set by telegram.js when WhatsApp Web is on). */
#messages .elmujib-filter-tabs.tg-has-wa{grid-template-columns:repeat(3,minmax(0,1fr)) minmax(0,.8fr) minmax(0,1fr)!important;gap:4px!important}

/* WhatsApp Web is logo only too: الكل / معلقة / أرشيف / Telegram / WhatsApp side by side on one row. */
#messages .elmujib-filter-tabs.tg-has-wa,#messages .elmujib-filter-tabs:has(>.tg-wa-tab:not(.hidden)){grid-template-columns:repeat(3,minmax(0,1fr)) minmax(0,.75fr) minmax(0,.75fr)!important}
/* A WhatsApp preview stays slightly soft until the full photo replaces it. */
.tg-photo img.tg-has-thumb{filter:blur(1.5px);min-width:180px}
/* A deleted message the admin/manager can still read. */
.tg-msg .tg-deleted+.tg-text,.tg-msg .tg-deleted~.tg-photo{opacity:.7}
.tg-msg .tg-deleted{color:#e53935}