/* Chat & Social UI V2 — isolated, mobile-first, dark surface system */
:root{
  --chat-bg:#0c0f14;
  --chat-bg-soft:#10141b;
  --chat-surface:#171b23;
  --chat-surface-2:#1e242e;
  --chat-surface-3:#262d38;
  --chat-border:rgba(255,255,255,.09);
  --chat-border-strong:rgba(255,255,255,.15);
  --chat-text:#f5f7fa;
  --chat-muted:#9ca7b6;
  --chat-muted-2:#6f7a89;
  --chat-accent:#b30404;
  --chat-accent-hover:#cf1717;
  --chat-success:#35c47b;
  --chat-warning:#e4b448;
  --chat-danger:#eb5d68;
  --chat-info:#69a8ff;
  --chat-radius:18px;
  --chat-shadow:0 18px 55px rgba(0,0,0,.28);
  --chat-header-offset:0px;
  --chat-mobile-nav-height:66px;
}

*{box-sizing:border-box}
body.chat-ui-v2{
  min-height:100vh;
  color:var(--chat-text);
  background:
    radial-gradient(circle at 12% 0%,rgba(179,4,4,.17),transparent 28rem),
    radial-gradient(circle at 90% 18%,rgba(83,98,122,.13),transparent 32rem),
    linear-gradient(180deg,var(--chat-bg-soft),var(--chat-bg));
}
body.chat-ui-v2 a{transition:color .18s ease,background-color .18s ease,border-color .18s ease,transform .18s ease,box-shadow .18s ease}
body.chat-ui-v2 .chat-site-wrapper{min-height:100vh;display:flex;flex-direction:column}
body.chat-ui-v2 .chat-site-wrapper>footer{margin-top:auto}
body.chat-ui-v2 .container{width:100%}

.chat-icon{display:block;width:20px;height:20px;flex:0 0 20px;color:currentColor}
.chat-icon.is-sm{width:17px;height:17px;flex-basis:17px}
.chat-icon.is-lg{width:25px;height:25px;flex-basis:25px}

.chat-module-nav{
  position:sticky;
  top:var(--chat-header-offset);
  z-index:1032;
  border-bottom:1px solid var(--chat-border);
  background:rgba(13,16,22,.92);
  -webkit-backdrop-filter:blur(16px);
  backdrop-filter:blur(16px);
  box-shadow:0 10px 30px rgba(0,0,0,.16);
}
.chat-module-nav-inner{
  min-height:58px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:7px 12px;
  overflow-x:auto;
  scrollbar-width:none;
}
.chat-module-nav-inner::-webkit-scrollbar{display:none}
.chat-module-nav-inner>a{
  position:relative;
  min-width:108px;
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:9px 14px;
  border:1px solid transparent;
  border-radius:13px;
  color:var(--chat-muted)!important;
  font-size:13px;
  font-weight:800;
  text-decoration:none!important;
  white-space:nowrap;
}
.chat-module-nav-inner>a:hover{
  color:var(--chat-text)!important;
  background:rgba(255,255,255,.06);
  transform:translateY(-1px);
}
.chat-module-nav-inner>a.is-active{
  color:var(--chat-text)!important;
  border-color:rgba(179,4,4,.55);
  background:linear-gradient(180deg,rgba(179,4,4,.25),rgba(179,4,4,.13));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.025),0 8px 24px rgba(179,4,4,.12);
}
.chat-module-nav-inner>a.is-premium:not(.is-active){color:#e7c466!important}
.chat-nav-icon{display:inline-flex;align-items:center;justify-content:center}
.chat-nav-badge{
  position:absolute;
  top:2px;
  right:5px;
  min-width:19px;
  height:19px;
  padding:0 5px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:2px solid #11151b;
  border-radius:999px;
  background:var(--chat-accent);
  color:#fff;
  font-size:10px;
  font-weight:900;
  line-height:1;
  animation:chatBadgeIn .22s ease both;
}
@keyframes chatBadgeIn{from{opacity:0;transform:scale(.55)}to{opacity:1;transform:scale(1)}}

.chat-shell{
  width:100%;
  max-width:1180px;
  min-height:66vh;
  padding-top:28px!important;
  padding-bottom:34px!important;
  color:var(--chat-text);
  animation:chatPageIn .35s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes chatPageIn{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:none}}

.chat-page-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:20px;
}
.chat-page-heading h1{
  margin:4px 0 7px;
  color:var(--chat-text);
  font-size:clamp(25px,3vw,34px);
  font-weight:850;
  letter-spacing:-.035em;
  line-height:1.1;
}
.chat-page-heading p{max-width:720px;margin:0;color:var(--chat-muted);font-size:13px;line-height:1.65}
.chat-eyebrow{display:block;color:#d6a4a4;font-size:10px;font-weight:900;letter-spacing:.18em}
.chat-heading-actions,.chat-card-actions,.chat-inline-actions,.chat-room-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}

