:root{
  --bg:#f7f3ec;--bg2:#efe7dc;--card:#fffdf8;--text:#22332c;--muted:#7d827b;--line:#e5dbce;
  --accent:#4d5f49;--accent2:#718464;--soft:#eef2e9;--danger:#b85b5b;--shadow:0 18px 60px rgba(43,35,28,.13)
}
.theme-olive{--accent:#4d5f49;--accent2:#718464;--soft:#eef2e9;--bg:#f7f3ec;--bg2:#efe7dc}
.theme-blue{--accent:#5b8db7;--accent2:#7ba9d0;--soft:#edf5fb;--bg:#f6f9fc;--bg2:#e8f0f7}
.theme-lilac{--accent:#8068ad;--accent2:#a28dcc;--soft:#f2effa;--bg:#f8f5fc;--bg2:#eee8f7}
.theme-pink{--accent:#b96f7d;--accent2:#d5949d;--soft:#fbf0f2;--bg:#fbf6f6;--bg2:#f3e8eb}
.theme-gray{--accent:#696f6c;--accent2:#8c9290;--soft:#f1f2f1;--bg:#f7f7f5;--bg2:#e9e9e6}
.theme-office{
  --bg:#edf1f4;--bg2:#dde3e8;--card:#fbfcfd;--text:#26323d;--muted:#737f8a;--line:#d8dee4;
  --accent:#596570;--accent2:#7b8893;--soft:#edf1f4;--danger:#a24f58;--shadow:0 20px 60px rgba(36,49,61,.13)
}
*{box-sizing:border-box}body{margin:0;min-height:100vh;background:radial-gradient(circle at 12% 12%,#fff 0,var(--bg) 42%,var(--bg2) 100%);color:var(--text);font-family:Tahoma,Arial,sans-serif;direction:rtl}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}[hidden]{display:none!important}.mobile-only{display:none}.toast{position:fixed;right:18px;bottom:18px;z-index:100;background:#1e3028;color:white;border-radius:18px;padding:13px 18px;box-shadow:var(--shadow);max-width:90vw}.muted{color:var(--muted);line-height:1.9}.hint{background:var(--soft);border-radius:16px;padding:12px;color:var(--accent);line-height:1.9}
.login-view{min-height:100vh;display:grid;place-items:center;padding:20px}.login-card{width:min(92vw,430px);background:rgba(255,253,248,.96);border:1px solid rgba(255,255,255,.85);box-shadow:var(--shadow);border-radius:34px;text-align:center;padding:35px 26px}.login-logo{width:142px;height:142px;object-fit:contain;background:transparent;display:block;margin:0 auto 18px}.login-card h1{font-size:27px;color:var(--accent);margin:0 0 10px}.login-card p{margin:0 0 26px;color:var(--muted)}.field{position:relative;display:block;margin:13px 0}.field input{width:100%;height:60px;border:1px solid var(--line);border-radius:20px;background:rgba(255,255,255,.94);padding:0 58px 0 54px;outline:none;text-align:right;color:var(--text)}.field input:focus{border-color:var(--accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 13%,transparent)}.field input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #fffdf8 inset!important;-webkit-text-fill-color:var(--text)!important}.field i{position:absolute;right:20px;top:50%;transform:translateY(-50%);font-style:normal}#togglePass{position:absolute;left:16px;top:50%;transform:translateY(-50%);border:0;background:transparent}.login-btn{width:100%;min-height:60px;border:0;border-radius:20px;background:linear-gradient(135deg,var(--accent),var(--accent2));color:white;font-weight:800;font-size:18px;margin-top:14px;padding:0 18px;box-shadow:0 12px 24px color-mix(in srgb,var(--accent) 20%,transparent)}.install-line{display:flex;align-items:center;gap:13px;margin:22px 0;color:var(--accent)}.install-line span{height:1px;background:var(--line);flex:1}.install-line button{border:0;background:transparent;color:var(--accent)}.safe-box{border-radius:18px;background:var(--soft);padding:16px;color:var(--accent);display:grid;gap:6px;text-align:right}.safe-box small{color:var(--muted)}
.app-view{height:100vh;display:grid;grid-template-columns:310px minmax(0,1fr) 300px;gap:16px;padding:16px;background:linear-gradient(135deg,var(--bg),var(--bg2))}.groups-panel,.chat-panel,.settings-panel{background:rgba(255,253,248,.97);border:1px solid rgba(255,255,255,.85);border-radius:28px;box-shadow:var(--shadow);overflow:hidden}.groups-panel,.settings-panel{padding:16px;display:flex;flex-direction:column;gap:12px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.panel-head h2{margin:0;font-size:21px}.panel-head small{color:var(--muted);font-size:12px}.icon-btn,.soft-btn,.attach-btn{border:1px solid var(--line);border-radius:15px;background:white;color:var(--accent);padding:10px 13px}.soft-btn{background:var(--soft);border-color:transparent;font-weight:700;text-align:center}.theme-shortcut{border:1px solid color-mix(in srgb,var(--accent) 20%,var(--line));background:linear-gradient(135deg,var(--soft),#fff);display:flex;align-items:center;justify-content:center;gap:8px}.search{height:45px;border:1px solid var(--line);border-radius:17px;padding:0 14px;background:white;outline:none}.groups-list{overflow:auto;display:grid;gap:10px}.group-item{border:1px solid var(--line);border-radius:19px;background:white;padding:12px;display:flex;gap:12px;align-items:center;text-align:right}.group-item.active{border-color:var(--accent);background:linear-gradient(135deg,var(--soft),#fff)}.avatar{width:44px;height:44px;border-radius:16px;background:linear-gradient(135deg,var(--accent),var(--accent2));color:white;display:grid;place-items:center;font-weight:900;flex:0 0 auto}.group-item h3{margin:0 0 4px;font-size:15px}.group-item small{color:var(--muted)}.empty-box{background:var(--soft);border-radius:18px;padding:18px;color:var(--muted);line-height:1.9}.admin-tools{display:grid;gap:10px;margin-top:auto}
.chat-panel{display:flex;flex-direction:column}.chat-head{height:72px;border-bottom:1px solid var(--line);padding:14px 16px;display:flex;align-items:center;gap:10px}.group-title{margin-left:auto}.group-title h1{margin:0;font-size:18px}.group-title small{color:var(--muted)}.messages-box{flex:1;overflow:auto;padding:20px;display:flex;flex-direction:column;gap:13px}.blank-chat{margin:auto;text-align:center;color:var(--muted);line-height:2}.msg{display:flex;gap:9px;align-items:flex-end;max-width:78%}.msg.mine{align-self:flex-start;flex-direction:row-reverse}.bubble{background:white;border:1px solid var(--line);border-radius:20px;padding:12px 14px;line-height:1.9;box-shadow:0 8px 22px rgba(0,0,0,.04)}.msg.mine .bubble{background:linear-gradient(135deg,var(--accent),var(--accent2));color:white}.bubble b{display:block;font-size:12px;color:var(--accent)}.msg.mine .bubble b{color:white}.bubble p{margin:0;white-space:pre-wrap}.bubble time{display:block;font-size:11px;color:var(--muted);margin-top:6px}.msg.mine .bubble time{color:rgba(255,255,255,.75)}.bubble img{max-width:280px;border-radius:16px;display:block}.bubble audio{max-width:280px}.delete-msg{margin-top:8px;border:0;border-radius:10px;background:rgba(184,91,91,.12);color:var(--danger);padding:5px 10px}.composer{border-top:1px solid var(--line);padding:12px;display:flex;gap:8px;align-items:center}.composer input{flex:1;height:48px;border:1px solid var(--line);border-radius:17px;padding:0 14px;outline:none}.send-btn{width:48px;height:48px;border:0;border-radius:17px;background:var(--accent);color:white;font-weight:900}.no-send{padding:14px;text-align:center;color:var(--muted);border-top:1px solid var(--line)}
.theme-options{display:grid;gap:10px}.theme-card{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid var(--line);background:white;border-radius:18px;padding:13px;text-align:right}.theme-card.active{border-color:var(--accent);background:var(--soft)}.swatch{width:28px;height:28px;border-radius:50%;display:block;box-shadow:0 0 0 4px rgba(255,255,255,.75)}.swatch.olive{background:#4d5f49}.swatch.blue{background:#5b8db7}.swatch.lilac{background:#8068ad}.swatch.pink{background:#b96f7d}.swatch.gray{background:#696f6c}
.dialog{border:0;border-radius:28px;padding:0;background:transparent;max-width:min(94vw,620px);width:620px}.dialog::backdrop{background:rgba(0,0,0,.38);backdrop-filter:blur(2px)}.dialog-card{background:var(--card);border-radius:28px;padding:22px;box-shadow:var(--shadow);display:grid;gap:14px;max-height:86vh;overflow:auto;position:relative}.dialog-card h2{margin:0;color:var(--accent);font-size:24px}.dialog-card h3{margin:8px 0 4px;font-size:18px;color:var(--text)}.dialog-card label{display:block;font-weight:800;margin:0 0 7px;color:var(--text)}.dialog-card input,.dialog-card select{width:100%;min-height:48px;border:1px solid var(--line);border-radius:16px;padding:0 13px;background:white;outline:none}.dialog-card input:focus,.dialog-card select:focus{border-color:var(--accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 10%,transparent)}.x{position:absolute;left:14px;top:14px;border:0;background:var(--soft);border-radius:14px;width:42px;height:42px;font-size:22px}.form-section{display:grid;gap:12px}.form-field{display:grid;gap:6px}.form-note{font-size:12px;color:var(--muted);line-height:1.8;margin-top:-2px}.split-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}.member-row,.user-row{display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:center;border:1px solid var(--line);border-radius:16px;padding:12px;margin:8px 0;background:white}.user-row small,.member-row small{color:var(--muted);line-height:1.8}.danger-soft{color:var(--danger)!important;background:rgba(184,91,91,.08)!important}.users-table,.members-table{display:grid;gap:8px}hr{border:0;border-top:1px solid var(--line);width:100%;margin:6px 0}
@media(max-width:900px){.mobile-only{display:inline-flex}.app-view{display:block;height:100vh;padding:0}.groups-panel{position:fixed;z-index:20;inset:0;background:#fffdf8;border-radius:0;transform:translateX(105%);transition:.22s;box-shadow:none;padding:18px}.groups-panel.open{transform:translateX(0)}.chat-panel{height:100vh;border-radius:0;box-shadow:none}.settings-panel{position:fixed;z-index:30;inset:auto 0 0 0;height:78vh;border-radius:26px 26px 0 0;background:#fffdf8;transform:translateY(105%);transition:.22s;box-shadow:var(--shadow)}.settings-panel.open{transform:translateY(0);padding-bottom:24px}.login-card{padding:30px 22px}.login-logo{width:130px;height:130px}.msg{max-width:92%}.bubble img,.bubble audio{max-width:220px}.dialog{width:94vw}.dialog-card{padding:22px 18px;max-height:84vh}.split-2{grid-template-columns:1fr}.member-row,.user-row{grid-template-columns:1fr;align-items:stretch}.member-row select,.member-row button,.user-row button{width:100%}.dialog-card h2{font-size:22px;padding-left:44px}.admin-tools{margin-top:16px}.toast{right:12px;bottom:12px}}


/* clean14: امکانات جدید روی پایه سالم v2 */
.avatar{overflow:hidden;flex:0 0 auto}
.avatar img{width:100%;height:100%;object-fit:cover;display:block}
.avatar.big{width:64px;height:64px;border-radius:22px}
.profile-box{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid var(--line);border-radius:20px;padding:12px}
.profile-box small{display:block;color:var(--muted);font-size:12px;margin-top:5px}
.avatar-upload{display:block;text-align:center;border:1px solid var(--line);background:var(--soft);border-radius:16px;padding:12px;color:var(--accent);font-weight:700;cursor:pointer}
.direct-list{border-top:1px solid var(--line);padding-top:10px;display:grid;gap:10px;overflow:auto}
.direct-title{font-size:13px;color:var(--muted);margin:4px 0}
.unread-badge{min-width:23px;height:23px;padding:0 7px;border-radius:99px;background:var(--danger);color:#fff;display:grid;place-items:center;font-size:12px;font-weight:800;margin-right:auto}
.msg-foot{display:flex;gap:8px;align-items:center;justify-content:flex-end;margin-top:6px;font-size:11px;opacity:.78}
.ticks{font-weight:900;letter-spacing:-3px;min-width:20px;text-align:left}
.ticks.read{color:#74d7ff}
.bubble img.msg-image{display:block;max-width:260px;border-radius:16px}
.bubble audio{max-width:240px}

/* clean14: موبایل مرتب، کشویی کامل، پیام‌های میزبان/مهمان */
@media (max-width:900px){
  .mobile-only{display:inline-flex}
  .app-view{grid-template-columns:1fr;height:100dvh;padding:0;gap:0;overflow:hidden}
  .groups-panel,.settings-panel,.chat-panel{border-radius:0}
  .chat-panel{min-height:100dvh;height:100dvh;display:flex;overflow:hidden}
  .chat-head{height:auto;min-height:72px;padding:12px 14px;gap:10px;position:sticky;top:0;z-index:5;background:rgba(255,253,248,.98)}
  .group-title{min-width:0;flex:1}
  .group-title h1{font-size:18px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .group-title small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .groups-panel{position:fixed;z-index:60;inset:0;width:100vw;max-width:none;transform:translateX(100%);transition:.25s ease;background:var(--card);padding:18px 14px calc(18px + env(safe-area-inset-bottom));overflow:auto}
  .groups-panel.open{transform:translateX(0)}
  .settings-panel{position:fixed;z-index:70;inset:0;width:100vw;max-width:none;transform:translateX(-100%);transition:.25s ease;background:var(--card);padding:18px 14px calc(18px + env(safe-area-inset-bottom));overflow:auto}
  .settings-panel.open{transform:translateX(0)}
  .group-item{padding:14px 12px;border-radius:20px;align-items:center}
  .group-item span:not(.avatar){min-width:0;flex:1}
  .group-item h3,.group-item small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .admin-tools{position:sticky;bottom:0;background:linear-gradient(180deg,rgba(255,253,248,0),rgba(255,253,248,.96) 18%,rgba(255,253,248,.98) 100%);padding-top:12px}
  .messages-box{padding:10px 8px 14px;gap:10px;align-items:stretch}
  .msg{width:auto!important;max-width:88%!important;gap:8px;align-self:auto!important}
  .msg.mine{margin-left:auto!important;margin-right:0!important;justify-content:flex-start!important;flex-direction:row-reverse!important}
  .msg:not(.mine){margin-right:auto!important;margin-left:0!important;justify-content:flex-start!important;flex-direction:row!important}
  .msg .avatar{width:34px;height:34px;border-radius:12px}
  .bubble{min-width:0;max-width:calc(100vw - 90px)!important;padding:9px 11px;border-radius:20px}
  .msg.mine .bubble{border-bottom-right-radius:8px;border-bottom-left-radius:22px}
  .msg:not(.mine) .bubble{border-bottom-left-radius:8px;border-bottom-right-radius:22px}
  .bubble p{font-size:14px;line-height:1.8;word-break:break-word}
  .bubble img.msg-image{max-width:100%;width:min(240px,100%)}
  .bubble audio{display:block;max-width:100%;width:min(240px,100%)}
  .composer{height:auto;min-height:74px;padding:8px 8px calc(8px + env(safe-area-inset-bottom));gap:6px;position:sticky;bottom:0;background:rgba(255,253,248,.98)}
  .composer input{min-width:0;height:44px;padding:0 12px;border-radius:16px;font-size:16px}
  .attach-btn,.send-btn{width:44px;height:44px;display:grid;place-items:center;padding:0;border-radius:15px;flex:0 0 44px}
  .search-wrap input,.field input{font-size:16px}
  .member-row,.user-row{flex-wrap:wrap;justify-content:flex-start}
  .member-row select{width:100%}
}


/* v17 bulk member selection */
.bulk-users-box{border:1px solid var(--line);background:#fff;border-radius:18px;padding:10px;max-height:270px;overflow:auto;display:grid;gap:8px}
.bulk-user-row{display:grid;grid-template-columns:auto minmax(0,1fr) 150px;align-items:center;gap:8px;border:1px solid var(--line);border-radius:14px;padding:8px;background:rgba(255,253,248,.96)}
.bulk-user-row b,.bulk-user-row small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bulk-user-row small{color:var(--muted);font-size:11px}
.bulk-user-row select{margin:0!important;width:100%!important}
@media (max-width:700px){.bulk-user-row{grid-template-columns:auto minmax(0,1fr)}.bulk-user-row select{grid-column:1 / -1}}


/* v19: چت خصوصی جدا و واضح */
.private-chat-box{
  display:grid;
  gap:9px;
  border-bottom:1px solid var(--line);
  padding-bottom:12px;
  margin-bottom:4px;
}
.private-title{
  display:grid;
  gap:3px;
  padding:4px 4px 0;
}
.private-title b{
  font-size:14px;
  color:var(--text);
}
.private-title small{
  font-size:11px;
  color:var(--muted);
}
.private-chat-item{
  border-color:color-mix(in srgb,var(--accent) 30%,var(--line));
  background:linear-gradient(135deg,#fff,var(--soft));
}
.private-chat-item h3{
  font-weight:900;
}
.manager-message-btn{
  border-color:var(--accent);
}
.admin-private-box{
  max-height:42vh;
  overflow:auto;
}
.direct-list{
  display:none!important;
}
@media (max-width:900px){
  .admin-private-box{max-height:none}
}


/* v20: اصلاح قطعی باز شدن چت خصوصی */
body[data-build="private20"] .private-chat-box{
  border:1px solid color-mix(in srgb,var(--accent) 18%,var(--line));
  border-radius:18px;
  padding:10px;
  background:rgba(255,255,255,.45);
}
body[data-build="private20"] .private-title b{
  font-size:15px;
}
body[data-build="private20"] .private-chat-item.active{
  border-color:var(--accent);
  background:linear-gradient(135deg,var(--soft),#fff);
}


/* v21: چت خصوصی آماده از سمت سرور */
body[data-build="private21"] .private-chat-box{
  border:1px solid color-mix(in srgb,var(--accent) 22%,var(--line));
  border-radius:18px;
  padding:10px;
  background:rgba(255,255,255,.56);
}
body[data-build="private21"] .private-chat-item.active{
  border-color:var(--accent);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 12%,transparent);
}

/* اصلاح نسخه نهایی: نمایش تم‌ها و اسکرول تنظیمات */
.settings-panel{overflow:auto;scrollbar-width:thin}
.theme-heading{margin:8px 0 0;font-size:15px;color:var(--text)}
.theme-card{cursor:pointer;font-family:inherit;color:var(--text)}
.theme-card span{display:grid;gap:3px}
.theme-card small{color:var(--muted);font-size:11px}
.theme-card.active{box-shadow:0 8px 22px color-mix(in srgb,var(--accent) 16%,transparent)}
.private-chat-item{cursor:pointer}


/* private25: نمایش قطعی رنگ‌بندی تم برای همه نقش‌ها */
.settings-panel #themeOptions.theme-options{display:grid!important;gap:10px!important;visibility:visible!important;opacity:1!important}
.settings-panel .theme-card{display:flex!important;align-items:center;justify-content:space-between;width:100%}
.all-theme-shortcut{display:flex;align-items:center;justify-content:center;gap:8px}
@media(min-width:901px){.all-theme-shortcut{display:none}}

/* private27: جایگاه قطعی پیام‌ها - پیام‌های مهمان سمت چپ، پیام‌های خود کاربر سمت راست */
.messages-box .msg.mine{
  align-self:flex-start!important;
  margin-left:auto!important;
  margin-right:0!important;
  flex-direction:row-reverse!important;
}
.messages-box .msg:not(.mine){
  align-self:flex-end!important;
  margin-right:auto!important;
  margin-left:0!important;
  flex-direction:row!important;
}
.messages-box .msg:not(.mine) .bubble{
  border-bottom-left-radius:8px;
  border-bottom-right-radius:22px;
}
.messages-box .msg.mine .bubble{
  border-bottom-right-radius:8px;
  border-bottom-left-radius:22px;
}


/* private27: برگشت مدیریت گروه در موبایل + پخش پایدار ویس گروه */
.voice-audio,.bubble audio{direction:ltr!important;unicode-bidi:embed;min-height:44px}
.manage-group-btn:not([hidden]){display:inline-flex!important;align-items:center;justify-content:center;gap:6px;white-space:nowrap}
@media (max-width:900px){
  .manage-group-btn:not([hidden]){width:46px;height:46px;min-width:46px;padding:0;border-radius:16px;font-size:0;flex:0 0 46px;background:var(--soft);border:1px solid color-mix(in srgb,var(--accent) 24%,var(--line))}
  .manage-group-btn:not([hidden])::before{content:'⚙️';font-size:21px;line-height:1}
  .chat-head{gap:8px}
  .voice-audio{width:min(260px,calc(100vw - 120px))!important;max-width:100%!important}
}

/* secure28: رابط پیشرفته، دسترس‌پذیر و مناسب اینترنت ناپایدار */
.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}
:focus-visible{outline:3px solid color-mix(in srgb,var(--accent) 48%,transparent);outline-offset:3px}
.network-status{position:fixed;z-index:150;left:50%;top:12px;transform:translateX(-50%);padding:9px 15px;border-radius:999px;background:#7b4f18;color:#fff;box-shadow:var(--shadow);font-size:13px;font-weight:800}
.network-status.online{background:#176b4c}
.login-view{position:relative;overflow:hidden}
.login-view::before,.login-view::after{content:"";position:fixed;border-radius:50%;filter:blur(2px);pointer-events:none}
.login-view::before{width:360px;height:360px;right:-130px;top:-120px;background:color-mix(in srgb,var(--accent) 16%,transparent)}
.login-view::after{width:300px;height:300px;left:-120px;bottom:-100px;background:color-mix(in srgb,var(--accent2) 14%,transparent)}
.login-card{position:relative;z-index:1;backdrop-filter:blur(16px);border-color:color-mix(in srgb,var(--accent) 12%,#fff)}
.login-brand-mark{display:inline-flex;align-items:center;gap:8px;padding:7px 12px;border-radius:999px;background:var(--soft);color:var(--accent);font-size:12px;margin-bottom:8px}
.login-brand-mark span{width:8px;height:8px;border-radius:50%;background:#2da675;box-shadow:0 0 0 5px rgba(45,166,117,.12)}
.chat-head{background:rgba(255,253,248,.86);backdrop-filter:blur(14px)}
.chat-head-actions{display:flex;gap:7px;align-items:center}
.chat-head-actions .icon-btn{width:42px;height:42px;display:grid;place-items:center;padding:0}
.chat-search-bar{display:grid;grid-template-columns:minmax(0,1fr) auto 42px;align-items:center;gap:8px;padding:10px 14px;border-bottom:1px solid var(--line);background:var(--soft)}
.chat-search-bar small{min-width:48px;color:var(--muted);text-align:center}
.messages-box{scroll-behavior:smooth;background-image:radial-gradient(color-mix(in srgb,var(--accent) 7%,transparent) 1px,transparent 1px);background-size:22px 22px}
.bubble{position:relative;transition:border-color .18s,box-shadow .18s,transform .18s}
.bubble:hover{box-shadow:0 10px 28px rgba(0,0,0,.07)}
.msg-actions{display:flex;gap:4px;align-items:center;margin-top:7px;opacity:.72}
.msg-action{border:0;border-radius:9px;padding:4px 7px;background:color-mix(in srgb,var(--accent) 8%,transparent);color:var(--accent);font-size:11px}
.msg.mine .msg-action{background:rgba(255,255,255,.13);color:#fff}
.edited-label{font-size:10px;opacity:.72}
.reply-preview{border-right:3px solid var(--accent);background:color-mix(in srgb,var(--accent) 7%,#fff);border-radius:11px;padding:6px 9px;margin-bottom:8px;font-size:11px;color:var(--muted);max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.msg.mine .reply-preview{border-right-color:#fff;background:rgba(255,255,255,.12);color:rgba(255,255,255,.82)}
.message-search-hit .bubble{box-shadow:0 0 0 3px #f4b942,0 12px 30px rgba(0,0,0,.08)}
.hidden-by-search{display:none!important}
.compose-area{border-top:1px solid var(--line);background:rgba(255,253,248,.96)}
.composer{border-top:0}
.composer textarea{flex:1;min-width:0;min-height:48px;max-height:120px;resize:none;border:1px solid var(--line);border-radius:17px;padding:12px 14px;outline:none;line-height:1.55;background:#fff;color:var(--text)}
.composer textarea:focus{border-color:var(--accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 10%,transparent)}
.reply-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:8px 12px 0;padding:9px 12px;border-radius:14px;background:var(--soft);border-right:4px solid var(--accent)}
.reply-bar div{display:grid;gap:2px;min-width:0}.reply-bar b{font-size:12px;color:var(--accent)}.reply-bar small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted)}
.reply-bar button{border:0;background:transparent;color:var(--danger);font-size:20px}
.record-timer{direction:ltr;color:var(--danger);font-size:12px;font-weight:900;white-space:nowrap}
#recordBtn.recording{background:#fff0f0;color:var(--danger);animation:recordPulse 1.25s infinite}
@keyframes recordPulse{50%{box-shadow:0 0 0 8px rgba(184,91,91,.12)}}

@media(max-width:900px){
  .chat-head-actions{gap:4px}
  .chat-head-actions .icon-btn{width:38px;height:38px;border-radius:13px}
  .chat-search-bar{grid-template-columns:minmax(0,1fr) auto 38px;padding:8px}
  .compose-area{position:sticky;bottom:0;z-index:6;padding-bottom:env(safe-area-inset-bottom)}
  .composer{position:static;padding-bottom:8px}
  .composer textarea{font-size:16px;min-height:44px;padding:10px 11px}
  .reply-bar{margin:7px 8px 0}
  .record-timer{position:absolute;bottom:65px;left:12px;background:#fff;border:1px solid var(--line);padding:5px 8px;border-radius:999px}
  .login-card{border-radius:28px}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}
}

/* pro29: ظاهر پیام‌رسان حرفه‌ای و کانال خصوصی آموزش */
body[data-build="pro29"]{
  background:
    radial-gradient(circle at 12% 8%,color-mix(in srgb,var(--accent) 12%,transparent),transparent 28%),
    linear-gradient(145deg,#eef2ef,var(--bg) 46%,#e7ece9);
}
body[data-build="pro29"] .app-view{
  grid-template-columns:360px minmax(420px,1fr) 300px;
  gap:12px;
  padding:12px;
}
body[data-build="pro29"] .groups-panel,
body[data-build="pro29"] .chat-panel,
body[data-build="pro29"] .settings-panel{
  border:1px solid color-mix(in srgb,var(--accent) 9%,#dfe6e2);
  background:rgba(252,253,251,.94);
  box-shadow:0 18px 55px rgba(31,48,40,.1);
  backdrop-filter:blur(18px);
}
.messenger-brand{
  min-height:66px;
  display:grid;
  grid-template-columns:48px minmax(0,1fr) auto;
  align-items:center;
  gap:11px;
  border-radius:21px;
  padding:9px 11px;
  background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 11%,#fff),#fff);
  border:1px solid color-mix(in srgb,var(--accent) 12%,var(--line));
}
.messenger-brand img{width:48px;height:48px;object-fit:contain;border-radius:16px}
.messenger-brand div{display:grid;min-width:0}.messenger-brand b{font-size:18px;color:var(--accent)}.messenger-brand small{color:var(--muted);font-size:11px}
.messenger-brand>span{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:4px 8px;background:#e4f7ed;color:#17704d;font-size:10px;font-weight:900}
.messenger-brand>span::before{content:"";width:7px;height:7px;border-radius:50%;background:#2fb879;box-shadow:0 0 0 4px rgba(47,184,121,.12)}
body[data-build="pro29"] .groups-panel{padding:12px;gap:10px}
body[data-build="pro29"] .groups-list{gap:5px;padding:2px;scrollbar-width:thin}
body[data-build="pro29"] .group-item{
  width:100%;
  min-height:76px;
  border:0;
  border-bottom:1px solid color-mix(in srgb,var(--line) 75%,transparent);
  border-radius:16px;
  padding:9px 8px;
  box-shadow:none;
  transition:background .18s,transform .18s;
}
body[data-build="pro29"] .group-item:hover{background:var(--soft);transform:translateY(-1px)}
body[data-build="pro29"] .group-item.active{
  border:0;
  background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 14%,#fff),#fff);
  box-shadow:inset -4px 0 0 var(--accent),0 8px 24px color-mix(in srgb,var(--accent) 8%,transparent);
}
.group-copy{display:grid;gap:3px;min-width:0;flex:1}
.group-line{display:flex;align-items:center;gap:8px;min-width:0}
.group-line h3{min-width:0;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.group-line time{direction:ltr;color:var(--muted);font-size:10px;white-space:nowrap}
.group-preview small{min-width:0;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:right}
.group-copy mark{justify-self:start;border-radius:999px;background:#efe9ff;color:#7251a5;padding:2px 7px;font-size:9px;font-weight:900}
.training-avatar{background:linear-gradient(145deg,#6f55ad,#aa8ed8)!important;box-shadow:0 7px 18px rgba(111,85,173,.24)}
.training-group-item{background:linear-gradient(135deg,#faf7ff,#fff)!important}
.training-group-item.active{box-shadow:inset -4px 0 0 #795bb2,0 8px 24px rgba(111,85,173,.12)!important}
body[data-build="pro29"] .chat-head{
  min-height:76px;
  height:auto;
  padding:11px 15px;
  border-bottom-color:color-mix(in srgb,var(--accent) 9%,var(--line));
  background:rgba(253,254,252,.9);
}
.header-avatar{
  width:48px;height:48px;flex:0 0 48px;border-radius:17px;
  display:grid;place-items:center;
  color:#fff;font-weight:900;font-size:19px;
  background:linear-gradient(145deg,var(--accent),var(--accent2));
  box-shadow:0 8px 20px color-mix(in srgb,var(--accent) 20%,transparent);
}
.header-avatar.training{background:linear-gradient(145deg,#6f55ad,#aa8ed8)}
body[data-build="pro29"] .group-title h1{font-size:17px}
body[data-build="pro29"] .group-title small{font-size:11px}
.training-notice{
  display:flex;align-items:center;gap:11px;
  margin:10px 14px 0;padding:10px 13px;border-radius:16px;
  background:linear-gradient(135deg,#f2edff,#fbf9ff);
  border:1px solid #ddd1f2;color:#65499b;
}
.training-notice>span{font-size:24px}.training-notice div{display:grid;gap:2px}.training-notice b{font-size:12px}.training-notice small{font-size:10px;color:#826caf}
body[data-build="pro29"] .messages-box{
  background-color:#edf2ef;
  background-image:
    linear-gradient(rgba(255,255,255,.62),rgba(255,255,255,.62)),
    radial-gradient(color-mix(in srgb,var(--accent) 11%,transparent) 1.2px,transparent 1.2px);
  background-size:auto,24px 24px;
  padding:18px 22px;
}
body[data-build="pro29"] .bubble{
  border:0;
  border-radius:8px 20px 20px 20px;
  box-shadow:0 4px 16px rgba(28,44,36,.07);
}
body[data-build="pro29"] .msg.mine .bubble{
  background:linear-gradient(145deg,var(--accent),color-mix(in srgb,var(--accent2) 86%,var(--accent)));
  border-radius:20px 8px 20px 20px;
}
body[data-build="pro29"] .msg-actions{opacity:.18;transition:opacity .18s}
body[data-build="pro29"] .bubble:hover .msg-actions,
body[data-build="pro29"] .bubble:focus-within .msg-actions{opacity:.9}
.voice-player{
  --voice-progress:0%;
  display:grid;grid-template-columns:48px minmax(190px,290px);gap:10px;align-items:center;
  min-width:270px;direction:ltr;padding:4px 0;
}
.voice-audio{display:none!important}
.voice-play{
  width:46px;height:46px;border:0;border-radius:50%;display:grid;place-items:center;
  background:color-mix(in srgb,var(--accent) 12%,#fff);color:var(--accent);font-weight:900;
  box-shadow:0 4px 13px rgba(0,0,0,.09);
}
.msg.mine .voice-play{background:#fff;color:var(--accent)}
.voice-player.playing .voice-play{transform:scale(.96)}
.voice-content{display:grid;gap:4px;min-width:0;position:relative}
.voice-waveform{height:31px;display:flex;align-items:center;gap:2px;overflow:hidden;pointer-events:none}
.voice-waveform i{width:3px;height:var(--voice-h);min-height:4px;border-radius:99px;background:linear-gradient(to right,var(--accent) 0 var(--voice-progress),#b8c6be var(--voice-progress) 100%);opacity:.88}
.msg.mine .voice-waveform i{background:rgba(255,255,255,.7)}
.voice-seek{
  position:absolute;inset:0 0 auto;width:100%;height:33px;margin:0;opacity:0;cursor:pointer;
}
.voice-meta{display:flex;align-items:center;justify-content:space-between;gap:9px;font-size:10px;color:var(--muted)}
.msg.mine .voice-meta{color:rgba(255,255,255,.75)}
.voice-speed{border:0;border-radius:999px;padding:2px 7px;background:color-mix(in srgb,var(--accent) 10%,#fff);color:var(--accent);font-size:10px;font-weight:900}
.msg.mine .voice-speed{background:rgba(255,255,255,.15);color:#fff}
body[data-build="pro29"] .compose-area{background:rgba(252,253,251,.96);backdrop-filter:blur(15px)}
body[data-build="pro29"] .composer{padding:10px 12px;gap:7px}
body[data-build="pro29"] .composer textarea{border-radius:22px;background:#fff;min-height:48px}
body[data-build="pro29"] .send-btn{border-radius:50%;transform:rotate(180deg)}
body[data-build="pro29"] .attach-btn{border-radius:50%;background:#fff}
.recording-panel{
  display:grid;grid-template-columns:minmax(120px,1fr) auto auto;gap:13px;align-items:center;
  margin:9px 12px;padding:12px;border-radius:20px;
  background:linear-gradient(135deg,#fff3f3,#fff);
  border:1px solid #f3cdcd;box-shadow:0 10px 30px rgba(164,66,66,.1);
}
.recording-wave{height:38px;display:flex;align-items:center;gap:3px;overflow:hidden}
.recording-wave i{width:3px;border-radius:99px;background:#d85d65;animation:recordWave 1s ease-in-out infinite}
.recording-wave i:nth-child(3n+1){height:55%;animation-delay:.12s}.recording-wave i:nth-child(3n+2){height:90%;animation-delay:.32s}.recording-wave i:nth-child(3n){height:38%;animation-delay:.52s}
.recording-panel.paused .recording-wave i{animation-play-state:paused;opacity:.38}
@keyframes recordWave{50%{transform:scaleY(.42)}}
.recording-info{display:grid;text-align:center;direction:ltr}.recording-info b{color:#c4424e;font-size:17px}.recording-info small{color:#9a6b70;font-size:9px}
.recording-actions{display:flex;gap:6px;direction:rtl}
.recording-actions button{min-height:40px;border-radius:13px;padding:7px 11px;font-weight:800}
.record-cancel{border:0;background:#fff;color:#bd4650}.record-pause{border:1px solid #e8c6c8;background:#fff;color:#8c5960}.record-send{border:0;background:#2b8b63;color:#fff}
.composer.recording-active{opacity:.45;pointer-events:none}
.audio-upload-panel{
  display:grid;grid-template-columns:minmax(150px,auto) minmax(110px,1fr) auto;
  gap:12px;align-items:center;margin:9px 12px;padding:12px 14px;
  border-radius:18px;background:#eef8f3;border:1px solid #cce8d9;color:#246849;
}
.audio-upload-panel>div:first-child{display:grid;gap:2px}.audio-upload-panel b{font-size:12px}.audio-upload-panel small{font-size:9px;color:#668a78}
.upload-track{height:8px!important;background:#d8e9e0;border-radius:99px;overflow:hidden;display:block!important}
.upload-track span{height:100%;width:0;display:block;border-radius:inherit;background:linear-gradient(90deg,#2f9a6d,#68c79d);transition:width .25s}
.audio-upload-panel strong{direction:ltr;font-size:12px}
.privacy-card{display:flex;gap:10px;align-items:center;border-radius:18px;padding:12px;background:#eef8f3;color:#216648;border:1px solid #d5eadf}
.privacy-card>span{font-size:22px}.privacy-card div{display:grid;gap:2px}.privacy-card b{font-size:12px}.privacy-card small{font-size:10px;color:#688779;line-height:1.7}

@media(max-width:1180px) and (min-width:901px){
  body[data-build="pro29"] .app-view{grid-template-columns:330px minmax(400px,1fr)}
  body[data-build="pro29"] .settings-panel{
    display:flex;position:fixed;z-index:70;top:12px;bottom:12px;left:12px;
    width:min(340px,calc(100vw - 24px));transform:translateX(calc(-100% - 32px));
    transition:transform .22s ease;
  }
  body[data-build="pro29"] .settings-panel.open{transform:translateX(0)}
  body[data-build="pro29"] .settings-panel .mobile-only{display:inline-flex}
  body[data-build="pro29"] .all-theme-shortcut{display:flex!important}
}
@media(max-width:900px){
  body[data-build="pro29"] .app-view{display:block;padding:0}
  body[data-build="pro29"] .chat-panel{border:0}
  body[data-build="pro29"] .groups-panel{padding:12px 12px calc(18px + env(safe-area-inset-bottom))}
  body[data-build="pro29"] .messages-box{padding:12px 8px}
  body[data-build="pro29"] .chat-head{padding:9px 8px;min-height:68px}
  .header-avatar{width:42px;height:42px;flex-basis:42px;border-radius:15px}
  .training-notice{margin:7px 8px 0;padding:8px 10px}
  .training-notice small{display:none}
  .voice-player{grid-template-columns:42px minmax(150px,220px);min-width:220px}
  .voice-play{width:40px;height:40px}
  .voice-waveform{height:27px}
  body[data-build="pro29"] .msg-actions{opacity:.72}
  .recording-panel{grid-template-columns:1fr auto;margin:7px 8px;padding:10px;gap:8px}
  .recording-wave{grid-column:1 / -1;height:28px}
  .recording-info{grid-column:1}.recording-actions{grid-column:2}
  .recording-actions button{padding:6px 9px;font-size:11px}
  .audio-upload-panel{grid-template-columns:1fr auto;margin:7px 8px;padding:10px}
  .audio-upload-panel>div:first-child{grid-column:1}.upload-track{grid-column:1 / -1;grid-row:2}
  .audio-upload-panel strong{grid-column:2;grid-row:1}
  .messenger-brand{min-height:62px}
}

/* office36: میزکار اداری نقش‌محور و تم طوسی سازمانی */
body[data-build="office36"]{
  min-height:100dvh;
  background:
    radial-gradient(circle at 12% 2%,rgba(255,255,255,.95),transparent 31%),
    linear-gradient(145deg,#e7ecef,#f5f7f8 47%,#dfe5e9);
  color:var(--text);
}
body[data-build="office36"] .login-card{
  background:rgba(251,252,253,.96);
  border-color:#fff;
  box-shadow:0 24px 80px rgba(42,54,65,.16);
}
body[data-build="office36"] .login-brand-mark{background:#edf1f4;color:#4e5a65}
body[data-build="office36"] .login-brand-mark span{background:#4c9b78}
body[data-build="office36"] .safe-box{background:#edf1f4}
.app-shell{min-height:100dvh}
.office-topbar{
  min-height:76px;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:14px;
  padding:10px clamp(12px,3vw,34px);
  position:sticky;
  top:0;
  z-index:90;
  background:rgba(250,251,252,.92);
  border-bottom:1px solid rgba(197,205,212,.8);
  box-shadow:0 9px 30px rgba(41,54,66,.07);
  backdrop-filter:blur(18px);
}
.topbar-btn{
  min-height:46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  justify-self:start;
  border:1px solid #d6dde3;
  border-radius:15px;
  padding:0 15px;
  background:#fff;
  color:#4e5a65;
  font-weight:800;
}
.topbar-btn.active{color:#fff;background:linear-gradient(145deg,#55616c,#74818c);border-color:transparent;box-shadow:0 9px 22px rgba(67,81,93,.2)}
.topbar-btn span{font-size:17px}.topbar-btn b{font-size:12px}
.office-top-brand{
  grid-column:2;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-width:210px;
}
.office-top-brand img{width:50px;height:50px;object-fit:contain;border-radius:15px;background:#f5f3ee;border:1px solid #e0ddd6}
.office-top-brand div{display:grid;gap:1px}.office-top-brand b{font-size:19px;color:#4f5c67}.office-top-brand small{font-size:10px;color:var(--muted)}
.topbar-actions{justify-self:end;display:flex;align-items:center;gap:8px}
.topbar-actions .topbar-btn{justify-self:auto}
.logout-top{color:#86515a;background:#fff}
.dashboard-view{min-height:calc(100dvh - 76px);padding:28px 16px 60px}
.dashboard-container{width:min(1160px,100%);margin:0 auto;display:grid;gap:28px}
.dashboard-hero{
  position:relative;
  isolation:isolate;
  min-height:330px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:42px 20px;
  border:1px solid #d8dfe5;
  border-radius:32px;
  background:
    linear-gradient(150deg,rgba(255,255,255,.96),rgba(246,248,249,.96)),
    repeating-linear-gradient(90deg,transparent 0 28px,rgba(89,101,112,.03) 28px 29px);
  box-shadow:
    0 9px 0 -3px #d7dde2,
    0 18px 0 -7px #cbd3d9,
    0 34px 70px rgba(42,54,65,.12);
  overflow:hidden;
}
.dashboard-hero::before,.dashboard-hero::after{content:"";position:absolute;border-radius:50%;z-index:-1;pointer-events:none}
.dashboard-hero::before{width:260px;height:260px;right:-90px;top:-110px;background:rgba(103,116,128,.08)}
.dashboard-hero::after{width:210px;height:210px;left:-80px;bottom:-100px;background:rgba(136,148,158,.08)}
.dashboard-logo{width:116px;height:116px;object-fit:contain;margin:12px auto 8px;filter:drop-shadow(0 10px 16px rgba(55,68,79,.12))}
.dashboard-hero h1{margin:5px 0 8px;font-size:clamp(25px,4vw,38px);color:#3d4954}
.dashboard-hero>p{max-width:670px;margin:0;color:var(--muted);line-height:2;font-size:14px}
.role-badge{display:inline-flex;align-items:center;border:1px solid #d8dee3;border-radius:999px;background:#f2f5f7;color:#596570;padding:6px 13px;font-size:11px;font-weight:900}
.dashboard-user-line{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:18px;padding:8px 13px;border-radius:14px;background:#fff;border:1px solid #e0e5e9}
.dashboard-user-line b{font-size:12px}.dashboard-user-line small{direction:ltr;color:var(--muted);font-size:10px}
.status-dot{width:8px;height:8px;border-radius:50%;background:#3c9e72;box-shadow:0 0 0 5px rgba(60,158,114,.12)}
.admin-dashboard,.dashboard-conversations{
  border:1px solid #d9e0e5;
  border-radius:28px;
  padding:24px;
  background:rgba(251,252,253,.92);
  box-shadow:0 18px 52px rgba(45,57,68,.08);
}
.section-heading{display:flex;align-items:end;justify-content:space-between;gap:14px;margin-bottom:18px}
.section-heading div{display:grid;gap:3px}.section-heading span{font-size:10px;letter-spacing:.04em;color:#7b8791;font-weight:900}.section-heading h2{margin:0;font-size:22px}.section-heading>small{color:var(--muted);font-size:11px}
.admin-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.admin-action-card{
  min-height:105px;
  display:grid;
  grid-template-columns:54px minmax(0,1fr) 26px;
  align-items:center;
  gap:13px;
  padding:15px;
  border:1px solid #d8dfe5;
  border-radius:21px;
  background:linear-gradient(145deg,#fff,#f5f7f8);
  color:var(--text);
  text-align:right;
  transition:transform .18s,box-shadow .18s,border-color .18s;
}
.admin-action-card:hover{transform:translateY(-2px);border-color:#aeb9c2;box-shadow:0 13px 30px rgba(52,65,77,.1)}
.admin-action-card>i{width:54px;height:54px;display:grid;place-items:center;border-radius:18px;background:#e9eef2;color:#52606b;font-style:normal;font-size:23px}
.admin-action-card>span{display:grid;gap:4px}.admin-action-card b{font-size:16px}.admin-action-card small{font-size:11px;color:var(--muted);line-height:1.8}.admin-action-card>em{font-style:normal;font-size:24px;color:#87939d}
.conversation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.conversation-card{
  min-height:86px;
  display:grid;
  grid-template-columns:50px minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  border:1px solid #d9e0e5;
  border-radius:20px;
  padding:12px;
  background:#fff;
  color:var(--text);
  text-align:right;
  transition:transform .18s,border-color .18s,box-shadow .18s;
}
.conversation-card:hover{transform:translateY(-1px);border-color:#aeb9c2;box-shadow:0 10px 25px rgba(47,60,71,.08)}
.conversation-icon{width:50px;height:50px;display:grid;place-items:center;border-radius:17px;background:linear-gradient(145deg,#64717d,#87949e);color:#fff;font-weight:900;font-size:18px}
.private-conversation .conversation-icon{background:linear-gradient(145deg,#4f697a,#7993a3)}
.conversation-copy{display:grid;gap:5px;min-width:0}.conversation-title{display:flex;align-items:center;gap:8px;min-width:0}.conversation-title b{min-width:0;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.conversation-title time{direction:ltr;color:#8b969f;font-size:9px}.conversation-copy small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted);font-size:10px}.conversation-arrow{font-style:normal;color:#89959f;font-size:24px}
.training-conversation{background:linear-gradient(145deg,#f6f5f8,#fff)}.training-icon{background:linear-gradient(145deg,#626875,#8b909a)}
.group-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:24px 0 11px;padding-top:18px;border-top:1px solid #e1e6ea}.group-section-title b{font-size:15px}.group-section-title span{font-size:10px;color:var(--muted);background:#eef2f4;border-radius:999px;padding:5px 10px}
.inline-empty,.empty-dashboard{grid-column:1/-1;border:1px dashed #cbd3da;border-radius:18px;padding:20px;text-align:center;color:var(--muted);background:#f7f9fa}
.workspace-view{
  height:calc(100dvh - 76px);
  display:grid;
  grid-template-columns:340px minmax(0,1fr);
  gap:12px;
  padding:12px;
  overflow:hidden;
}
body[data-build="office36"] .groups-panel,
body[data-build="office36"] .chat-panel{
  border:1px solid #d8dfe5;
  border-radius:24px;
  background:rgba(251,252,253,.96);
  box-shadow:0 16px 48px rgba(43,55,66,.1);
}
body[data-build="office36"] .groups-panel{padding:12px;gap:10px}
body[data-build="office36"] .chat-panel{min-width:0;height:100%;overflow:hidden}
body[data-build="office36"] .messenger-brand{background:linear-gradient(145deg,#edf1f4,#fff);border-color:#d9e0e5}
body[data-build="office36"] .messenger-brand b{color:#4e5a65}
body[data-build="office36"] .group-item{
  border-color:#e0e5e9;
  background:#fff;
  box-shadow:none;
}
body[data-build="office36"] .group-item.active{border-color:#9eaab4;background:linear-gradient(145deg,#e9eef2,#fff);box-shadow:inset -4px 0 0 #66727d}
body[data-build="office36"] .avatar,
body[data-build="office36"] .header-avatar{background:linear-gradient(145deg,#5d6974,#86929c)}
body[data-build="office36"] .chat-head{background:rgba(250,251,252,.94);backdrop-filter:blur(16px)}
body[data-build="office36"] .messages-box{
  background-color:#e9eef1;
  background-image:
    linear-gradient(rgba(250,252,253,.72),rgba(250,252,253,.72)),
    radial-gradient(rgba(75,88,99,.1) 1.1px,transparent 1.1px);
  background-size:auto,23px 23px;
}
body[data-build="office36"] .msg.mine .bubble{background:linear-gradient(145deg,#56636e,#788691)}
body[data-build="office36"] .compose-area{background:rgba(250,251,252,.96)}
body[data-build="office36"] .composer{padding:10px 12px;gap:7px}
body[data-build="office36"] .composer textarea{background:#fff;border-color:#d7dee4}
body[data-build="office36"] .attach-btn{background:#fff;color:#57636e}
.audio-gallery-btn{position:relative}
.audio-gallery-btn::after{content:"گالری";position:absolute;top:-7px;right:-8px;border-radius:999px;padding:1px 5px;background:#596570;color:#fff;font-size:7px;font-weight:900}
.desktop-home-btn{display:inline-grid}
.settings-backdrop{position:fixed;z-index:118;inset:0;border:0;background:rgba(35,46,56,.46);backdrop-filter:blur(5px)}
body[data-build="office36"] .settings-panel{
  display:flex;
  position:fixed;
  z-index:120;
  top:50%;
  left:50%;
  width:min(520px,calc(100vw - 28px));
  max-height:min(820px,calc(100dvh - 32px));
  padding:24px;
  border:1px solid #d6dde3;
  border-radius:30px;
  background:#fbfcfd;
  box-shadow:
    0 9px 0 -3px #d5dce1,
    0 18px 0 -7px #c8d0d6,
    0 35px 90px rgba(31,43,53,.28);
  transform:translate(-50%,-46%) scale(.96);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .2s,transform .2s,visibility .2s;
  overflow:auto;
}
body[data-build="office36"] .settings-panel.open{transform:translate(-50%,-50%) scale(1);opacity:1;visibility:visible;pointer-events:auto}
.eyebrow{display:block;color:#7b8791;font-size:10px;font-weight:900;margin-bottom:3px}
body[data-build="office36"] .profile-box{background:#f2f5f7;border-color:#dce2e7}
#settingsRole{display:inline-block;margin-top:6px;border-radius:999px;background:#e2e8ec;color:#52606b;padding:3px 8px;font-size:9px;font-style:normal;font-weight:900}
body[data-build="office36"] .avatar-upload{background:#fff;border-color:#d7dee4;color:#52606b}
.settings-section{display:grid;gap:9px;border-top:1px solid #e0e5e9;padding-top:14px}.settings-section h3{margin:0;font-size:13px;color:#4d5964}
body[data-build="office36"] .theme-card{border-color:#cfd7dd;background:linear-gradient(145deg,#edf1f4,#fff)}
.swatch.office{background:linear-gradient(145deg,#53606b,#87939d)}
.settings-row{
  width:100%;
  display:grid;
  grid-template-columns:40px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  border:1px solid #dce2e7;
  border-radius:17px;
  padding:10px;
  background:#fff;
  color:var(--text);
  text-align:right;
}
.settings-row>span{width:40px;height:40px;display:grid;place-items:center;border-radius:13px;background:#edf1f4}.settings-row>div{display:grid;gap:2px}.settings-row b{font-size:12px}.settings-row small{font-size:9px;color:var(--muted)}.settings-row>em{font-style:normal;font-size:9px;color:#5a6671;background:#edf1f4;border-radius:999px;padding:4px 8px}
body[data-build="office36"] .privacy-card{background:#eef3f1;color:#435c51;border-color:#d8e4df}
.settings-signout{min-height:46px;border:1px solid #e3cfd2;border-radius:15px;background:#fbf2f3;color:#8c4b54;font-weight:900}
body[data-build="office36"] .dialog{
  max-width:min(94vw,760px);
  width:760px;
  border-radius:30px;
  overflow:visible;
}
body[data-build="office36"] .dialog::backdrop{background:rgba(35,46,56,.52);backdrop-filter:blur(6px)}
body[data-build="office36"] .dialog-card{
  border:1px solid #d5dce2;
  border-radius:30px;
  padding:25px;
  background:#fbfcfd;
  box-shadow:
    0 9px 0 -3px #d5dce1,
    0 18px 0 -7px #c8d0d6,
    0 36px 90px rgba(31,43,53,.28);
}
body[data-build="office36"] .dialog-card h2{color:#4f5b66}
body[data-build="office36"] .dialog-card input,
body[data-build="office36"] .dialog-card select{border-color:#d5dce2;background:#fff}
body[data-build="office36"] .hint{background:#edf2f5;color:#53616c}
.modal-section-card{border:1px solid #dce2e7;border-radius:22px;background:#f5f7f8;padding:16px;display:grid;gap:12px}
.compact-primary{min-height:50px}
.office-list{display:grid;gap:9px;margin-top:15px}
.office-list-row{
  display:grid;
  grid-template-columns:46px minmax(0,1fr) auto;
  align-items:center;
  gap:11px;
  border:1px solid #dce2e7;
  border-radius:18px;
  padding:11px;
  background:#fff;
}
.office-row-icon{width:46px;height:46px;display:grid;place-items:center;border-radius:15px;background:linear-gradient(145deg,#5c6974,#84919b);color:#fff;font-weight:900}
.office-list-row>div:nth-child(2),.user-row>div:nth-child(2){min-width:0}.office-list-row b{font-size:13px}.office-list-row small{display:block;color:var(--muted);font-size:10px;margin-top:4px}
.row-actions{display:flex;align-items:center;gap:7px}.row-actions .soft-btn{white-space:nowrap}
.system-row{background:#f6f7f8}
.archived-row{background:#f2f4f5;opacity:.76}
.archived-row .office-row-icon{filter:grayscale(1)}
body[data-build="office36"] .user-row{
  grid-template-columns:46px minmax(0,1fr) auto;
  border-color:#dce2e7;
  border-radius:18px;
  background:#fff;
}
.inactive-user{opacity:.68;background:#f1f3f5!important}.restore-soft{color:#397259!important;background:#e8f2ed!important}
body[data-build="office36"] .member-row{border-color:#dce2e7;background:#fff}
body[data-build="office36"] .bulk-users-box{background:#f5f7f8;border-color:#dce2e7}
body[data-build="office36"] .bulk-user-row{background:#fff;border-color:#dce2e7}

@media(max-width:900px){
  .office-topbar{min-height:68px;padding:8px 9px;gap:7px}
  .office-top-brand{min-width:0;gap:6px}.office-top-brand img{width:43px;height:43px;border-radius:13px}.office-top-brand b{font-size:16px}.office-top-brand small{display:none}
  .topbar-btn{width:44px;height:44px;min-height:44px;padding:0;border-radius:14px}.topbar-btn b{display:none}.topbar-actions{gap:5px}
  .dashboard-view{min-height:calc(100dvh - 68px);padding:18px 10px 40px}.dashboard-container{gap:20px}
  .dashboard-hero{min-height:290px;border-radius:26px;padding:32px 15px;box-shadow:0 7px 0 -3px #d7dde2,0 14px 0 -6px #cbd3d9,0 26px 50px rgba(42,54,65,.12)}
  .dashboard-logo{width:100px;height:100px}.dashboard-hero h1{font-size:27px}.dashboard-hero>p{font-size:12px}
  .admin-dashboard,.dashboard-conversations{padding:16px 11px;border-radius:24px}
  .section-heading{align-items:start}.section-heading h2{font-size:19px}.section-heading>small{display:none}
  .admin-action-grid,.conversation-grid{grid-template-columns:1fr}
  .admin-action-card{min-height:94px;grid-template-columns:50px minmax(0,1fr) 22px;padding:12px}.admin-action-card>i{width:50px;height:50px}
  .conversation-card{min-height:82px}
  .workspace-view{height:calc(100dvh - 68px);display:block;padding:0}
  body[data-build="office36"] .chat-panel{height:100%;border:0;border-radius:0;box-shadow:none}
  body[data-build="office36"] .groups-panel{
    position:fixed;z-index:105;inset:68px 0 0;width:100vw;max-width:none;
    transform:translateX(100%);transition:.24s ease;border:0;border-radius:0;
    padding:12px 12px calc(18px + env(safe-area-inset-bottom));overflow:auto;
  }
  body[data-build="office36"] .groups-panel.open{transform:translateX(0)}
  .desktop-home-btn{display:none}
  body[data-build="office36"] .messages-box{padding:11px 8px}
  body[data-build="office36"] .settings-panel{width:calc(100vw - 20px);max-height:calc(100dvh - 92px);padding:20px 15px;border-radius:27px}
  body[data-build="office36"] .dialog{width:calc(100vw - 18px);max-width:calc(100vw - 18px)}
  body[data-build="office36"] .dialog-card{padding:22px 14px;border-radius:27px}
  .office-list-row,.user-row{grid-template-columns:44px minmax(0,1fr)!important}
  .office-list-row .row-actions,.user-row .row-actions{grid-column:1/-1;width:100%;display:grid;grid-template-columns:1fr 1fr}
  .row-actions .soft-btn{width:100%}
  .audio-gallery-btn::after{top:-5px;right:-6px}
}
@media(max-width:430px){
  .office-top-brand div{display:none}
  .office-top-brand{min-width:44px}
  .dashboard-user-line{flex-wrap:wrap}
  body[data-build="office36"] .composer{gap:4px;padding-left:6px;padding-right:6px}
  body[data-build="office36"] .attach-btn,
  body[data-build="office36"] .send-btn{width:41px;height:41px;flex-basis:41px}
}

/* office36: رابط فشرده، رسمی و نقش‌محور */
body[data-build="office36"]{
  font-size:13px;
  background:linear-gradient(145deg,#e9edf0,#f7f8f9 52%,#e1e6ea);
}
body[data-build="office36"] button,
body[data-build="office36"] input,
body[data-build="office36"] select,
body[data-build="office36"] textarea{font-size:12px}

body[data-build="office36"] .login-card{width:min(92vw,380px);padding:24px 22px;border-radius:22px}
body[data-build="office36"] .login-logo{width:88px;height:88px;margin-bottom:10px}
body[data-build="office36"] .login-card h1{font-size:20px;margin-bottom:6px}
body[data-build="office36"] .login-card p{font-size:11px;margin-bottom:16px}
body[data-build="office36"] .field{margin:9px 0}
body[data-build="office36"] .field input{height:46px;border-radius:12px;padding-right:43px;font-size:13px}
body[data-build="office36"] .field i{right:16px;color:#65717c;font-weight:900}
body[data-build="office36"] #togglePass{left:11px;color:#67737e;font-size:9px}
body[data-build="office36"] .login-btn{min-height:46px;border-radius:12px;font-size:13px;margin-top:9px;box-shadow:none}
body[data-build="office36"] .install-line{margin:14px 0;font-size:10px}
body[data-build="office36"] .safe-box{border-radius:12px;padding:11px;font-size:10px}

body[data-build="office36"] .office-topbar{
  min-height:58px;
  padding:7px clamp(9px,2vw,22px);
  gap:8px;
  box-shadow:0 4px 16px rgba(41,54,66,.06);
}
body[data-build="office36"] .topbar-btn{
  min-height:38px;
  height:38px;
  border-radius:10px;
  padding:0 11px;
  gap:6px;
  box-shadow:none;
}
body[data-build="office36"] .topbar-btn.active{box-shadow:none}
body[data-build="office36"] .topbar-btn span{font-size:14px}
body[data-build="office36"] .topbar-btn b{font-size:10px}
body[data-build="office36"] .back-top{color:#53606b;background:#fff}
body[data-build="office36"] .office-top-brand{min-width:160px;gap:7px}
body[data-build="office36"] .office-top-brand img{width:36px;height:36px;border-radius:10px}
body[data-build="office36"] .office-top-brand b{font-size:14px}
body[data-build="office36"] .office-top-brand small{font-size:8px}

body[data-build="office36"] .dashboard-view{
  min-height:calc(100dvh - 58px);
  padding:14px 10px 28px;
}
body[data-build="office36"] .dashboard-container{width:min(980px,100%);gap:12px}
body[data-build="office36"] .dashboard-identity-strip{
  display:grid;
  grid-template-columns:44px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  min-height:66px;
  padding:9px 11px;
  border:1px solid #d5dde3;
  border-radius:15px;
  background:rgba(251,252,253,.96);
  box-shadow:0 8px 24px rgba(45,57,68,.06);
}
body[data-build="office36"] .dashboard-logo{
  width:42px;
  height:42px;
  margin:0;
  padding:3px;
  border:1px solid #dce1e5;
  border-radius:11px;
  background:#f6f4ef;
  filter:none;
}
body[data-build="office36"] .dashboard-identity-copy{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:3px 8px;min-width:0}
body[data-build="office36"] .dashboard-identity-copy .role-badge{grid-column:1;padding:3px 8px;font-size:8px;border-radius:7px}
body[data-build="office36"] .dashboard-identity-copy h1{grid-column:2;margin:0;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#394651}
body[data-build="office36"] .dashboard-identity-copy p{grid-column:1/-1;margin:0;color:#7a858e;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body[data-build="office36"] .dashboard-user-line{
  max-width:220px;
  min-width:0;
  justify-content:flex-start;
  gap:5px;
  margin:0;
  padding:6px 9px;
  border-radius:10px;
  white-space:nowrap;
}
body[data-build="office36"] .dashboard-user-line b{max-width:120px;font-size:10px;overflow:hidden;text-overflow:ellipsis}
body[data-build="office36"] .dashboard-user-line small{font-size:8px}
body[data-build="office36"] .status-dot{width:6px;height:6px;box-shadow:0 0 0 3px rgba(60,158,114,.1)}

body[data-build="office36"] .dashboard-conversations{
  padding:14px;
  border-radius:16px;
  box-shadow:0 8px 26px rgba(45,57,68,.055);
}
body[data-build="office36"] .section-heading{align-items:center;margin-bottom:10px}
body[data-build="office36"] .section-heading div{gap:1px}
body[data-build="office36"] .section-heading span{font-size:8px}
body[data-build="office36"] .section-heading h2{font-size:15px}
body[data-build="office36"] .section-heading>small{font-size:9px}
body[data-build="office36"] .conversation-grid{gap:7px}
body[data-build="office36"] .conversation-card{
  min-height:62px;
  grid-template-columns:38px minmax(0,1fr) auto;
  gap:9px;
  padding:8px 9px;
  border-radius:12px;
  box-shadow:none;
}
body[data-build="office36"] .conversation-card:hover{transform:none;box-shadow:none}
body[data-build="office36"] .conversation-icon{
  width:38px;
  height:38px;
  border-radius:10px;
  font-size:13px;
  background:#65727d;
}
body[data-build="office36"] .conversation-copy{gap:3px}
body[data-build="office36"] .conversation-title b{font-size:12px}
body[data-build="office36"] .conversation-title time{font-size:8px}
body[data-build="office36"] .conversation-copy small{font-size:9px}
body[data-build="office36"] .conversation-arrow{font-size:18px}
body[data-build="office36"] .unread-badge{min-width:19px;height:19px;padding:0 5px;font-size:9px}
body[data-build="office36"] .training-conversation{background:#f7f8f9}
body[data-build="office36"] .training-icon{background:#606b75}
body[data-build="office36"] .group-section-title{
  margin:13px 0 7px;
  padding:7px 9px;
  border:1px solid #dfe4e8;
  border-radius:10px;
  background:#f0f3f5;
}
body[data-build="office36"] .group-section-title b{font-size:11px}
body[data-build="office36"] .group-section-title span{font-size:8px;padding:3px 7px;background:#fff}
body[data-build="office36"] .inline-empty,
body[data-build="office36"] .empty-dashboard{padding:12px;border-radius:10px;font-size:10px}

body[data-build="office36"] .workspace-view{
  height:calc(100dvh - 58px);
  grid-template-columns:290px minmax(0,1fr);
  gap:8px;
  padding:8px;
}
body[data-build="office36"] .groups-panel,
body[data-build="office36"] .chat-panel{border-radius:15px;box-shadow:0 8px 26px rgba(43,55,66,.07)}
body[data-build="office36"] .groups-panel{padding:9px;gap:7px}
body[data-build="office36"] .messenger-brand{min-height:50px;padding:7px 8px;border-radius:12px}
body[data-build="office36"] .messenger-brand img{width:34px;height:34px;border-radius:9px}
body[data-build="office36"] .messenger-brand b{font-size:13px}
body[data-build="office36"] .messenger-brand small{font-size:8px}
body[data-build="office36"] .messenger-brand>span{font-size:8px;padding:3px 6px}
body[data-build="office36"] .panel-head h2{font-size:14px}
body[data-build="office36"] .panel-head small{font-size:9px}
body[data-build="office36"] .search{height:36px;border-radius:10px;padding:0 10px;font-size:11px}
body[data-build="office36"] .private-chat-box{gap:6px;padding-bottom:7px}
body[data-build="office36"] .private-title b{font-size:11px}
body[data-build="office36"] .private-title small{font-size:8px}
body[data-build="office36"] .groups-list{gap:6px}
body[data-build="office36"] .group-item{padding:7px;border-radius:11px;gap:8px}
body[data-build="office36"] .group-item h3{font-size:11px;margin-bottom:2px}
body[data-build="office36"] .group-item small{font-size:8px}
body[data-build="office36"] .avatar{width:36px;height:36px;border-radius:10px;font-size:11px}

body[data-build="office36"] .chat-head{
  height:54px;
  min-height:54px;
  padding:7px 9px;
  gap:6px;
}
body[data-build="office36"] .header-avatar{width:36px;height:36px;flex-basis:36px;border-radius:10px;font-size:12px}
body[data-build="office36"] .group-title h1{font-size:13px}
body[data-build="office36"] .group-title small{font-size:8px}
body[data-build="office36"] .chat-head-actions{gap:4px}
body[data-build="office36"] .chat-head-actions .icon-btn,
body[data-build="office36"] .chat-head>.icon-btn{width:34px;height:34px;padding:0;border-radius:9px;font-size:13px}
body[data-build="office36"] .manage-group-btn:not([hidden]){min-height:34px;padding:0 9px;border-radius:9px;font-size:9px}
body[data-build="office36"] .training-notice{margin:5px 7px 0;padding:6px 8px;border-radius:10px}
body[data-build="office36"] .training-notice>span{width:28px;height:28px;display:grid;place-items:center;border-radius:8px;background:#65717c;color:#fff;font-size:11px}
body[data-build="office36"] .training-notice b{font-size:10px}
body[data-build="office36"] .training-notice small{font-size:8px}
body[data-build="office36"] .messages-box{padding:9px;gap:8px}
body[data-build="office36"] .blank-chat{font-size:11px}
body[data-build="office36"] .msg{gap:6px}
body[data-build="office36"] .msg .avatar{width:29px;height:29px;border-radius:8px}
body[data-build="office36"] .bubble{padding:7px 9px;border-radius:13px;line-height:1.65;box-shadow:none}
body[data-build="office36"] .bubble b{font-size:9px}
body[data-build="office36"] .bubble p{font-size:12px;line-height:1.65}
body[data-build="office36"] .bubble time,
body[data-build="office36"] .msg-foot{font-size:8px}
body[data-build="office36"] .bubble img.msg-image{max-width:220px;border-radius:10px}
body[data-build="office36"] .bubble audio{max-width:240px;min-height:36px}
body[data-build="office36"] .compose-area{border-top:1px solid #dfe4e8}
body[data-build="office36"] .composer{min-height:54px;padding:6px 7px;gap:5px}
body[data-build="office36"] .composer textarea{min-height:38px;max-height:92px;padding:9px 10px;border-radius:11px;line-height:1.45;font-size:12px}
body[data-build="office36"] .attach-btn,
body[data-build="office36"] .send-btn{width:38px;height:38px;flex-basis:38px;padding:0;border-radius:10px;font-size:13px}
body[data-build="office36"] .audio-gallery-btn::after{font-size:6px;top:-4px;right:-5px}
body[data-build="office36"] .recording-panel,
body[data-build="office36"] .audio-upload-panel{margin:5px 7px;padding:7px;border-radius:10px}

body[data-build="office36"] .settings-panel{
  width:min(450px,calc(100vw - 22px));
  max-height:min(700px,calc(100dvh - 24px));
  padding:16px;
  border-radius:18px;
  box-shadow:0 20px 60px rgba(31,43,53,.24);
}
body[data-build="office36"] .settings-panel .panel-head h2{font-size:17px}
body[data-build="office36"] .eyebrow{font-size:8px}
body[data-build="office36"] .profile-box{padding:9px;border-radius:12px}
body[data-build="office36"] .avatar.big{width:46px;height:46px;border-radius:12px}
body[data-build="office36"] .profile-box b{font-size:12px}
body[data-build="office36"] .profile-box small{font-size:9px;margin-top:2px}
body[data-build="office36"] #settingsRole{font-size:8px;margin-top:3px}
body[data-build="office36"] .avatar-upload{padding:8px;border-radius:10px;font-size:10px}
body[data-build="office36"] .settings-section{gap:6px;padding-top:10px}
body[data-build="office36"] .settings-section h3{font-size:11px}
body[data-build="office36"] .theme-card{padding:8px;border-radius:11px}
body[data-build="office36"] .theme-card b{font-size:10px}
body[data-build="office36"] .theme-card small{font-size:8px}
body[data-build="office36"] .swatch{width:22px;height:22px}
body[data-build="office36"] .settings-row{grid-template-columns:32px minmax(0,1fr) auto;gap:7px;padding:7px;border-radius:11px}
body[data-build="office36"] .settings-row>span{width:32px;height:32px;border-radius:8px;font-size:12px}
body[data-build="office36"] .settings-row b{font-size:10px}
body[data-build="office36"] .settings-row small{font-size:8px}
body[data-build="office36"] .settings-row>em{font-size:8px}
body[data-build="office36"] .privacy-card{padding:8px;border-radius:11px}
body[data-build="office36"] .privacy-card>span{font-size:14px}
body[data-build="office36"] .privacy-card b{font-size:10px}
body[data-build="office36"] .privacy-card small{font-size:8px}
body[data-build="office36"] .settings-signout{min-height:38px;border-radius:10px;font-size:10px}

body[data-build="office36"] .dialog{width:680px;max-width:min(94vw,680px);border-radius:18px}
body[data-build="office36"] .dialog-card{padding:17px;border-radius:18px;gap:10px;max-height:86dvh}
body[data-build="office36"] .dialog-card h2{font-size:17px}
body[data-build="office36"] .dialog-card h3{font-size:13px}
body[data-build="office36"] .dialog-card label{font-size:10px;margin-bottom:4px}
body[data-build="office36"] .dialog-card input,
body[data-build="office36"] .dialog-card select{min-height:40px;border-radius:10px;padding:0 10px;font-size:11px}
body[data-build="office36"] .dialog-card .x{width:34px;height:34px;border-radius:9px;font-size:17px}
body[data-build="office36"] .hint{padding:8px 10px;border-radius:10px;font-size:9px}
body[data-build="office36"] .modal-section-card{padding:11px;border-radius:12px;gap:8px}
body[data-build="office36"] .compact-primary{min-height:40px}
body[data-build="office36"] .office-list{gap:6px;margin-top:9px}
body[data-build="office36"] .office-list-row,
body[data-build="office36"] .user-row{
  grid-template-columns:36px minmax(0,1fr) auto;
  gap:8px;
  padding:7px;
  border-radius:11px;
}
body[data-build="office36"] .office-row-icon{width:36px;height:36px;border-radius:9px;font-size:11px}
body[data-build="office36"] .office-list-row b{font-size:11px}
body[data-build="office36"] .office-list-row small{font-size:8px;margin-top:2px}
body[data-build="office36"] .row-actions .soft-btn{padding:7px 9px;border-radius:8px;font-size:9px}
body[data-build="office36"] .member-row,
body[data-build="office36"] .bulk-user-row{padding:7px;border-radius:10px;font-size:10px}

body[data-build="office36"] .admin-menu-hint{margin:0}
body[data-build="office36"] .admin-menu-list{display:grid;gap:6px}
body[data-build="office36"] .admin-menu-row{
  width:100%;
  min-height:58px;
  display:grid;
  grid-template-columns:34px minmax(0,1fr) 16px;
  align-items:center;
  gap:9px;
  padding:8px 10px;
  border:1px solid #d9e0e5;
  border-radius:11px;
  background:#fff;
  color:#34414c;
  text-align:right;
}
body[data-build="office36"] .admin-menu-row>span{width:34px;height:34px;display:grid;place-items:center;border-radius:8px;background:#e9edf0;color:#53606b;font-size:9px;font-weight:900}
body[data-build="office36"] .admin-menu-row>div{display:grid;gap:2px;min-width:0}
body[data-build="office36"] .admin-menu-row b{font-size:11px}
body[data-build="office36"] .admin-menu-row small{font-size:8px;color:#7a858e}
body[data-build="office36"] .admin-menu-row i{font-style:normal;font-size:16px;color:#89949d}

@media(max-width:900px){
  body[data-build="office36"]{font-size:12px}
  body[data-build="office36"] .office-topbar{min-height:54px;padding:6px 7px}
  body[data-build="office36"] .topbar-btn{width:36px;height:36px;min-height:36px;padding:0;border-radius:9px}
  body[data-build="office36"] .office-top-brand img{width:34px;height:34px;border-radius:9px}
  body[data-build="office36"] .dashboard-view{min-height:calc(100dvh - 54px);padding:9px 7px 20px}
  body[data-build="office36"] .dashboard-container{gap:8px}
  body[data-build="office36"] .dashboard-identity-strip{grid-template-columns:38px minmax(0,1fr) auto;gap:7px;min-height:57px;padding:7px;border-radius:12px}
  body[data-build="office36"] .dashboard-logo{width:36px;height:36px;border-radius:9px}
  body[data-build="office36"] .dashboard-identity-copy{gap:1px 5px}
  body[data-build="office36"] .dashboard-identity-copy h1{font-size:12px}
  body[data-build="office36"] .dashboard-identity-copy p{font-size:8px}
  body[data-build="office36"] .dashboard-user-line{max-width:118px;padding:5px 6px}
  body[data-build="office36"] .dashboard-user-line b{max-width:74px;font-size:9px}
  body[data-build="office36"] .dashboard-user-line small{display:none}
  body[data-build="office36"] .dashboard-conversations{padding:10px 8px;border-radius:12px}
  body[data-build="office36"] .section-heading h2{font-size:13px}
  body[data-build="office36"] .section-heading>small{display:none}
  body[data-build="office36"] .conversation-grid{grid-template-columns:1fr}
  body[data-build="office36"] .conversation-card{min-height:58px}
  body[data-build="office36"] .workspace-view{height:calc(100dvh - 54px);padding:0}
  body[data-build="office36"] .groups-panel{inset:54px 0 0;padding:8px 8px calc(10px + env(safe-area-inset-bottom))}
  body[data-build="office36"] .chat-head{height:50px;min-height:50px;padding:6px}
  body[data-build="office36"] .chat-head-actions .icon-btn,
  body[data-build="office36"] .chat-head>.icon-btn{width:32px;height:32px;border-radius:8px}
  body[data-build="office36"] .header-avatar{width:34px;height:34px;flex-basis:34px;border-radius:9px}
  body[data-build="office36"] .group-title h1{font-size:11px}
  body[data-build="office36"] .group-title small{font-size:7px}
  body[data-build="office36"] .manage-group-btn:not([hidden]){width:32px;height:32px;min-width:32px;flex-basis:32px;border-radius:8px}
  body[data-build="office36"] .manage-group-btn:not([hidden])::before{content:'⚙';font-size:14px}
  body[data-build="office36"] .messages-box{padding:7px 6px 9px}
  body[data-build="office36"] .msg{max-width:90%!important}
  body[data-build="office36"] .bubble{max-width:calc(100vw - 76px)!important}
  body[data-build="office36"] .bubble p{font-size:11px}
  body[data-build="office36"] .composer{min-height:50px;padding:5px 6px calc(5px + env(safe-area-inset-bottom))}
  body[data-build="office36"] .composer textarea{min-height:36px;padding:8px 9px;font-size:12px}
  body[data-build="office36"] .attach-btn,
  body[data-build="office36"] .send-btn{width:36px;height:36px;flex-basis:36px;border-radius:9px}
  body[data-build="office36"] .settings-panel{width:calc(100vw - 12px);max-height:calc(100dvh - 68px);padding:13px 11px;border-radius:16px}
  body[data-build="office36"] .dialog{width:calc(100vw - 12px);max-width:calc(100vw - 12px)}
  body[data-build="office36"] .dialog-card{padding:14px 10px;border-radius:16px}
  body[data-build="office36"] .office-list-row,
  body[data-build="office36"] .user-row{grid-template-columns:34px minmax(0,1fr)!important}
}

@media(max-width:430px){
  body[data-build="office36"] .office-top-brand{min-width:36px}
  body[data-build="office36"] .dashboard-user-line{max-width:100px}
  body[data-build="office36"] .dashboard-user-line b{max-width:59px}
}

/* office36: خروج بالایی، تنظیمات سالم و سربرگ گفتگوی مرتب */
body[data-build="office36"] .logout-top{
  color:#8a4d56;
  border-color:#e1cfd3;
  background:#fffafa;
}
body[data-build="office36"] #dashboardBtn{grid-column:1}
body[data-build="office36"] .topbar-actions{grid-column:3}
body[data-build="office36"] .logout-top:hover{
  background:#f8edef;
  border-color:#d5b9bf;
}
body[data-build="office36"][data-role="seller"] .office-topbar,
body[data-build="office36"][data-role="accountant"] .office-topbar{
  grid-template-columns:1fr auto 1fr;
}
body[data-build="office36"][data-role="seller"] #dashboardBtn,
body[data-build="office36"][data-role="accountant"] #dashboardBtn{
  display:none!important;
}
body[data-build="office36"] .chat-head{
  min-width:0;
  overflow:hidden;
}
body[data-build="office36"] .group-title{
  min-width:0;
  flex:1 1 auto;
  margin:0;
}
body[data-build="office36"] .group-title h1,
body[data-build="office36"] .group-title small{
  display:block;
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
body[data-build="office36"] .chat-head-actions,
body[data-build="office36"] .manage-group-btn{
  flex:0 0 auto;
}

@media(max-width:900px){
  body[data-build="office36"] .office-topbar{
    grid-template-columns:minmax(112px,1fr) auto minmax(36px,1fr);
  }
  body[data-build="office36"][data-role="seller"] .office-topbar,
  body[data-build="office36"][data-role="accountant"] .office-topbar{
    grid-template-columns:minmax(112px,1fr) auto minmax(36px,1fr);
  }
  body[data-build="office36"] .topbar-actions{
    min-width:0;
    gap:4px;
  }
  body[data-build="office36"] .topbar-actions .topbar-btn{
    width:34px;
    min-width:34px;
    height:34px;
    min-height:34px;
  }
  body[data-build="office36"] .topbar-actions .logout-top{
    width:auto;
    min-width:58px;
    padding:0 8px;
  }
  body[data-build="office36"] .logout-top b{
    display:inline;
    font-size:9px;
  }
  body[data-build="office36"] .logout-top span{font-size:13px}

  body[data-build="office36"] .settings-panel,
  body[data-build="office36"] .settings-panel.open{
    position:fixed!important;
    inset:62px 7px 7px!important;
    width:auto!important;
    max-width:none!important;
    height:auto!important;
    max-height:none!important;
    margin:0!important;
    padding:12px 10px calc(12px + env(safe-area-inset-bottom))!important;
    border-radius:15px!important;
    transform:none!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
  }
  body[data-build="office36"] .settings-panel{
    opacity:0;
    visibility:hidden;
    pointer-events:none;
  }
  body[data-build="office36"] .settings-panel.open{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
  }
  body[data-build="office36"] .settings-panel .panel-head{
    position:sticky;
    top:-12px;
    z-index:2;
    margin:-12px -10px 4px;
    padding:12px 10px 8px;
    background:rgba(251,252,253,.97);
    border-bottom:1px solid #e0e5e9;
    backdrop-filter:blur(12px);
  }

  body[data-build="office36"] .chat-head{
    display:flex;
    align-items:center;
    gap:5px;
    padding:5px 6px;
  }
  body[data-build="office36"] .chat-head-actions{
    display:flex;
    gap:4px;
  }
  body[data-build="office36"] #notifyBtn,
  body[data-build="office36"] #openSettingsChat{
    display:none!important;
  }
  body[data-build="office36"] .manage-group-btn:not([hidden]){
    width:32px!important;
    min-width:32px!important;
    max-width:32px!important;
    height:32px!important;
    min-height:32px!important;
    flex-basis:32px!important;
    padding:0!important;
    border-radius:8px!important;
    font-size:0!important;
    line-height:0!important;
    overflow:hidden!important;
    color:transparent!important;
  }
  body[data-build="office36"] .manage-group-btn:not([hidden])::before{
    content:'⚙'!important;
    display:block;
    color:#596570;
    font-size:14px!important;
    line-height:1!important;
  }
  body[data-build="office36"] .chat-head .header-avatar{
    width:32px;
    min-width:32px;
    height:32px;
    flex-basis:32px;
  }
  body[data-build="office36"] .chat-head .group-title h1{font-size:11px}
  body[data-build="office36"] .chat-head .group-title small{font-size:7px}
}

@media(max-width:390px){
  body[data-build="office36"] .office-top-brand div{display:none}
  body[data-build="office36"] .office-top-brand{min-width:34px}
  body[data-build="office36"] .topbar-actions .topbar-btn{
    width:32px;
    min-width:32px;
    height:32px;
    min-height:32px;
  }
  body[data-build="office36"] .topbar-actions .logout-top{
    width:auto;
    min-width:54px;
    padding:0 7px;
  }
}

/* Office36: لوگوی بدون قاب و نوشتن مستقیم در تمام گفت‌وگوهای مجاز */
body[data-build="office36"] .office-top-brand img,
body[data-build="office36"] .dashboard-logo,
body[data-build="office36"] .messenger-brand img{
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  filter:none!important;
}
body[data-build="office36"] .chat-panel{
  min-height:0!important;
  overflow:hidden!important;
}
body[data-build="office36"] .messages-box{
  flex:1 1 0!important;
  min-height:0!important;
  overflow-y:auto!important;
}
body[data-build="office36"] .compose-area{
  flex:0 0 auto!important;
  min-height:0;
  position:relative!important;
  inset:auto!important;
  z-index:12;
  background:rgba(247,249,250,.98)!important;
  backdrop-filter:blur(12px);
}
body[data-build="office36"] .compose-area.composer-enabled{
  display:block!important;
}
body[data-build="office36"] #composer:not([hidden]),
body[data-build="office36"] #composer[aria-hidden="false"]{
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
}

@media(max-width:900px){
  body[data-build="office36"] .workspace-view:not([hidden]){
    display:block!important;
    height:calc(100dvh - 54px)!important;
    min-height:0!important;
    overflow:hidden!important;
  }
  body[data-build="office36"] .chat-panel{
    display:flex!important;
    flex-direction:column!important;
    height:100%!important;
    min-height:0!important;
  }
  body[data-build="office36"] .messages-box{
    flex:1 1 0!important;
    min-height:0!important;
  }
  body[data-build="office36"] .compose-area{
    flex:0 0 auto!important;
    padding-bottom:env(safe-area-inset-bottom);
  }
}

/* Office36 final: سربرگ یکدست و مرتب برای مدیر، فروشنده و حسابدار */
body[data-build="office36"] .office-topbar{
  direction:ltr;
  grid-template-columns:minmax(108px,1fr) auto minmax(40px,1fr);
  min-height:56px;
  padding:7px clamp(10px,2vw,20px);
  column-gap:10px;
}
body[data-build="office36"] #dashboardBtn{
  grid-column:3;
  grid-row:1;
  justify-self:end;
  direction:rtl;
}
body[data-build="office36"] .office-top-brand{
  grid-column:2;
  grid-row:1;
  justify-self:center;
  direction:rtl;
  min-width:0;
}
body[data-build="office36"] .topbar-actions{
  grid-column:1;
  grid-row:1;
  justify-self:start;
  direction:ltr;
  min-width:0;
  gap:6px;
}
body[data-build="office36"] .topbar-actions .topbar-btn{
  direction:rtl;
}
body[data-build="office36"] .office-top-brand img{
  width:38px!important;
  height:38px!important;
  object-fit:contain;
}

body[data-build="office36"] .chat-head{
  direction:ltr;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr) auto auto;
  grid-template-areas:"actions title avatar menu";
  align-items:center;
  min-height:52px;
  height:52px;
  padding:6px 9px;
  gap:7px;
  overflow:hidden;
  background:rgba(250,251,252,.97);
  border-bottom:1px solid #dce2e7;
}
body[data-build="office36"] #backGroups{
  grid-area:menu;
  direction:rtl;
  margin:0;
}
body[data-build="office36"] .chat-head .header-avatar{
  grid-area:avatar;
  direction:rtl;
  margin:0;
}
body[data-build="office36"] .chat-head .group-title{
  grid-area:title;
  direction:rtl;
  text-align:right;
  width:100%;
  min-width:0;
  margin:0;
}
body[data-build="office36"] .chat-head-actions{
  grid-area:actions;
  direction:ltr;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  min-width:0;
  gap:5px;
  margin:0;
}
body[data-build="office36"] .chat-head-actions .icon-btn,
body[data-build="office36"] .chat-head > .icon-btn{
  width:34px;
  min-width:34px;
  height:34px;
  min-height:34px;
  flex:0 0 34px;
  padding:0;
  border-radius:9px;
  display:grid;
  place-items:center;
  font-size:13px;
  line-height:1;
}
body[data-build="office36"] .manage-group-btn:not([hidden]){
  width:34px!important;
  min-width:34px!important;
  max-width:34px!important;
  height:34px!important;
  min-height:34px!important;
  flex:0 0 34px!important;
  padding:0!important;
  border-radius:9px!important;
  color:#596570!important;
  font-size:13px!important;
  line-height:1!important;
  overflow:hidden!important;
}
body[data-build="office36"] .manage-group-btn:not([hidden])::before{
  content:none!important;
  display:none!important;
}
body[data-build="office36"] .group-title h1{
  margin:0;
  font-size:12px;
  line-height:1.45;
}
body[data-build="office36"] .group-title small{
  margin-top:1px;
  font-size:8px;
  line-height:1.35;
}

@media(max-width:900px){
  body[data-build="office36"] .office-topbar{
    grid-template-columns:minmax(96px,1fr) auto minmax(36px,1fr);
    min-height:54px;
    height:54px;
    padding:6px 9px;
    gap:6px;
  }
  body[data-build="office36"] .office-top-brand div{
    display:none;
  }
  body[data-build="office36"] .office-top-brand img{
    width:34px!important;
    height:34px!important;
  }
  body[data-build="office36"] .topbar-actions{
    gap:5px;
  }
  body[data-build="office36"] .topbar-actions .topbar-btn,
  body[data-build="office36"] #dashboardBtn{
    width:34px;
    min-width:34px;
    height:34px;
    min-height:34px;
    padding:0;
    border-radius:9px;
  }
  body[data-build="office36"] .topbar-actions .logout-top{
    width:auto;
    min-width:52px;
    padding:0 9px;
  }
  body[data-build="office36"] .topbar-btn b{
    display:none;
  }
  body[data-build="office36"] .logout-top b{
    display:inline;
    font-size:9px;
  }
  body[data-build="office36"] .chat-head{
    grid-template-columns:auto minmax(0,1fr) 32px 32px;
    min-height:50px;
    height:50px;
    padding:5px 7px;
    gap:5px;
  }
  body[data-build="office36"] .chat-head .header-avatar,
  body[data-build="office36"] .chat-head-actions .icon-btn,
  body[data-build="office36"] .chat-head > .icon-btn{
    width:32px;
    min-width:32px;
    height:32px;
    min-height:32px;
    flex-basis:32px;
    border-radius:8px;
  }
  body[data-build="office36"] .manage-group-btn:not([hidden]){
    width:32px!important;
    min-width:32px!important;
    max-width:32px!important;
    height:32px!important;
    min-height:32px!important;
    flex-basis:32px!important;
    border-radius:8px!important;
  }
  body[data-build="office36"] #notifyBtn,
  body[data-build="office36"] #openSettingsChat{
    display:none!important;
  }
  body[data-build="office36"] .group-title h1{
    font-size:11px;
  }
  body[data-build="office36"] .group-title small{
    font-size:7px;
  }
}

@media(max-width:360px){
  body[data-build="office36"] .office-topbar{
    grid-template-columns:minmax(91px,1fr) 32px minmax(32px,1fr);
    padding-left:6px;
    padding-right:6px;
  }
  body[data-build="office36"] .topbar-actions{
    gap:3px;
  }
  body[data-build="office36"] .topbar-actions .topbar-btn,
  body[data-build="office36"] #dashboardBtn{
    width:31px;
    min-width:31px;
    height:31px;
    min-height:31px;
  }
  body[data-build="office36"] .topbar-actions .logout-top{
    width:auto;
    min-width:48px;
    padding:0 6px;
  }
  body[data-build="office36"] .chat-head{
    grid-template-columns:auto minmax(0,1fr) 30px 30px;
    padding-left:5px;
    padding-right:5px;
    gap:4px;
  }
  body[data-build="office36"] .chat-head .header-avatar,
  body[data-build="office36"] .chat-head-actions .icon-btn,
  body[data-build="office36"] .chat-head > .icon-btn{
    width:30px;
    min-width:30px;
    height:30px;
    min-height:30px;
    flex-basis:30px;
  }
}

/* Office36: بازگشت مرحله‌ای فقط برای فروشنده و حسابدار */
body[data-build="office36"] #roleBackBtn{
  grid-column:3;
  grid-row:1;
  justify-self:end;
  direction:rtl;
  color:#4f5c67;
  background:#fff;
  border-color:#d4dce2;
  box-shadow:0 3px 10px rgba(44,57,68,.05);
}
body[data-build="office36"] #roleBackBtn svg{
  width:17px;
  height:17px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
body[data-build="office36"] #roleBackBtn:hover{
  color:#37444f;
  background:#f2f5f7;
  border-color:#bcc7cf;
}
body[data-build="office36"][data-role="admin"] #roleBackBtn{
  display:none!important;
}
body[data-build="office36"][data-role="seller"] #roleBackBtn:not([hidden]),
body[data-build="office36"][data-role="accountant"] #roleBackBtn:not([hidden]){
  display:inline-flex;
}

@media(max-width:900px){
  body[data-build="office36"] #roleBackBtn{
    width:34px;
    min-width:34px;
    height:34px;
    min-height:34px;
    padding:0;
    border-radius:9px;
  }
  body[data-build="office36"] #roleBackBtn b{
    display:none;
  }
  body[data-build="office36"] #roleBackBtn svg{
    width:16px;
    height:16px;
  }
}

@media(max-width:360px){
  body[data-build="office36"] #roleBackBtn{
    width:31px;
    min-width:31px;
    height:31px;
    min-height:31px;
  }
}

/* Office36: ابزارهای استاندارد نوار پیام و انتخاب مطمئن گفت‌وگو در دسکتاپ */
body[data-build="office36"] .composer .composer-tool,
body[data-build="office36"] .composer .send-btn{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  align-self:center;
  line-height:0!important;
  vertical-align:middle;
}
body[data-build="office36"] .composer .composer-tool{
  position:relative;
  cursor:pointer;
  color:#53616d;
}
body[data-build="office36"] .composer .composer-icon{
  display:block;
  width:18px;
  height:18px;
  flex:0 0 18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
  pointer-events:none;
}
body[data-build="office36"] .composer .audio-gallery-btn::after{
  content:none!important;
  display:none!important;
}
body[data-build="office36"] #recordBtn.recording .composer-icon{
  opacity:0;
}
body[data-build="office36"] #recordBtn.recording::before{
  content:"";
  position:absolute;
  inset:50% auto auto 50%;
  width:11px;
  height:11px;
  border-radius:50%;
  background:#bf4550;
  transform:translate(-50%,-50%);
  box-shadow:0 0 0 4px rgba(191,69,80,.12);
}
body[data-build="office36"] #groupsPanel .group-item.opening-chat{
  border-color:#9eabb5;
  background:#f0f3f5;
  opacity:.72;
  cursor:progress;
}

@media(max-width:900px){
  body[data-build="office36"] .composer .composer-icon{
    width:17px;
    height:17px;
    flex-basis:17px;
  }
}

/* Office38: کارت‌های سبک و خوانای گزارش عملکرد فروش */
.messages-box .msg.report-msg{
  align-self:stretch!important;
  width:100%!important;
  max-width:100%!important;
  align-items:flex-start;
}
.messages-box .msg.report-msg .bubble{
  width:min(100%,980px)!important;
  max-width:calc(100% - 42px)!important;
  padding:8px!important;
  background:#fff!important;
  color:#263440!important;
  border:1px solid #dfe6ec!important;
  box-shadow:0 10px 30px rgba(36,52,65,.07)!important;
}
.messages-box .msg.report-msg .bubble>b{
  color:#647381!important;
  padding:2px 5px 7px;
}
.sales-report-card{
  --report-green:#257453;
  --report-blue:#376f9f;
  --report-amber:#9a681e;
  --report-red:#a94851;
  overflow:hidden;
  border:1px solid #e2e8ed;
  border-radius:15px;
  background:#fbfcfd;
  direction:rtl;
}
.sales-report-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:13px 14px;
  background:linear-gradient(135deg,#f2f5f7,#e9eef1);
  border-bottom:1px solid #dde4e9;
}
.sales-report-head h3{margin:2px 0 0;font-size:17px;color:#273640}
.sales-report-head small{display:block;color:#73808b;font-size:10px}
.report-score{
  min-width:65px;
  min-height:56px;
  border-radius:14px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  font-weight:900;
  font-size:17px;
  background:#eef2f5;
  color:#5d6a75;
}
.report-score small{font-size:9px;color:inherit}
.report-score.done,.report-percent.done,.report-target-now em.done{background:#e1f3ea;color:var(--report-green)}
.report-score.good,.report-percent.good,.report-target-now em.good{background:#e4eef8;color:var(--report-blue)}
.report-score.mid,.report-percent.mid,.report-target-now em.mid{background:#fff1d9;color:var(--report-amber)}
.report-score.low,.report-percent.low,.report-target-now em.low{background:#fbe8e9;color:var(--report-red)}
.report-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.sales-report-card table{
  width:100%;
  min-width:0;
  border-collapse:collapse;
  background:#fff;
  font-size:11px;
}
.sales-report-card th,.sales-report-card td{
  position:static;
  padding:9px 10px;
  border-bottom:1px solid #edf1f4;
  text-align:right;
  vertical-align:middle;
  line-height:1.8;
}
.sales-report-card thead th{background:#f4f6f8;color:#4e5d69;white-space:nowrap}
.report-summary-table th{width:124px;white-space:nowrap;background:#f7f9fa;color:#40525f}
.report-summary-table td{font-weight:700;color:#354651}
.report-target-table td,.report-target-table th{text-align:center;white-space:nowrap}
.report-target-now{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  color:#54636f;
  background:#f8fafb;
  border-top:1px solid #edf1f4;
  border-bottom:1px solid #edf1f4;
}
.report-target-now b{text-align:center;color:#253945;font-size:13px}
.report-target-now em,.report-percent{font-style:normal;border-radius:999px;padding:3px 8px;font-weight:900;white-space:nowrap}
.report-note{
  margin:10px!important;
  padding:10px 12px;
  border-right:3px solid #758995;
  border-radius:10px;
  background:#f1f5f7;
  color:#43545f;
  font-size:11px!important;
  line-height:1.95!important;
}
.sales-report-card footer{padding:8px 11px;color:#7c8993;font-size:9px;line-height:1.8}
.manager-report-table{min-width:850px!important}
.manager-report-table th,.manager-report-table td{text-align:center;white-space:nowrap}
.manager-report-table tbody th{text-align:right;min-width:125px}
.manager-report-table tfoot th,.manager-report-table tfoot td{background:#eef2f5;font-weight:900}
.manager-report-table .cell-rate{display:block;color:#75828c;font-size:8px;line-height:1.3}
.trial-label{display:inline-block!important;margin-right:5px;padding:2px 6px;border-radius:999px;background:#fff0cc;color:#895f20!important;font-size:8px!important}
.msg.report-msg .msg-actions{padding:0 5px}
.msg.report-msg .msg-foot{padding:0 5px 4px}
.dark-mode .messages-box .msg.report-msg .bubble{background:#1f292f!important;color:#edf3f5!important;border-color:#3b4951!important}

/* رفع رنگ سفید در گزارش‌های فورواردشده‌ی خود مدیر: نام فروشنده‌ها و مبلغ وصولی باید خوانا بمانند */
.messages-box .msg.report-msg.mine .sales-report-card b,
.messages-box .msg.report-msg.mine .sales-report-card th,
.messages-box .msg.report-msg.mine .sales-report-card td,
.messages-box .msg.report-msg.mine .sales-report-card span,
.messages-box .msg.report-msg.mine .sales-report-card small,
.messages-box .msg.report-msg.mine .sales-report-card em,
.messages-box .msg.report-msg.mine .sales-report-card footer,
.messages-box .msg.report-msg.mine .sales-report-card h3{
  color:inherit!important;
}
.messages-box .msg.report-msg.mine .sales-report-card .report-target-now b{color:#253945!important}
.messages-box .msg.report-msg.mine .sales-report-card .sales-report-head h3{color:#253945!important}
.messages-box .msg.report-msg.mine .sales-report-card .manager-report-table tbody th b{color:#263440!important}
.messages-box .msg.report-msg.mine .sales-report-card .manager-report-table tfoot th,
.messages-box .msg.report-msg.mine .sales-report-card .manager-report-table tfoot td{color:#263440!important}
.messages-box .msg.report-msg .bubble time{color:#6d7c87!important}

.dark-mode .sales-report-card{background:#202a30;border-color:#3b4951}
.dark-mode .sales-report-head,.dark-mode .report-target-now,.dark-mode .report-note{background:#27343b;color:#dfe8ec;border-color:#3b4951}
.dark-mode .sales-report-card table,.dark-mode .sales-report-card th,.dark-mode .sales-report-card td{background:#202a30;color:#e4ecef;border-color:#344149}

@media(max-width:900px){
  .messages-box .msg.report-msg .avatar{display:none}
  .messages-box .msg.report-msg .bubble{max-width:100%!important;width:100%!important;padding:5px!important}
  .sales-report-head{padding:10px}
  .sales-report-head h3{font-size:15px}
  .report-score{min-width:58px;min-height:51px;font-size:15px}
  .report-summary-table th{width:102px}
  .sales-report-card th,.sales-report-card td{padding:8px 7px;font-size:10px}
  .report-target-now{grid-template-columns:1fr auto;gap:5px}
  .report-target-now span{grid-column:1/-1}
  .report-target-now b{text-align:right}
}


/* وصولی قطعی و فوروارد گزارش؛ کاملاً محدود به پیام‌های جدید */
.messages-box .msg.celebration-msg{width:min(100%,560px);max-width:560px;align-self:center}
.messages-box .msg.celebration-msg .avatar{display:none}
.messages-box .msg.celebration-msg .bubble{width:100%;max-width:100%!important;padding:5px;background:transparent!important;border:0;box-shadow:none;color:var(--text)!important}
.messages-box .msg.celebration-msg .bubble>b{display:none}
.sales-celebration-card{overflow:hidden;border:1px solid #d7dfdb;border-radius:16px;background:linear-gradient(150deg,#ffffff 0%,#f5f8f6 65%,#eef4f0 100%);box-shadow:0 9px 24px rgba(40,65,55,.07)}
.sales-celebration-card header{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:9px;padding:12px 13px;border-bottom:1px solid #e2e9e5;background:linear-gradient(135deg,#f1f7f3,#fff)}
.sales-celebration-card header small{display:block;color:#77867f;font-size:9px;margin-bottom:2px}
.sales-celebration-card header h3{margin:0;color:#30453b;font-size:16px}
.celebration-spark{display:grid;place-items:center;width:36px;height:36px;border-radius:12px;background:#5d786b;color:#fff;font-size:20px;box-shadow:0 6px 14px rgba(79,111,96,.18)}
.celebration-badge{border:1px solid #d8b66a;background:#fff8e8;color:#8b6722;border-radius:999px;padding:4px 9px;font-size:9px;font-weight:900}
.celebration-amount{text-align:center;padding:16px 12px 6px;color:#263d33;font-weight:950;font-size:25px;direction:rtl}
.celebration-amount small{font-size:11px;color:#6b7c74;font-weight:800}
.celebration-seller{text-align:center!important;margin:0 12px 4px!important;color:#607068!important;font-size:11px!important}.celebration-seller b{display:inline!important;color:#30453b!important;font-size:12px!important}
.celebration-course{text-align:center!important;margin:0 12px 8px!important;color:#78857f!important;font-size:10px!important}
.sales-celebration-card blockquote{margin:10px 13px 13px;padding:11px 12px;border:0;border-right:4px solid #6f8c7e;border-radius:12px;background:#edf4f0;color:#33483e;font-size:12px;line-height:1.9;font-weight:700}
.sales-celebration-card footer{padding:0 13px 11px;color:#819088;font-size:9px;text-align:center}
.msg.celebration-msg .msg-actions,.msg.celebration-msg .msg-foot{padding:0 7px}
.forwarded-label{margin:0 0 5px;padding:4px 7px;border-radius:8px;background:#eef2f5;color:#65727c;font-size:9px;font-weight:800}
.forward-destinations{display:grid;gap:7px;max-height:58vh;overflow:auto}
.forward-destination{width:100%;display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:9px;text-align:right;border:1px solid #d9e0e5;border-radius:13px;background:#fff;padding:9px;cursor:pointer;color:var(--text)}
.forward-destination:hover{border-color:#9aa9b4;background:#f7f9fa}
.forward-destination:disabled{opacity:.58;cursor:wait}
.forward-destination span:nth-child(2){min-width:0}
.forward-destination b{display:block;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.forward-destination small{display:block;color:var(--muted);font-size:8px;margin-top:2px}
.forward-destination i{font-style:normal;color:#52616d;background:#edf1f4;border-radius:8px;padding:5px 8px;font-size:9px;font-weight:900}
body[data-build="office36"] .sales-celebration-card{border-radius:13px}
body[data-build="office36"] .sales-celebration-card header{padding:9px 10px;grid-template-columns:32px minmax(0,1fr) auto}
body[data-build="office36"] .celebration-spark{width:30px;height:30px;border-radius:9px;font-size:16px}
body[data-build="office36"] .sales-celebration-card header h3{font-size:13px}
body[data-build="office36"] .celebration-amount{font-size:21px;padding-top:12px}
body[data-build="office36"] .sales-celebration-card blockquote{font-size:10px;margin:8px 10px 10px;padding:9px 10px}
@media(max-width:600px){
  .messages-box .msg.celebration-msg{width:100%;max-width:100%}
  .sales-celebration-card header{grid-template-columns:32px minmax(0,1fr) auto;padding:9px}
  .celebration-spark{width:30px;height:30px;border-radius:9px;font-size:16px}
  .sales-celebration-card header h3{font-size:13px}
  .celebration-amount{font-size:21px;padding:12px 8px 4px}
  .sales-celebration-card blockquote{font-size:10px;margin:8px 9px 10px;padding:9px}
  .forward-destination{grid-template-columns:36px minmax(0,1fr) auto;padding:8px}
}

/* v13: نمایش قطعی دکمه‌های عملیات برای گزارش فورواردشده‌ی مدیر روی زمینه روشن */
.messages-box .msg.report-msg.mine .msg-actions{
  display:flex!important;
  opacity:1!important;
  visibility:visible!important;
}
.messages-box .msg.report-msg.mine .msg-action{
  background:#eef2f5!important;
  color:#455560!important;
  border:1px solid #d7e0e6!important;
}
.messages-box .msg.report-msg.mine .msg-action.delete-msg{
  background:#fbe8e9!important;
  color:#a94851!important;
  border-color:#f0cfd2!important;
}