.btn-chat-primary,.btn-chat-soft,.btn-chat-danger{
  min-height:39px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  border-radius:11px;
  padding:8px 14px;
  font-weight:800;
  line-height:1.2;
  box-shadow:none;
}
.btn-chat-primary{border:1px solid #c52020;background:linear-gradient(180deg,#bd1111,#980000);color:#fff!important}
.btn-chat-primary:hover{border-color:#e13b3b;background:linear-gradient(180deg,#d01b1b,#a60000);color:#fff!important;transform:translateY(-1px);box-shadow:0 8px 18px rgba(179,4,4,.2)}
.btn-chat-soft{border:1px solid var(--chat-border-strong);background:rgba(255,255,255,.055);color:var(--chat-text)!important}
.btn-chat-soft:hover{border-color:rgba(255,255,255,.25);background:rgba(255,255,255,.09);color:#fff!important;transform:translateY(-1px)}
.btn-chat-danger{border:1px solid rgba(235,93,104,.42);background:rgba(235,93,104,.11);color:#ffafb6!important}
.btn-chat-danger:hover{background:rgba(235,93,104,.18);color:#ffd8dc!important}
.btn-chat-primary:disabled,.btn-chat-soft:disabled,.btn-chat-danger:disabled{opacity:.48;transform:none;cursor:not-allowed}

.chat-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}
.chat-stat{
  position:relative;
  min-height:98px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:17px 18px;
  overflow:hidden;
  border:1px solid var(--chat-border);
  border-radius:var(--chat-radius);
  background:linear-gradient(145deg,var(--chat-surface-2),var(--chat-surface));
  color:var(--chat-text)!important;
  box-shadow:0 9px 26px rgba(0,0,0,.15);
  text-decoration:none!important;
}
.chat-stat:after{content:"";position:absolute;inset:auto -34px -46px auto;width:105px;height:105px;border-radius:50%;background:rgba(179,4,4,.10);transition:transform .25s ease}
.chat-stat:hover{border-color:rgba(255,255,255,.17);transform:translateY(-2px);box-shadow:0 15px 36px rgba(0,0,0,.22)}
.chat-stat:hover:after{transform:scale(1.2)}
.chat-stat strong{position:relative;z-index:1;color:#fff;font-size:26px;font-weight:850;line-height:1.05}
.chat-stat span{position:relative;z-index:1;margin-top:7px;color:var(--chat-muted);font-size:11px;font-weight:700}

.chat-main-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px;align-items:start}
.chat-panel,.chat-simple-card,.chat-room,.chat-plan-card,.chat-balance-card,.chat-premium-banner{
  border:1px solid var(--chat-border);
  background:linear-gradient(180deg,var(--chat-surface),#141820);
  color:var(--chat-text);
  box-shadow:var(--chat-shadow);
}
.chat-panel{padding:18px;border-radius:var(--chat-radius)}
.chat-panel h2,.chat-panel h3,.chat-panel h4,.chat-panel h5,.chat-panel h6{color:var(--chat-text)}
.chat-panel p{color:var(--chat-muted)}
.chat-panel-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding-bottom:13px;margin-bottom:3px;border-bottom:1px solid var(--chat-border)}
.chat-panel-head h2{margin:0;color:var(--chat-text);font-size:17px;font-weight:850}
.chat-panel-head span,.chat-panel-head a{color:var(--chat-muted);font-size:11px;font-weight:700}
.chat-panel-head a:hover{color:#fff;text-decoration:none}

.chat-list{display:flex;flex-direction:column;margin:6px -7px -5px}
.chat-list-item{
  position:relative;
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  margin:2px 0;
  padding:12px 10px;
  border:1px solid transparent;
  border-radius:14px;
  color:var(--chat-text)!important;
  text-decoration:none!important;
}
.chat-list-item:after{content:"";position:absolute;left:65px;right:10px;bottom:-3px;height:1px;background:rgba(255,255,255,.055)}
.chat-list-item:last-child:after{display:none}
.chat-list-item:hover{border-color:var(--chat-border);background:var(--chat-surface-2);transform:translateX(2px)}
.chat-avatar-wrap{position:relative;width:46px;height:46px;flex:0 0 46px}
.chat-avatar{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover;background:#2b3039;border:1px solid rgba(255,255,255,.08)}
.chat-avatar-placeholder{width:100%;height:100%;display:grid;place-items:center;border-radius:50%;background:#2d333e;color:#fff;font-weight:900;border:1px solid var(--chat-border)}
.chat-online-dot{position:absolute;right:0;bottom:1px;width:12px;height:12px;border:2px solid var(--chat-surface);border-radius:50%;background:var(--chat-success);box-shadow:0 0 0 2px rgba(53,196,123,.11)}
.chat-list-copy{min-width:0;display:flex;flex:1;flex-direction:column;gap:4px}
.chat-list-copy strong{max-width:100%;overflow:hidden;color:#fff;font-size:14px;text-overflow:ellipsis;white-space:nowrap}
.chat-list-copy span{max-width:100%;overflow:hidden;color:var(--chat-muted);font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.chat-list-meta{display:flex;flex:0 0 auto;flex-direction:column;align-items:flex-end;gap:6px}
.chat-list-meta time,.chat-list-item time{color:var(--chat-muted-2);font-size:10px}
.chat-unread-badge{min-width:21px;height:21px;display:inline-flex;align-items:center;justify-content:center;padding:0 6px;border-radius:999px;background:var(--chat-accent);color:#fff;font-size:10px;font-weight:900}

.chat-side-panel{position:sticky;top:calc(var(--chat-header-offset) + 74px)}
.chat-user-mini-list{display:flex;flex-direction:column}
.chat-user-mini{min-width:0;display:flex;align-items:center;gap:11px;padding:11px 2px;border-bottom:1px solid var(--chat-border);color:var(--chat-text)!important;text-decoration:none!important}
.chat-user-mini:last-child{border-bottom:0}
.chat-user-mini:hover{padding-left:6px;color:#fff!important}
.chat-user-mini>span{min-width:0;display:flex;flex:1;flex-direction:column;gap:2px}
.chat-user-mini strong{overflow:hidden;color:#fff;font-size:13px;text-overflow:ellipsis;white-space:nowrap}
.chat-user-mini small{color:var(--chat-muted);font-size:10px}
.chat-side-links{display:grid;gap:8px;margin-top:14px}
.chat-side-links a{display:flex;align-items:center;gap:8px;padding:10px 12px;border:1px solid var(--chat-border);border-radius:11px;background:rgba(255,255,255,.035);color:var(--chat-text)!important;font-size:12px;font-weight:700;text-decoration:none!important}
.chat-side-links a:hover{background:var(--chat-surface-3)}

.chat-empty{grid-column:1/-1;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:220px;padding:34px 18px;text-align:center}
.chat-empty-icon{width:54px;height:54px;display:grid;place-items:center;margin-bottom:13px;border:1px solid var(--chat-border);border-radius:16px;background:var(--chat-surface-2);color:var(--chat-muted);font-size:0}
.chat-empty-icon:before{content:"";width:24px;height:24px;border:2px solid currentColor;border-radius:8px;opacity:.9}
.chat-empty h3{margin:0 0 7px;color:#fff;font-size:17px;font-weight:850}
.chat-empty p{margin:0;color:var(--chat-muted);font-size:12px}

.chat-search,.chat-search-form{display:flex;align-items:center;gap:9px;margin-bottom:15px}
.chat-search{position:sticky;top:calc(var(--chat-header-offset) + 66px);z-index:22;padding:10px 0;background:linear-gradient(180deg,var(--chat-bg-soft) 65%,transparent)}
.chat-search input,.chat-search-form input{min-width:0;flex:1}
.chat-search input,.chat-search-form .form-control,.chat-form-panel .form-control{
  min-height:44px;
  border:1px solid var(--chat-border-strong);
  border-radius:11px;
  background:#0f1319;
  color:var(--chat-text);
  box-shadow:none;
}
.chat-search input{padding:10px 14px;outline:none}
.chat-search input::placeholder,.chat-form-panel .form-control::placeholder{color:#687383}
.chat-search input:focus,.chat-search-form .form-control:focus,.chat-form-panel .form-control:focus{border-color:rgba(179,4,4,.78);background:#11161d;color:#fff;box-shadow:0 0 0 3px rgba(179,4,4,.14)}
.chat-user-grid,.chat-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding-top:13px}
.chat-user-card{
  min-width:0;
  padding:14px;
  border:1px solid var(--chat-border);
  border-radius:15px;
  background:linear-gradient(145deg,var(--chat-surface-2),rgba(27,32,41,.72));
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.chat-user-card:hover{border-color:rgba(255,255,255,.17);transform:translateY(-2px);box-shadow:0 13px 30px rgba(0,0,0,.18)}
.chat-user-card-main{display:flex;gap:13px;color:var(--chat-text)!important;text-decoration:none!important}
.chat-avatar-lg{width:64px;height:64px;flex-basis:64px}
.chat-user-card h3{margin:1px 0 3px;color:#fff;font-size:15px;font-weight:850}
.chat-user-card span{color:var(--chat-muted);font-size:10px}
.chat-user-card p{display:-webkit-box;overflow:hidden;margin:7px 0 0;color:#b4bdc9;font-size:11px;line-height:1.55;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.chat-card-actions{margin-top:13px}
[data-live-user-results]{position:relative;min-height:120px}
[data-live-user-results].is-loading:after{content:"";position:absolute;inset:0;z-index:4;border-radius:14px;background:rgba(12,15,20,.76);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}
[data-live-user-results].is-loading:before{content:"";position:absolute;top:45px;left:50%;z-index:5;width:28px;height:28px;margin-left:-14px;border:3px solid rgba(255,255,255,.16);border-top-color:#fff;border-radius:50%;animation:chatSpin .75s linear infinite}
@keyframes chatSpin{to{transform:rotate(360deg)}}

.chat-profile-card{padding:0;overflow:hidden}
.chat-profile-cover{height:145px;background:linear-gradient(135deg,#280606,#6e0808 52%,#222a34);position:relative}
.chat-profile-cover:after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 78% 20%,rgba(255,255,255,.12),transparent 28%)}
.chat-profile-main{display:flex;align-items:flex-end;gap:16px;margin-top:-48px;padding:0 22px 19px;position:relative}
.chat-profile-avatar{width:106px;height:106px;flex-basis:106px;border:4px solid var(--chat-surface)}
.chat-profile-copy{min-width:0;display:flex;flex:1;flex-direction:column;padding-bottom:5px}
.chat-profile-copy h2{overflow:hidden;margin:0;color:#fff;font-size:23px;font-weight:850;text-overflow:ellipsis;white-space:nowrap}
.chat-profile-copy>span{color:var(--chat-muted);font-size:12px}
.chat-profile-copy small{margin-top:4px;color:var(--chat-muted-2);font-size:10px}
.chat-profile-copy small.is-online{color:var(--chat-success)}
.chat-profile-actions{display:flex;gap:8px;padding-bottom:8px;flex-wrap:wrap}
.chat-profile-stats{display:flex;gap:38px;padding:15px 22px;border-top:1px solid var(--chat-border);border-bottom:1px solid var(--chat-border)}
.chat-profile-stats a,.chat-profile-stats>div{display:flex;flex-direction:column;color:var(--chat-text)!important;text-decoration:none!important}
.chat-profile-stats strong{color:#fff;font-size:18px}
.chat-profile-stats span{color:var(--chat-muted);font-size:10px}
.chat-profile-details{padding:20px 22px}
.chat-profile-details label,.chat-detail-grid label{display:block;margin-bottom:5px;color:var(--chat-muted-2);font-size:9px;font-weight:900;letter-spacing:.1em;text-transform:uppercase}
.chat-profile-details p{color:#c8d0da;line-height:1.7}
.chat-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.chat-private-profile{text-align:center;padding:36px}

.chat-form-panel{width:100%;max-width:790px}
.chat-form-panel label{display:block;margin-bottom:7px;color:#e9edf2;font-size:12px;font-weight:800}
.chat-form-panel .form-group{margin-bottom:16px}
.chat-form-panel select.form-control option{background:#10141a;color:#fff}
.chat-form-panel small{color:var(--chat-muted)}
.chat-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}
.chat-check{display:flex!important;align-items:center;gap:8px;margin:13px 0!important;color:#d6dce5!important;font-weight:600!important}
.chat-check input{accent-color:var(--chat-accent)}
.chat-profile-edit-avatar{display:flex;align-items:center;gap:16px;margin-bottom:20px}
.chat-profile-edit-avatar img{width:88px;height:88px;border:3px solid var(--chat-border-strong);border-radius:50%;object-fit:cover}
.chat-profile-edit-avatar>div{display:flex;flex-direction:column;gap:5px}
.chat-connections-list .chat-user-mini{padding:14px 4px}

.chat-conversation-page{max-width:1050px;padding-top:16px!important}
.chat-room{
  height:min(76vh,760px);
  min-height:550px;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border-radius:20px;
}
.chat-room-head{min-height:66px;display:flex;align-items:center;gap:11px;padding:10px 13px;border-bottom:1px solid var(--chat-border);background:rgba(24,29,37,.96)}
.chat-back{width:38px;height:38px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--chat-border);border-radius:11px;background:rgba(255,255,255,.035);color:#fff!important;text-decoration:none!important}
.chat-back:hover{background:var(--chat-surface-3);transform:translateX(-2px)}
.chat-room-person{min-width:0;display:flex;flex:1;flex-direction:column}
.chat-room-person strong{overflow:hidden;color:#fff;font-size:14px;text-overflow:ellipsis;white-space:nowrap}
.chat-room-person span{overflow:hidden;color:var(--chat-muted);font-size:10px;text-overflow:ellipsis;white-space:nowrap}
.chat-room-actions{margin-left:auto}
.chat-expiry-note{padding:6px 12px;border-bottom:1px solid var(--chat-border);background:rgba(228,180,72,.075);color:#e7cb83;font-size:10px;text-align:center}
.chat-expiry-note.is-premium{background:rgba(53,196,123,.075);color:#8de2b5}
.chat-messages{flex:1;display:flex;flex-direction:column;gap:8px;overflow-y:auto;padding:18px 14px;background:radial-gradient(circle at 50% -10%,rgba(179,4,4,.10),transparent 34%),#0f1319;overscroll-behavior:contain;scrollbar-color:#343b46 transparent;scrollbar-width:thin}
.chat-messages::-webkit-scrollbar{width:6px}.chat-messages::-webkit-scrollbar-thumb{border-radius:999px;background:#343b46}
.chat-loading{margin:auto;color:var(--chat-muted);font-size:12px;text-align:center}
.chat-loading.is-error{color:#ff929b}
.chat-message-row{max-width:82%;display:flex;align-items:flex-end;gap:7px;margin-bottom:2px;animation:chatMessageIn .22s ease both}
@keyframes chatMessageIn{from{opacity:0;transform:translateY(7px) scale(.98)}to{opacity:1;transform:none}}
.chat-message-row.mine{align-self:flex-end;flex-direction:row-reverse}
.chat-message-row.theirs{align-self:flex-start}
.chat-message-avatar{width:27px;height:27px;border-radius:50%;object-fit:cover;background:#2a3039}
.chat-bubble{min-width:78px;max-width:620px;padding:9px 11px;border:1px solid var(--chat-border);border-radius:16px 16px 16px 5px;background:var(--chat-surface-2);color:#f5f6f8;box-shadow:0 6px 17px rgba(0,0,0,.17)}
.chat-message-row.mine .chat-bubble{border-color:rgba(179,4,4,.52);border-radius:16px 16px 5px 16px;background:linear-gradient(150deg,#7f0707,#570404);color:#fff}
.chat-message-body{color:inherit;font-size:13px;line-height:1.55;white-space:pre-wrap;word-break:break-word}
.chat-message-meta{display:flex;align-items:center;justify-content:flex-end;gap:7px;margin-top:5px;color:rgba(255,255,255,.52);font-size:9px;text-align:right}
.chat-receipt{position:relative;width:17px;height:12px;display:inline-flex;color:#99a2af}
.chat-receipt i{position:absolute;top:0;font-style:normal;font-size:13px;line-height:1}.chat-receipt i:first-child{left:0}.chat-receipt i:last-child{left:5px;display:none}
.chat-receipt[data-receipt-state="delivered"] i:last-child,.chat-receipt[data-receipt-state="read"] i:last-child{display:block}
.chat-receipt[data-receipt-state="read"]{color:#66adff}
.chat-media{max-width:380px;overflow:hidden;margin:-3px -3px 7px;border-radius:12px;background:#090c10}
.chat-media img,.chat-media video{display:block;width:100%;max-height:390px;object-fit:contain;cursor:pointer}
.chat-media audio{display:block;width:min(300px,68vw);height:42px}
.chat-media-cost{display:block;margin-top:3px;color:rgba(255,255,255,.5);font-size:8px;text-align:right}
.chat-message-report{display:block;margin:5px 0 0 auto;padding:0;border:0;background:transparent;color:rgba(255,255,255,.45);font-size:9px;text-decoration:underline;cursor:pointer}
.chat-message-report:hover{color:#fff}
.chat-room-warning{padding:8px 12px;border-bottom:1px solid rgba(235,93,104,.24);background:rgba(235,93,104,.12);color:#ffb3b9;font-size:10px;text-align:center}
.chat-media-policy-note{display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:7px 10px;border-top:1px solid var(--chat-border);background:#131820}
.chat-media-policy-note span{padding:4px 8px;border:1px solid var(--chat-border);border-radius:999px;background:rgba(255,255,255,.03);color:var(--chat-muted);font-size:9px}
.chat-media-policy-note span.is-paid{border-color:rgba(228,180,72,.25);color:#e5c879}
.chat-composer{display:flex;align-items:flex-end;gap:7px;padding:9px 10px;border-top:1px solid var(--chat-border);background:#171b22}
.chat-media-actions{display:flex;align-items:center;gap:4px;flex:0 0 auto}
.chat-media-button,.chat-composer-send{display:inline-flex;align-items:center;justify-content:center;border:0;cursor:pointer}
.chat-media-button{position:relative;width:38px;height:38px;flex:0 0 38px;border:1px solid var(--chat-border);border-radius:12px;background:var(--chat-surface-2);color:#d7dce3}
.chat-media-button:hover{border-color:var(--chat-border-strong);background:var(--chat-surface-3);transform:translateY(-1px)}
.chat-media-button[disabled]{opacity:.34;transform:none;cursor:not-allowed}
.chat-paid-dot{position:absolute;right:-4px;top:-5px;min-width:18px;height:18px;display:flex;align-items:center;justify-content:center;padding:0 4px;border:2px solid #171b22;border-radius:999px;background:#7b5b14;color:#fff;font-size:8px;font-weight:900}
.chat-composer textarea{min-height:42px;max-height:120px;flex:1;resize:none;border:1px solid var(--chat-border-strong);border-radius:15px;background:#0f1319;color:#fff;padding:10px 13px;outline:none;line-height:1.45}
.chat-composer textarea::placeholder{color:#66717f}
.chat-composer textarea:focus{border-color:rgba(179,4,4,.72);box-shadow:0 0 0 3px rgba(179,4,4,.12)}
.chat-composer-send{width:42px;height:42px;flex:0 0 42px;border-radius:13px;background:linear-gradient(180deg,#bf1111,#910000);color:#fff}
.chat-composer-send:hover{background:linear-gradient(180deg,#d01a1a,#a00000);transform:translateY(-1px);box-shadow:0 8px 18px rgba(179,4,4,.25)}
.chat-voice-recorder{display:none;align-items:center;gap:10px;padding:9px 12px;border-top:1px solid rgba(235,93,104,.18);background:#27191d;color:#fff}
.chat-voice-recorder.show{display:flex;animation:chatSlideUp .2s ease both}
@keyframes chatSlideUp{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}
.chat-recording-dot{width:10px;height:10px;border-radius:50%;background:var(--chat-danger);animation:chatPulse 1s infinite}
@keyframes chatPulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.35;transform:scale(.72)}}
.chat-voice-recorder strong{flex:1;font-size:12px}
.chat-voice-recorder button{min-height:33px;border:0;border-radius:9px;padding:7px 10px;font-size:10px;font-weight:850}
.chat-voice-cancel{background:#343a45;color:#fff}.chat-voice-send{background:#9d0808;color:#fff}

.chat-group-title-row{display:flex;align-items:center;gap:12px}
.chat-group-title-row h1{margin:0}
.chat-group-card-head{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.chat-member-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 2px;border-bottom:1px solid var(--chat-border)}
.chat-member-row:last-child{border-bottom:0}
.chat-member-row>span{display:flex;flex-direction:column}.chat-member-row small{color:var(--chat-muted)}

.chat-premium-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;padding:15px 17px;border-radius:15px;background:linear-gradient(135deg,#283d31,#17231c);border-color:rgba(53,196,123,.25)}
.chat-premium-banner strong{color:#9ce2ba}.chat-premium-banner span{color:#c7d8cf;font-size:11px}
.chat-balance-card{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;padding:16px 18px;border-radius:15px}
.chat-balance-card span{color:var(--chat-muted);font-size:11px}.chat-balance-card strong{color:#fff;font-size:23px}
.chat-plan-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.chat-plan-card{position:relative;display:flex;flex-direction:column;gap:8px;padding:18px;border-radius:16px;overflow:hidden}
.chat-plan-card.featured{border-color:rgba(228,180,72,.45);background:linear-gradient(145deg,#2c271a,#171b23)}
.chat-plan-card.featured:after{content:"Pilihan populer";position:absolute;right:-38px;top:16px;width:125px;padding:4px 0;transform:rotate(38deg);background:#705717;color:#fff;font-size:8px;font-weight:900;text-align:center}
.chat-plan-card>span{color:var(--chat-muted);font-size:11px}.chat-plan-card>strong{color:#fff;font-size:22px}.chat-plan-card>small{min-height:17px;color:#d4bc79;font-size:10px}.chat-plan-card .btn{margin-top:8px}

.chat-notification-list,.chat-report-list{display:flex;flex-direction:column}
.chat-notification-item,.chat-report-item{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:14px 5px;border-bottom:1px solid var(--chat-border)}
.chat-notification-item:last-child,.chat-report-item:last-child{border-bottom:0}
.chat-notification-item.unread{margin:0 -8px;padding-left:13px;padding-right:13px;border-radius:12px;background:rgba(179,4,4,.10)}
.chat-notification-item p,.chat-report-item p{margin:5px 0;color:#b8c1cc;font-size:11px}.chat-notification-item small,.chat-report-item small{color:var(--chat-muted-2);font-size:9px}
.chat-status{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;font-size:8px;font-weight:900;text-transform:uppercase}
.status-open{background:rgba(228,180,72,.13);color:#e9ce86}.status-resolved{background:rgba(53,196,123,.13);color:#9ee2bc}.status-dismissed{background:rgba(255,255,255,.07);color:#bdc4ce}
.chat-resolution{flex-basis:100%}

.chat-global-loader{position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(5,7,10,.72);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);opacity:0;visibility:hidden;transition:opacity .18s ease,visibility .18s ease}
.chat-global-loader.show{opacity:1;visibility:visible}
.chat-loader-card{min-width:170px;display:flex;flex-direction:column;align-items:center;gap:8px;padding:22px 24px;border:1px solid var(--chat-border-strong);border-radius:20px;background:linear-gradient(180deg,#1e242d,#13171e);box-shadow:0 26px 90px rgba(0,0,0,.48);transform:scale(.95);transition:transform .2s ease}
.chat-global-loader.show .chat-loader-card{transform:scale(1)}
.chat-loader-card strong{color:#fff;font-size:13px}.chat-loader-card small{color:var(--chat-muted);font-size:10px}
.chat-loader-spinner{position:relative;width:45px;height:45px;animation:chatSpin 1.15s linear infinite}
.chat-loader-spinner span{position:absolute;left:20px;top:3px;width:5px;height:11px;border-radius:999px;background:#fff;transform-origin:2.5px 19.5px;opacity:.22}
.chat-loader-spinner span:nth-child(2){transform:rotate(90deg)}.chat-loader-spinner span:nth-child(3){transform:rotate(180deg)}.chat-loader-spinner span:nth-child(4){transform:rotate(270deg)}
.chat-loader-spinner span:nth-child(1){opacity:1}.chat-loader-spinner span:nth-child(2){opacity:.75}.chat-loader-spinner span:nth-child(3){opacity:.5}.chat-loader-spinner span:nth-child(4){opacity:.3}
.chat-toast{position:fixed;right:18px;bottom:20px;z-index:99998;max-width:min(360px,calc(100vw - 30px));padding:12px 15px;border:1px solid var(--chat-border-strong);border-radius:12px;background:#1f252e;color:#fff;box-shadow:0 17px 48px rgba(0,0,0,.38);opacity:0;transform:translateY(12px) scale(.98);pointer-events:none;transition:opacity .2s ease,transform .2s ease}
.chat-toast.show{opacity:1;transform:none;pointer-events:auto}.chat-toast.is-error{border-color:rgba(235,93,104,.42);background:#39171d}.chat-toast.is-clickable{cursor:pointer}.chat-toast.is-clickable:after{content:"Buka";margin-left:10px;color:#d7dde5;font-size:9px;text-decoration:underline}
.ml-auto{margin-left:auto!important}

.chat-ui-v2 .alert{border:1px solid transparent;border-radius:12px;font-size:12px}
.chat-ui-v2 .alert-warning{border-color:rgba(228,180,72,.28);background:rgba(228,180,72,.11);color:#f2d991}
.chat-ui-v2 .alert-danger{border-color:rgba(235,93,104,.28);background:rgba(235,93,104,.11);color:#ffb8be}
.chat-ui-v2 .alert-success{border-color:rgba(53,196,123,.28);background:rgba(53,196,123,.11);color:#a8e6c3}
.chat-ui-v2 .alert-info{border-color:rgba(105,168,255,.25);background:rgba(105,168,255,.10);color:#b7d6ff}

@media (max-width:991.98px){
  .chat-main-grid{grid-template-columns:1fr}
  .chat-side-panel{position:static;display:block}
  .chat-user-grid,.chat-card-grid{grid-template-columns:1fr 1fr}
  .chat-plan-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:767.98px){
  body.chat-ui-v2{padding-bottom:calc(var(--chat-mobile-nav-height) + env(safe-area-inset-bottom))}
  .chat-module-nav{position:fixed;top:auto;right:0;bottom:0;left:0;z-index:1060;border-top:1px solid var(--chat-border-strong);border-bottom:0;background:rgba(13,16,22,.97);box-shadow:0 -10px 35px rgba(0,0,0,.34);padding-bottom:env(safe-area-inset-bottom)}
  .chat-module-nav-inner{min-height:var(--chat-mobile-nav-height);justify-content:space-around;gap:0;padding:5px 2px}
  .chat-module-nav-inner>a{min-width:0;min-height:54px;flex:1;flex-direction:column;gap:2px;padding:5px 2px;border:0;border-radius:10px;font-size:9px}
  .chat-module-nav-inner>a.is-active{background:rgba(179,4,4,.22);box-shadow:none}
  .chat-nav-icon .chat-icon{width:21px;height:21px}
  .chat-nav-badge{top:2px;right:calc(50% - 27px);border-color:#11151b}
  .chat-shell{padding:17px 8px 22px!important}
  .chat-page-heading{flex-direction:column;gap:11px;margin-bottom:14px}
  .chat-page-heading h1{font-size:24px}.chat-page-heading p{font-size:11px}
  .chat-heading-actions{width:100%}.chat-heading-actions .btn{flex:1}
  .chat-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .chat-stat{min-height:84px;padding:14px}.chat-stat strong{font-size:22px}
  .chat-panel{padding:13px;border-radius:15px}
  .chat-panel-head{padding-bottom:10px}.chat-panel-head h2{font-size:15px}
  .chat-list{margin:5px -3px -3px}.chat-list-item{padding:10px 6px}.chat-list-item:after{left:58px}
  .chat-avatar-wrap{width:42px;height:42px;flex-basis:42px}
  .chat-user-grid,.chat-card-grid,.chat-plan-grid{grid-template-columns:1fr}
  .chat-user-card{padding:11px}.chat-user-card p{display:none}.chat-avatar-lg{width:56px;height:56px;flex-basis:56px}
  .chat-search{top:0;padding-top:3px;background:linear-gradient(180deg,var(--chat-bg-soft) 75%,transparent)}
  .chat-search button{min-width:74px}
  .chat-profile-main{align-items:flex-start;flex-wrap:wrap;padding:0 15px 15px}.chat-profile-avatar{width:92px;height:92px;flex-basis:92px}.chat-profile-copy{padding-top:7px}.chat-profile-actions{width:100%}.chat-profile-actions .btn{flex:1}
  .chat-profile-stats{justify-content:space-between;gap:12px;padding:13px 15px}.chat-profile-details{padding:17px 15px}.chat-detail-grid,.chat-form-grid{grid-template-columns:1fr}
  .chat-profile-edit-avatar{align-items:flex-start;flex-direction:column}
  .chat-conversation-page{padding:8px 5px 4px!important}
  .chat-room{height:var(--chat-room-mobile-height,calc(100dvh - 165px));min-height:430px;border-radius:14px}
  .chat-room-head{min-height:59px;padding:7px 8px}.chat-back{width:35px;height:35px}.chat-room-person strong{font-size:12px}.chat-room-actions .btn{min-height:32px;padding:6px 8px;font-size:9px}.chat-room-actions .btn-chat-danger{display:none}
  .chat-expiry-note{padding:4px 7px;font-size:8px}
  .chat-messages{padding:11px 7px}.chat-message-row{max-width:91%}.chat-bubble{padding:8px 10px}.chat-message-body{font-size:12px}.chat-message-avatar{width:24px;height:24px}
  .chat-media-policy-note{padding:5px 7px}.chat-media-policy-note span{padding:3px 6px;font-size:8px}
  .chat-composer{gap:4px;padding:6px}.chat-media-actions{gap:2px}.chat-media-button{width:34px;height:34px;flex-basis:34px;border-radius:10px}.chat-media-button .chat-icon{width:18px;height:18px}.chat-composer textarea{min-height:38px;padding:8px 10px;font-size:12px}.chat-composer-send{width:38px;height:38px;flex-basis:38px;border-radius:11px}.chat-composer-send .chat-icon{width:18px;height:18px}
  .chat-premium-banner{align-items:flex-start;flex-direction:column}.chat-balance-card strong{font-size:19px}
  .chat-member-row{align-items:flex-start;flex-direction:column}.chat-member-row .chat-inline-actions{width:100%}.chat-search-form{align-items:stretch;flex-direction:column}
  .chat-notification-item,.chat-report-item{align-items:stretch;flex-direction:column}
  .chat-toast{right:8px;bottom:calc(var(--chat-mobile-nav-height) + 10px);left:8px;max-width:none}
}

@media (min-width:768px) and (max-height:720px){.chat-room{height:calc(100vh - 170px);min-height:460px}}
@media (prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* Generic cards used by group and invitation pages */
.chat-simple-card{padding:15px;border-radius:15px;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}
.chat-simple-card:hover{border-color:rgba(255,255,255,.17);transform:translateY(-2px);box-shadow:0 14px 32px rgba(0,0,0,.2)}
.chat-simple-card h3{margin:0 0 6px;color:#fff;font-size:15px;font-weight:850}
.chat-simple-card p{margin:0 0 10px;color:var(--chat-muted);font-size:11px;line-height:1.55}
.chat-simple-card small{color:var(--chat-muted-2);font-size:9px}
.chat-group-card-head .chat-avatar,.chat-group-card-head .chat-avatar-placeholder{width:48px;height:48px;flex:0 0 48px}
.chat-group-card-head>div:last-child{min-width:0;flex:1}
.chat-group-card-head h3{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-inline-actions .btn{min-height:35px;padding:7px 11px;font-size:10px}
.chat-ui-v2 .is-pressed{transform:scale(.97)!important}

/* PHASE 5: footerless chat area, unified search, and admin shortcut */
body.chat-footerless{min-height:100vh;padding-bottom:0!important}
body.chat-footerless .chat-site-wrapper{min-height:100vh;display:flex;flex-direction:column}
body.chat-footerless .chat-shell{flex:1;width:100%}
body.chat-footerless footer,
body.chat-footerless .footer,
body.chat-footerless .mobile-footer,
body.chat-footerless .bottom-menu:not(.chat-module-nav),
body.chat-footerless [data-footer-menu]{display:none!important}
.chat-heading-actions .chat-icon{width:17px;height:17px;margin-right:7px;flex:0 0 17px}
.chat-heading-actions .btn{display:inline-flex;align-items:center;justify-content:center;gap:2px}

.chat-unified-search-card{position:relative;margin:0 0 18px;padding:14px;border:1px solid var(--chat-border);border-radius:18px;background:linear-gradient(145deg,rgba(28,32,42,.98),rgba(18,21,29,.98));box-shadow:var(--chat-shadow);z-index:8}
.chat-unified-search{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:8px;align-items:center}
.chat-unified-search-icon{width:42px;height:42px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.055);color:var(--chat-muted)}
.chat-unified-search-icon .chat-icon{width:20px;height:20px}
.chat-unified-search input{width:100%;height:44px;border:1px solid rgba(255,255,255,.1);border-radius:12px;background:#11141c;color:var(--chat-text);padding:0 14px;outline:none;transition:border-color .2s ease,box-shadow .2s ease,background .2s ease}
.chat-unified-search input::placeholder{color:#858b99}
.chat-unified-search input:focus{border-color:rgba(255,193,7,.64);box-shadow:0 0 0 3px rgba(255,193,7,.1);background:#151923}
.chat-unified-results{margin-top:12px;border-top:1px solid rgba(255,255,255,.075);padding-top:12px;animation:chatFadeUp .22s ease both}
.chat-unified-search-card.is-loading .chat-unified-search-icon .chat-icon{animation:chatSearchPulse .8s ease-in-out infinite alternate}
.chat-search-hint{padding:20px 12px;text-align:center;color:var(--chat-muted);font-size:13px}
.chat-search-section-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 2px 9px;color:var(--chat-text)}
.chat-search-section-title strong{font-size:13px;text-transform:uppercase;letter-spacing:.08em}
.chat-search-section-title span{font-size:12px;color:var(--chat-muted)}
.chat-search-user-list,.chat-search-message-list{display:grid;gap:8px}
.chat-search-user-item,.chat-search-message-item{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid rgba(255,255,255,.075);border-radius:14px;background:rgba(255,255,255,.025);transition:transform .18s ease,border-color .18s ease,background .18s ease}
.chat-search-user-item:hover,.chat-search-message-item:hover{transform:translateY(-1px);border-color:rgba(255,193,7,.32);background:rgba(255,255,255,.045)}
.chat-search-result-main{min-width:0;flex:1;display:flex;align-items:center;gap:10px;color:inherit!important;text-decoration:none!important}
.chat-search-result-copy{min-width:0;flex:1;display:flex;flex-direction:column}
.chat-search-result-copy strong{font-size:14px;color:var(--chat-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-search-result-copy small{font-size:11px;color:var(--chat-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-search-result-copy p{font-size:12px;color:#c7cbd4;margin:3px 0 0;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.chat-search-result-actions{flex:0 0 auto}
.chat-search-message-item{color:inherit!important;text-decoration:none!important}
.chat-search-open{flex:0 0 auto;font-size:11px;font-weight:700;color:#f7c94b;border:1px solid rgba(247,201,75,.27);border-radius:999px;padding:5px 9px}
.chat-message-row.is-search-match .chat-bubble{animation:chatSearchHighlight 3.2s ease both}

@keyframes chatSearchPulse{from{transform:scale(.92);opacity:.62}to{transform:scale(1.08);opacity:1}}
@keyframes chatSearchHighlight{0%,100%{box-shadow:0 0 0 0 rgba(255,193,7,0)}12%,70%{box-shadow:0 0 0 3px rgba(255,193,7,.42),0 10px 28px rgba(0,0,0,.28)}}

@media (min-width:900px){
 .chat-unified-results{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.35fr);gap:18px}
 .chat-unified-results>.chat-search-hint{grid-column:1/-1}
 .chat-unified-results>section:only-of-type{grid-column:1/-1}
}
@media (max-width:767.98px){
 body.chat-footerless{padding-bottom:76px!important}
 .chat-heading-actions{display:grid!important;grid-template-columns:1fr 1fr;width:100%;gap:8px}
 .chat-heading-actions .btn:last-child:nth-child(3){grid-column:1/-1}
 .chat-heading-actions .btn{min-height:42px;padding:8px 10px;font-size:12px}
 .chat-unified-search-card{padding:10px;border-radius:15px}
 .chat-unified-search{grid-template-columns:36px minmax(0,1fr);gap:7px}
 .chat-unified-search-icon{width:36px;height:40px}
 .chat-unified-search input{height:40px;font-size:13px}
 .chat-unified-search .btn{grid-column:1/-1;width:100%;min-height:38px}
 .chat-search-user-item,.chat-search-message-item{padding:9px}
 .chat-search-result-actions .btn{padding:6px 9px;font-size:11px}
 .chat-search-open{display:none}
}

/* PHASE 6: multi-admin, message selection, reply, forward and room menu */
.chat-room-head{position:relative}
.chat-room-actions{display:flex;align-items:center;gap:7px}
.chat-follow-room,.chat-room-menu-button{border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.055);color:var(--chat-text);min-height:34px;border-radius:10px;padding:7px 11px;font-size:11px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;transition:.18s ease}
.chat-follow-room:hover,.chat-room-menu-button:hover{background:rgba(255,255,255,.1);transform:translateY(-1px)}
.chat-follow-room.is-following{background:rgba(34,197,94,.16);border-color:rgba(34,197,94,.38);color:#bdf7cc}
.chat-room-menu-button{width:36px;padding:0}.chat-room-menu-button .chat-icon{width:20px;height:20px}
.chat-room-menu{position:absolute;z-index:40;right:10px;top:58px;min-width:218px;padding:7px;border:1px solid rgba(255,255,255,.13);border-radius:14px;background:#171b24;box-shadow:0 18px 48px rgba(0,0,0,.42);animation:chatFadeUp .18s ease both}
.chat-room-menu a,.chat-room-menu button{width:100%;border:0;background:transparent;color:#eef1f7;display:flex;align-items:center;gap:10px;padding:10px;border-radius:10px;text-align:left;font-size:12px;font-weight:700;text-decoration:none!important}
.chat-room-menu a:hover,.chat-room-menu button:hover{background:rgba(255,255,255,.075)}
.chat-room-menu .chat-icon{width:18px;height:18px;color:#aeb5c2}
.chat-admin-badge{display:inline-flex;align-items:center;width:max-content;margin-bottom:6px;padding:3px 7px;border:1px solid rgba(255,255,255,.18);border-radius:999px;color:#f1f3f7;background:rgba(255,255,255,.08);font-size:8px;font-weight:900;letter-spacing:.08em}
.chat-forwarded-label{display:flex;align-items:center;gap:5px;margin-bottom:5px;color:#adb4c2;font-size:9px;font-weight:750;font-style:italic}
.chat-reply-preview{width:100%;border:0;border-left:3px solid rgba(255,193,7,.78);border-radius:8px;background:rgba(0,0,0,.19);padding:7px 9px;margin-bottom:7px;color:inherit;text-align:left;display:flex;flex-direction:column;gap:2px}
.chat-reply-preview strong{font-size:10px;color:#f7cf5b}.chat-reply-preview span{font-size:10px;color:#c4c9d2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-message-row{position:relative;transition:transform .18s ease,background .18s ease,padding .18s ease}
.chat-message-selector{display:none;position:absolute;top:50%;transform:translateY(-50%);width:26px;height:26px;border:1px solid rgba(255,255,255,.24);border-radius:50%;background:#11151d;padding:4px;z-index:5}
.chat-message-row.mine .chat-message-selector{left:-34px}.chat-message-row.theirs .chat-message-selector{right:-34px}
.chat-message-selector span{display:block;width:100%;height:100%;border-radius:50%;background:transparent}
.chat-selection-active .chat-message-selector,.chat-message-row.is-selected .chat-message-selector{display:block}
.chat-message-row.is-selected .chat-message-selector span{background:#f7c948;box-shadow:inset 0 0 0 4px #11151d}
.chat-message-row.is-selected .chat-bubble{box-shadow:0 0 0 2px rgba(247,201,72,.72),0 10px 25px rgba(0,0,0,.25)}
.chat-selection-bar{position:absolute;z-index:50;left:0;right:0;top:0;min-height:59px;padding:7px 10px;background:#161a23;border-bottom:1px solid rgba(255,255,255,.12);display:flex;align-items:center;gap:10px;animation:chatFadeDown .2s ease both}
.chat-selection-bar>button,.chat-selection-bar>div button{border:0;background:rgba(255,255,255,.07);color:#f2f4f8;border-radius:9px;min-height:36px;padding:7px 10px;display:inline-flex;align-items:center;gap:6px;font-size:10px;font-weight:800}
.chat-selection-bar>button{width:36px;padding:0;justify-content:center}.chat-selection-bar strong{flex:1;font-size:12px}.chat-selection-bar>div{display:flex;gap:5px}.chat-selection-bar .chat-icon{width:16px;height:16px}
.chat-reply-compose{display:flex;align-items:center;gap:8px;padding:8px 10px;border-top:1px solid rgba(255,255,255,.08);background:#161a22;animation:chatFadeUp .18s ease both}
.chat-reply-compose>div{flex:1;min-width:0;border-left:3px solid #f7c948;padding-left:9px;display:flex;flex-direction:column}.chat-reply-compose strong{font-size:10px;color:#f7c948}.chat-reply-compose span{font-size:10px;color:#b7bdc8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-reply-compose button{border:0;background:transparent;color:#c8cdd6}.chat-reply-compose .chat-icon{width:18px;height:18px}
.chat-context-menu{position:fixed;z-index:10000;width:180px;padding:6px;border:1px solid rgba(255,255,255,.14);border-radius:12px;background:#171b24;box-shadow:0 18px 48px rgba(0,0,0,.45)}
.chat-context-menu button{width:100%;border:0;background:transparent;color:#eef1f6;padding:10px;border-radius:8px;text-align:left;font-size:12px}.chat-context-menu button:hover{background:rgba(255,255,255,.08)}
.chat-action-modal{position:fixed;z-index:10001;inset:0;background:rgba(2,4,8,.7);backdrop-filter:blur(5px);display:flex;align-items:center;justify-content:center;padding:18px}
.chat-action-dialog{width:min(430px,100%);max-height:82vh;overflow:auto;border:1px solid rgba(255,255,255,.13);border-radius:18px;background:#171b24;padding:18px;box-shadow:0 24px 70px rgba(0,0,0,.52);animation:chatModalIn .2s ease both}
.chat-action-dialog h3{margin:0 0 8px;color:#fff;font-size:18px}.chat-action-dialog p{color:#aeb5c2;font-size:12px}.chat-action-dialog>button{width:100%;margin-top:8px;min-height:42px;border:1px solid rgba(255,255,255,.11);border-radius:11px;background:rgba(255,255,255,.055);color:#f1f3f7;font-weight:800}.chat-action-dialog>button[data-delete-scope="everyone"]{background:rgba(220,53,69,.14);border-color:rgba(220,53,69,.32)}
.chat-action-dialog input{width:100%;height:43px;border:1px solid rgba(255,255,255,.13);border-radius:11px;background:#10141b;color:#fff;padding:0 12px}
.chat-forward-results{display:grid;gap:7px;margin-top:10px}.chat-forward-user{width:100%;display:flex;align-items:center;gap:10px;border:1px solid rgba(255,255,255,.09);border-radius:12px;background:rgba(255,255,255,.035);color:#fff;padding:9px;text-align:left}.chat-forward-user:hover{border-color:rgba(247,201,72,.38)}.chat-forward-user img{width:40px;height:40px;border-radius:50%;object-fit:cover}.chat-forward-user span{display:flex;flex-direction:column;min-width:0}.chat-forward-user strong,.chat-forward-user small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-forward-user small{color:#9ea5b2}
.chat-media-policy-note .is-admin-free{border-color:rgba(34,197,94,.34);color:#bdf7cc;background:rgba(34,197,94,.11)}
@keyframes chatFadeDown{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
@keyframes chatModalIn{from{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:none}}
@media(max-width:767.98px){
 .chat-follow-room{min-height:31px;padding:5px 8px;font-size:9px}.chat-room-menu-button{width:32px;min-height:32px}.chat-room-menu{right:6px;top:55px;min-width:205px}
 .chat-selection-bar{min-height:57px;padding:6px}.chat-selection-bar>div button span{display:none}.chat-selection-bar>div button{width:36px;padding:0;justify-content:center}
 .chat-message-row.mine .chat-message-selector{left:-29px}.chat-message-row.theirs .chat-message-selector{right:-29px}.chat-message-selector{width:23px;height:23px}
 .chat-selection-active .chat-message-row.mine{padding-left:27px}.chat-selection-active .chat-message-row.theirs{padding-right:27px}
 .chat-action-modal{padding:10px;align-items:flex-end}.chat-action-dialog{width:100%;border-radius:18px 18px 8px 8px;max-height:78vh}
}
.chat-forwarded-icon{width:14px;height:14px;flex:0 0 14px;color:currentColor}
.chat-room-person>strong{display:flex;align-items:center;gap:7px;min-width:0}.chat-room-admin-badge{margin:0;flex:0 0 auto;font-size:7px;padding:2px 6px}

/* CHAT PHASE 7 — REKBER + FULL HEIGHT CHAT */
.chat-ui-v2 .chat-site-header .info_box,
.chat-ui-v2 .chat-site-header .info_box_icon,
.chat-ui-v2 .chat-site-header .info_box_text { display:none!important; }
.chat-ui-v2 .chat-site-header .head_section + .info_box { display:none!important; }
.chat-ui-v2 .chat-site-header { margin-bottom:0!important; }
.chat-rekber-home-button{position:relative}.chat-rekber-home-button .chat-nav-badge{position:absolute;top:-7px;right:-7px}
.chat-rekber-list-panel{overflow:hidden}.chat-rekber-list{display:grid}.chat-rekber-list-item{display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:12px;align-items:center;padding:14px 16px;border-bottom:1px solid rgba(255,255,255,.08);color:inherit;transition:transform .18s ease,background .18s ease}.chat-rekber-list-item:hover{background:rgba(255,255,255,.055);transform:translateX(3px);color:inherit}.chat-rekber-list-icon,.chat-rekber-head-icon{width:44px;height:44px;border-radius:14px;display:inline-flex;align-items:center;justify-content:center;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.1)}.chat-rekber-list-copy,.chat-rekber-list-meta{min-width:0;display:flex;flex-direction:column}.chat-rekber-list-copy strong,.chat-rekber-list-meta b{color:#fff}.chat-rekber-list-copy small,.chat-rekber-list-meta small{color:rgba(255,255,255,.62);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-rekber-list-meta{text-align:right;align-items:flex-end}
.chat-rekber-wizard-dialog{max-width:680px!important}.chat-dialog-close{position:absolute;right:14px;top:14px;border:0;background:transparent;color:inherit}.chat-rekber-role-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0}.chat-rekber-role-grid button{display:grid;gap:7px;text-align:left;padding:18px;border-radius:16px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.05);color:#fff;transition:.2s}.chat-rekber-role-grid button:hover{transform:translateY(-2px);border-color:rgba(255,255,255,.28);background:rgba(255,255,255,.09)}.chat-rekber-role-grid button>span{width:42px;height:42px;display:flex;align-items:center;justify-content:center;border-radius:13px;background:rgba(255,255,255,.08)}.chat-rekber-role-grid small{color:rgba(255,255,255,.62)}.chat-rekber-user-results{max-height:360px;overflow:auto;margin:12px 0}.chat-rekber-user-option{width:100%;display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:12px;align-items:center;text-align:left;padding:12px;border:0;border-bottom:1px solid rgba(255,255,255,.08);background:transparent;color:#fff}.chat-rekber-user-option:hover{background:rgba(255,255,255,.06)}.chat-rekber-user-option span:nth-child(2){display:flex;flex-direction:column;min-width:0}.chat-rekber-user-option small{color:rgba(255,255,255,.6)}
.chat-rekber-room{min-height:calc(100vh - 150px)}.chat-rekber-room-head{grid-template-columns:auto auto minmax(0,1fr) auto}.chat-rekber-participants{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:10px 12px;background:rgba(255,255,255,.025);border-bottom:1px solid rgba(255,255,255,.08)}.chat-rekber-person{display:flex;align-items:center;gap:8px;min-width:0;padding:8px;border-radius:12px}.chat-rekber-person.is-me{background:rgba(255,255,255,.07)}.chat-rekber-person .chat-avatar-placeholder{width:34px;height:34px;flex:0 0 34px}.chat-rekber-person div{display:flex;flex-direction:column;min-width:0}.chat-rekber-person small{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:rgba(255,255,255,.55)}.chat-rekber-person strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#fff;font-size:13px}.chat-rekber-person>b{margin-left:auto;font-size:10px;border:1px solid rgba(255,255,255,.15);padding:3px 6px;border-radius:999px}.chat-rekber-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:rgba(255,255,255,.08);border-bottom:1px solid rgba(255,255,255,.08)}.chat-rekber-summary>div{padding:9px 12px;background:#17191d;display:flex;flex-direction:column;min-width:0}.chat-rekber-summary span{font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:rgba(255,255,255,.5)}.chat-rekber-summary strong{color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}.chat-rekber-messages{min-height:240px;max-height:calc(100vh - 520px)}.chat-message.is-rekber-system{justify-content:center}.chat-message.is-rekber-system .chat-message-bubble{max-width:88%;background:rgba(255,255,255,.065);border:1px solid rgba(255,255,255,.1);text-align:center}.chat-message.is-rekber-system .chat-message-meta{justify-content:center}.chat-rekber-action-panel{padding:14px;border-top:1px solid rgba(255,255,255,.08);background:#15171a}.chat-rekber-action-copy{display:flex;flex-direction:column;gap:4px;margin-bottom:12px}.chat-rekber-action-copy strong{color:#fff;font-size:15px}.chat-rekber-action-copy small{color:rgba(255,255,255,.6)}.chat-rekber-choice-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}.chat-rekber-choice-grid button{padding:14px;border:1px solid rgba(255,255,255,.12);border-radius:14px;background:rgba(255,255,255,.05);color:#fff;text-align:left;transition:.18s}.chat-rekber-choice-grid button:hover{background:rgba(255,255,255,.1);transform:translateY(-2px)}.chat-rekber-inline-form{display:flex;gap:8px}.chat-rekber-inline-form input{flex:1;min-width:0;border:1px solid rgba(255,255,255,.12);border-radius:12px;background:#0d0f12;color:#fff;padding:11px 13px}.chat-rekber-payload-buttons,.chat-rekber-action-buttons{display:flex;flex-wrap:wrap;gap:8px}.btn-chat-danger{background:#3b1d21!important;border-color:#6d2c35!important;color:#ffdce0!important}.chat-rekber-waiting{display:flex;align-items:center;justify-content:center;gap:12px;padding:10px;text-align:left}.chat-rekber-waiting>div{display:flex;flex-direction:column}.chat-rekber-waiting small{color:rgba(255,255,255,.58)}.chat-loader-rings{position:relative;width:34px;height:34px;display:inline-block;flex:0 0 34px}.chat-loader-rings i{position:absolute;inset:0;border:2px solid transparent;border-top-color:currentColor;border-radius:50%;animation:chatRekberSpin 1.1s linear infinite}.chat-loader-rings i:nth-child(2){inset:5px;animation-direction:reverse;animation-duration:.8s}.chat-loader-rings i:nth-child(3){inset:10px;animation-duration:.6s}@keyframes chatRekberSpin{to{transform:rotate(360deg)}}.chat-rekber-progress-card{display:flex;align-items:center;gap:12px;padding:12px 14px;border-top:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.035)}.chat-rekber-progress-card div{display:flex;flex-direction:column}.chat-rekber-progress-card b{margin-left:auto}.chat-rekber-balance-card,.chat-rekber-terms,.chat-rekber-delivery,.chat-rekber-result{padding:13px;border-radius:14px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.09);margin-bottom:10px}.chat-rekber-balance-card{display:grid;gap:4px}.chat-rekber-balance-card strong{font-size:22px;color:#fff}.chat-rekber-terms dl{display:grid;gap:7px;margin:10px 0}.chat-rekber-terms dl>div{display:flex;justify-content:space-between;border-bottom:1px dashed rgba(255,255,255,.09);padding-bottom:6px}.chat-rekber-terms dt{font-weight:400;color:rgba(255,255,255,.62)}.chat-rekber-terms dd{margin:0;font-weight:700;color:#fff}.chat-rekber-result.is-success{border-color:rgba(80,200,130,.35)}.chat-rekber-result.is-muted{opacity:.8}.chat-rekber-admin-note{display:flex;gap:8px;padding:10px;border-top:1px solid rgba(255,255,255,.08);background:#111317}.chat-rekber-admin-note input{flex:1;background:#0b0d10;border:1px solid rgba(255,255,255,.1);border-radius:12px;color:#fff;padding:10px}.chat-rekber-admin-note button{width:42px;border:0;border-radius:12px;background:rgba(255,255,255,.12);color:#fff}.chat-modal-open{overflow:hidden}
@media(max-width:767.98px){.chat-rekber-role-grid{grid-template-columns:1fr}.chat-rekber-list-item{grid-template-columns:42px minmax(0,1fr)}.chat-rekber-list-meta{grid-column:2;align-items:flex-start;text-align:left;flex-direction:row;gap:8px}.chat-rekber-participants{grid-template-columns:1fr}.chat-rekber-person{padding:5px 8px}.chat-rekber-summary{grid-template-columns:1fr 1fr}.chat-rekber-messages{max-height:none;min-height:34vh}.chat-rekber-room{min-height:calc(100dvh - 90px)}.chat-rekber-inline-form{flex-direction:column}.chat-rekber-action-buttons .btn,.chat-rekber-payload-buttons .btn{flex:1 1 130px}.chat-heading-actions{display:grid!important;grid-template-columns:1fr 1fr;width:100%}.chat-heading-actions>*{justify-content:center}.chat-rekber-wizard-dialog{max-height:92dvh;overflow:auto}}

/* CHAT PHASE 8 — HUMAN REKBER ROOM + TYPING INDICATOR */
.chat-typing-indicator{display:flex;align-items:center;gap:9px;min-height:34px;padding:4px 14px 7px;color:var(--chat-muted,#aeb5c4);font-size:12px;animation:chatTypingIn .18s ease both}
.chat-typing-indicator[hidden]{display:none!important}
.chat-typing-indicator>div:last-child{display:flex;align-items:center;gap:7px;min-width:0}
.chat-typing-indicator strong{font-size:12px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px}
.chat-typing-avatars{display:flex;align-items:center;padding-left:4px}
.chat-typing-avatars img,.chat-typing-avatars span{width:24px;height:24px;border-radius:50%;object-fit:cover;display:grid;place-items:center;background:#252b36;color:#fff;border:2px solid #151922;margin-left:-5px;font-size:10px;font-weight:800}
.chat-typing-avatars img:first-child,.chat-typing-avatars span:first-child{margin-left:0}
.chat-typing-dots{display:inline-flex;align-items:center;gap:3px;height:14px}
.chat-typing-dots i{width:4px;height:4px;border-radius:50%;background:currentColor;opacity:.35;animation:chatTypingDot 1.1s infinite ease-in-out}
.chat-typing-dots i:nth-child(2){animation-delay:.14s}.chat-typing-dots i:nth-child(3){animation-delay:.28s}
@keyframes chatTypingDot{0%,60%,100%{transform:translateY(0);opacity:.3}30%{transform:translateY(-4px);opacity:1}}
@keyframes chatTypingIn{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}

.chat-rekber-human-room{position:relative;overflow:hidden}
.chat-rekber-human-room .chat-rekber-room-head{min-height:64px}
.chat-rekber-stack-avatar{position:relative;width:54px;height:42px;flex:0 0 54px}
.chat-rekber-stack-avatar img{position:absolute;width:34px;height:34px;border-radius:50%;object-fit:cover;border:2px solid #171b24;background:#272d38;box-shadow:0 3px 12px rgba(0,0,0,.24)}
.chat-rekber-stack-avatar img:nth-child(1){left:0;top:2px;z-index:3}.chat-rekber-stack-avatar img:nth-child(2){left:18px;top:0;z-index:2}.chat-rekber-stack-avatar img:nth-child(3){left:20px;top:14px;z-index:1}
.chat-online-dot-inline{display:inline-block;width:7px;height:7px;border-radius:50%;background:#27c875;margin-right:5px;box-shadow:0 0 0 3px rgba(39,200,117,.12)}
.chat-rekber-detail-drawer{position:absolute;z-index:25;top:64px;right:8px;width:min(390px,calc(100% - 16px));max-height:calc(100% - 76px);overflow:auto;padding:14px;border:1px solid rgba(255,255,255,.11);border-radius:16px;background:rgba(21,25,34,.98);box-shadow:0 18px 50px rgba(0,0,0,.42);backdrop-filter:blur(16px);animation:chatDrawerIn .2s ease both}
.chat-rekber-detail-drawer[hidden]{display:none!important}
@keyframes chatDrawerIn{from{opacity:0;transform:translateY(-8px) scale(.98)}to{opacity:1;transform:none}}
.chat-rekber-detail-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.chat-rekber-detail-head>div{display:flex;flex-direction:column}.chat-rekber-detail-head small{color:var(--chat-muted,#aeb5c4);font-size:11px;margin-top:3px}
.chat-rekber-detail-head button{border:0;background:transparent;color:#d9deea;width:34px;height:34px;border-radius:10px;display:grid;place-items:center}
.chat-rekber-detail-head button:hover{background:rgba(255,255,255,.07)}
.chat-rekber-participants.compact{display:grid;grid-template-columns:1fr;gap:8px;padding:0;border:0;background:transparent}
.chat-rekber-participants.compact .chat-rekber-person{min-height:48px;padding:7px 9px;border-radius:12px;background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.07)}
.chat-rekber-participants.compact .chat-avatar{width:34px;height:34px}
.chat-rekber-summary.compact{margin:12px 0 0;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:0;background:transparent;border:0}
.chat-rekber-summary.compact>div{padding:10px;border-radius:12px;background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.07)}

.chat-rekber-human-room .chat-rekber-messages{padding-top:14px;background-image:radial-gradient(circle at 20% 20%,rgba(255,255,255,.025),transparent 28%),radial-gradient(circle at 80% 70%,rgba(255,255,255,.02),transparent 30%)}
.chat-rekber-human-room .chat-message-row{animation:chatMessagePop .2s ease both}
@keyframes chatMessagePop{from{opacity:0;transform:translateY(6px) scale(.99)}to{opacity:1;transform:none}}
.chat-rekber-human-room .chat-message-row.is-admin-message .chat-bubble{border-color:rgba(255,255,255,.13);background:linear-gradient(145deg,#262d39,#202631)}
.chat-rekber-sender-line{display:flex;align-items:center;gap:7px;margin-bottom:5px;min-width:0}
.chat-rekber-sender-line strong{font-size:11px;line-height:1.2;color:#dfe5ef;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-rekber-sender-line .chat-admin-badge{font-size:8px;padding:2px 5px;letter-spacing:.04em}
.chat-rekber-bubble .chat-message-body{white-space:pre-wrap;overflow-wrap:anywhere}

.chat-rekber-quick-replies{border-top:1px solid rgba(255,255,255,.08);padding:10px 12px;background:linear-gradient(180deg,rgba(18,22,30,.88),#12161e);max-height:260px;overflow:auto}
.chat-rekber-quick-replies .chat-rekber-action-copy{display:flex;flex-direction:column;align-items:flex-start;gap:3px;margin-bottom:9px}
.chat-rekber-admin-mini{display:inline-flex;padding:2px 6px;border-radius:999px;background:rgba(255,255,255,.08);font-size:8px;font-weight:800;letter-spacing:.06em;color:#e7ebf2}
.chat-rekber-quick-replies .chat-rekber-action-copy strong{font-size:13px;color:#f4f6fa}
.chat-rekber-quick-replies .chat-rekber-action-copy small{color:#9ea8b8;font-size:11px;line-height:1.45}
.chat-rekber-choice-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px}
.chat-rekber-choice-grid button{min-height:68px;padding:10px;border-radius:13px;border:1px solid rgba(255,255,255,.1);background:#202631;color:#f1f4f8;text-align:left;transition:transform .16s ease,border-color .16s ease,background .16s ease}
.chat-rekber-choice-grid button:hover{transform:translateY(-2px);border-color:rgba(255,255,255,.24);background:#252c38}.chat-rekber-choice-grid button:active{transform:scale(.98)}
.chat-rekber-choice-grid button strong,.chat-rekber-choice-grid button small{display:block}.chat-rekber-choice-grid button small{margin-top:5px;color:#98a3b4;font-size:10px}
.chat-rekber-composer-form{display:flex;align-items:center;gap:7px;margin:0}
.chat-rekber-composer-form input{flex:1;min-width:0;height:42px;border-radius:13px!important;border:1px solid rgba(255,255,255,.1)!important;background:#191e27!important;color:#f5f7fa!important;padding:0 12px!important;outline:none}
.chat-rekber-composer-form input:focus{border-color:rgba(255,255,255,.28)!important;box-shadow:0 0 0 3px rgba(255,255,255,.04)}
.chat-rekber-action-buttons,.chat-rekber-payload-buttons{display:flex;flex-wrap:wrap;gap:8px}
.chat-rekber-action-buttons .btn,.chat-rekber-payload-buttons .btn,.chat-rekber-quick-replies>.btn{min-height:38px;border-radius:12px;padding:8px 14px;transition:transform .15s ease}
.chat-rekber-action-buttons .btn:active,.chat-rekber-payload-buttons .btn:active{transform:scale(.97)}
.chat-rekber-waiting.compact{min-height:42px;padding:7px 9px;border-radius:12px;background:rgba(255,255,255,.035);display:flex;align-items:center;gap:10px}
.chat-rekber-waiting.compact strong{display:block;font-size:12px;color:#e7eaf0}.chat-rekber-waiting.compact small{display:block;font-size:10px;color:#98a3b4;margin-top:2px}
.chat-rekber-admin-composer{border-top:1px solid rgba(255,255,255,.08)}
.chat-rekber-admin-composer textarea{resize:none}
.chat-rekber-guided-composer{display:flex;align-items:center;gap:10px;padding:10px 13px;border-top:1px solid rgba(255,255,255,.08);background:#12161e;color:#dfe4ec}
.chat-rekber-guided-composer>span{width:34px;height:34px;border-radius:11px;background:rgba(255,255,255,.06);display:grid;place-items:center}
.chat-rekber-guided-composer strong,.chat-rekber-guided-composer small{display:block}.chat-rekber-guided-composer strong{font-size:12px}.chat-rekber-guided-composer small{font-size:10px;color:#98a3b4;margin-top:2px}
.chat-rekber-human-room.is-admin-thinking .chat-rekber-quick-replies{opacity:.7;pointer-events:none}

/* Easier item type editor in BCPanel */
.chat-rekber-type-builder{display:grid;gap:10px}
.chat-rekber-type-row{display:grid;grid-template-columns:minmax(130px,1.1fr) minmax(130px,1.1fr) minmax(150px,.9fr) 40px;gap:9px;align-items:end;padding:11px;border:1px solid rgba(127,127,127,.18);border-radius:12px;background:rgba(127,127,127,.035)}
.chat-rekber-type-row .form-label{font-size:11px;margin-bottom:5px}.chat-rekber-type-remove{width:38px;height:38px;border-radius:10px;border:1px solid rgba(220,53,69,.25);background:rgba(220,53,69,.08);color:#dc3545;display:grid;place-items:center}
.chat-rekber-type-remove:hover{background:rgba(220,53,69,.15)}
.chat-rekber-type-help{display:flex;align-items:flex-start;gap:9px;padding:10px 12px;border-radius:11px;background:rgba(13,110,253,.07);color:inherit;font-size:12px}
@media(max-width:767.98px){
 .chat-typing-indicator{padding-left:10px}.chat-typing-indicator strong{max-width:200px}
 .chat-rekber-detail-drawer{top:58px;right:5px;width:calc(100% - 10px);max-height:calc(100% - 68px)}
 .chat-rekber-stack-avatar{width:47px;flex-basis:47px;transform:scale(.9);transform-origin:left center}
 .chat-rekber-quick-replies{max-height:230px;padding:9px}
 .chat-rekber-choice-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .chat-rekber-type-row{grid-template-columns:1fr}.chat-rekber-type-remove{width:100%;height:36px}
}


/* CHAT MOBILE KEYBOARD + INPUT ZOOM FIX V1 */
html{max-width:100%;overflow-x:hidden}
body.chat-ui-v2{max-width:100%;overflow-x:hidden;overscroll-behavior-x:none}
body.chat-ui-v2 .chat-site-wrapper,
body.chat-ui-v2 .chat-shell,
body.chat-ui-v2 .chat-room,
body.chat-ui-v2 .chat-room-head,
body.chat-ui-v2 .chat-messages,
body.chat-ui-v2 .chat-composer,
body.chat-ui-v2 .chat-rekber-action-panel{min-width:0;max-width:100%}
body.chat-ui-v2 input,
body.chat-ui-v2 textarea,
body.chat-ui-v2 select{max-width:100%}
@media(max-width:767.98px){
  html,body.chat-ui-v2{width:100%;min-height:100dvh;overflow-x:hidden!important}
  body.chat-ui-v2 input,
  body.chat-ui-v2 textarea,
  body.chat-ui-v2 select,
  body.chat-ui-v2 .form-control,
  body.chat-ui-v2 .chat-composer textarea,
  body.chat-ui-v2 .chat-rekber-composer-form input,
  body.chat-ui-v2 .chat-unified-search input,
  body.chat-ui-v2 .chat-search input{font-size:16px!important}
  body.chat-ui-v2 .chat-conversation-page,
  body.chat-ui-v2 .chat-rekber-room-page{width:100%;max-width:100%;overflow:hidden}
  body.chat-ui-v2 .chat-room{height:var(--chat-room-mobile-height,calc(100dvh - 165px));max-height:var(--chat-room-mobile-height,calc(100dvh - 165px));min-height:300px;overflow:hidden}
  body.chat-ui-v2 .chat-messages{min-height:0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
  body.chat-ui-v2 .chat-composer,
  body.chat-ui-v2 .chat-rekber-action-panel,
  body.chat-ui-v2 .chat-rekber-guided-composer{flex-shrink:0;transform:translateZ(0)}
  body.chat-ui-v2 .chat-composer textarea{width:100%;min-width:0}
  body.chat-ui-v2.chat-keyboard-open{padding-bottom:0!important}
  body.chat-ui-v2.chat-keyboard-open .chat-module-nav{display:none!important}
  body.chat-ui-v2.chat-keyboard-open .chat-room{border-bottom-left-radius:0;border-bottom-right-radius:0}
  body.chat-ui-v2.chat-keyboard-open .chat-shell{padding-bottom:0!important}
  body.chat-ui-v2 .chat-rekber-composer-form{width:100%;min-width:0}
  body.chat-ui-v2 .chat-rekber-composer-form input{width:100%;min-width:0}
}
