/* ============================================================================
   Support Center — styles. WII SMS identity (red/purple), RTL-first, glass
   accents, responsive (list+chat side by side on desktop, stacked on mobile).
   ========================================================================== */
:root {
  --sup-accent: #b45cff;
  --sup-accent-2: #ff2e63;
  --sup-grad: linear-gradient(135deg, #b45cff, #ff2e63);
  --sup-bg: rgba(18, 10, 34, .55);
  --sup-bg-2: rgba(10, 6, 22, .72);
  --sup-line: rgba(180, 92, 255, .18);
  --sup-fg: #efe8ff;
  --sup-muted: #a698cf;
  --sup-out: linear-gradient(135deg, #7b2ff7, #b45cff);
  --sup-in: rgba(30, 20, 55, .9);
  --sup-ok: #2ecc71;
  --sup-danger: #ff4d6d;
}

/* ---------- root layout ---------- */
.sup-root {
  position: relative;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  height: calc(100vh - 150px);
  min-height: 520px;
  direction: rtl;
  font-family: "Cairo", Inter, Tahoma, sans-serif;
  color: var(--sup-fg);
}
.sup-side, .sup-main {
  background: linear-gradient(165deg, var(--sup-bg), var(--sup-bg-2));
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--sup-line);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ---------- side (conversation list) ---------- */
.sup-side-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--sup-line);
  background: rgba(180, 92, 255, .05);
}
.sup-side-title { font-weight: 800; font-size: 1.02rem; }
.sup-side-btns { display: flex; gap: 8px; }
.sup-new {
  background: var(--sup-grad) !important; border: none !important;
  color: #fff !important; box-shadow: 0 6px 16px rgba(180, 92, 255, .35);
}
.sup-list { overflow-y: auto; flex: 1; padding: 8px; }

/* conversation row */
.sup-row {
  display: flex; gap: 12px; align-items: center;
  padding: 12px; border-radius: 16px; cursor: pointer;
  transition: background .16s ease, transform .12s ease;
  border: 1px solid transparent;
}
.sup-row:hover { background: rgba(180, 92, 255, .09); }
.sup-row.active {
  background: linear-gradient(135deg, rgba(180, 92, 255, .18), rgba(255, 46, 99, .1));
  border-color: rgba(180, 92, 255, .3);
}
.sup-row.closed { opacity: .7; }
.sup-row-av { position: relative; flex-shrink: 0; }
.sup-row-main { flex: 1; min-width: 0; }
.sup-row-top { display: flex; align-items: center; gap: 8px; }
.sup-row-name { font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.sup-row-time { margin-inline-start: auto; font-size: .72rem; color: var(--sup-muted); white-space: nowrap; }
.sup-row-bottom { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.sup-row-last { flex: 1; font-size: .8rem; color: var(--sup-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sup-row-last i { font-style: normal; opacity: .8; }
.sup-row-closed { font-size: .68rem; color: var(--sup-danger); background: rgba(255, 77, 109, .12); padding: 1px 7px; border-radius: 8px; }
.sup-badge {
  background: var(--sup-grad); color: #fff; font-size: .68rem; font-weight: 800;
  min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center;
  padding: 0 6px; box-shadow: 0 3px 8px rgba(180, 92, 255, .4);
}

/* online dot */
.sup-dot {
  position: absolute; bottom: 0; inset-inline-end: 0;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--sup-ok); border: 2px solid #120a22;
  box-shadow: 0 0 8px rgba(46, 204, 113, .8);
}

/* ---------- avatars ---------- */
.sup-av {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: var(--sup-grad); color: #fff; font-weight: 800; font-size: 1rem;
  display: grid; place-items: center; overflow: hidden;
  box-shadow: 0 4px 14px rgba(180, 92, 255, .3);
}
.sup-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.sup-av-lg { width: 52px; height: 52px; font-size: 1.2rem; }
.sup-av-sm { width: 34px; height: 34px; font-size: .8rem; }

/* role badges */
.sup-role-badge {
  font-size: .64rem; font-weight: 800; padding: 2px 8px; border-radius: 8px;
  background: rgba(180, 92, 255, .16); color: #d9b8ff; white-space: nowrap;
}
.sup-role-badge.owner { background: rgba(255, 46, 99, .18); color: #ffb0c4; }
.sup-role-badge.admin { background: rgba(255, 165, 0, .18); color: #ffd08a; }
.sup-role-badge.developer { background: rgba(46, 204, 113, .16); color: #a8f0c0; }
.sup-role-badge.support { background: rgba(0, 200, 255, .16); color: #a8e8ff; }
.sup-role-badge.agent { background: rgba(180, 92, 255, .16); color: #d9b8ff; }

/* presence text */
.sup-on { color: var(--sup-ok); font-size: .74rem; font-weight: 700; }
.sup-seen { color: var(--sup-muted); font-size: .74rem; }

/* ---------- main / chat ---------- */
.sup-main { position: relative; }
.sup-placeholder {
  height: 100%; display: grid; place-content: center; text-align: center; gap: 8px;
  color: var(--sup-muted); padding: 2rem;
}
.sup-placeholder-ill { font-size: 3.4rem; filter: drop-shadow(0 8px 20px rgba(180, 92, 255, .4)); }
.sup-placeholder-title { font-size: 1.15rem; font-weight: 800; color: var(--sup-fg); }
.sup-placeholder-sub { font-size: .88rem; }

.sup-chat { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.sup-chat-head {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-bottom: 1px solid var(--sup-line); background: rgba(180, 92, 255, .05);
}
.sup-back { display: none; background: none; border: none; color: var(--sup-fg); font-size: 1.3rem; cursor: pointer; }
.sup-chat-id { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.sup-chat-idtxt { min-width: 0; }
.sup-chat-name { font-weight: 800; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.sup-chat-pres { margin-top: 2px; }
.sup-chat-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.sup-act { font-size: .78rem; }
.btn.danger.sup-act { background: rgba(255, 77, 109, .14) !important; color: #ffb0c4 !important; border-color: rgba(255, 77, 109, .3) !important; }

/* messages */
.sup-msgs {
  flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 4px;
  background:
    radial-gradient(600px 300px at 85% 10%, rgba(180, 92, 255, .06), transparent 60%),
    radial-gradient(500px 260px at 10% 90%, rgba(255, 46, 99, .05), transparent 60%);
  scroll-behavior: smooth;
}
.sup-day { align-self: center; margin: 12px 0 6px; }
.sup-day span {
  font-size: .7rem; color: var(--sup-muted); background: rgba(10, 6, 22, .6);
  padding: 4px 14px; border-radius: 12px; border: 1px solid var(--sup-line);
}
.sup-nomsgs { margin: auto; text-align: center; color: var(--sup-muted); display: grid; gap: 6px; }
.sup-older-btn {
  align-self: center; margin-bottom: 8px; background: rgba(180, 92, 255, .12);
  border: 1px solid var(--sup-line); color: var(--sup-fg); border-radius: 20px;
  padding: 6px 16px; cursor: pointer; font-size: .78rem;
}
.sup-loadolder { align-self: center; padding: 8px; }

/* message bubble */
.sup-msg { display: flex; max-width: 78%; margin-top: 2px; position: relative; }
.sup-msg.in { align-self: flex-start; }
.sup-msg.out { align-self: flex-end; }
.sup-msg-inner {
  background: var(--sup-in); border-radius: 18px; padding: 8px 12px 6px;
  border: 1px solid var(--sup-line); box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
  min-width: 90px; transition: transform .18s ease;
  border-start-start-radius: 6px;
}
.sup-msg.out .sup-msg-inner {
  background: var(--sup-out); border-color: rgba(180, 92, 255, .35);
  border-start-start-radius: 18px; border-start-end-radius: 6px;
}
.sup-msg.swiping .sup-msg-inner { transition: none; }
.sup-msg.swipe-ready .sup-msg-inner { box-shadow: 0 0 0 2px rgba(180, 92, 255, .5); }
.sup-msg.flash .sup-msg-inner { animation: supflash 1.2s ease; }
@keyframes supflash { 0%, 100% { box-shadow: 0 4px 14px rgba(0, 0, 0, .25); } 30% { box-shadow: 0 0 0 3px rgba(180, 92, 255, .6); } }

.sup-msg-text { font-size: .9rem; line-height: 1.55; word-break: break-word; white-space: pre-wrap; }
.sup-msg-text a { color: #ffd08a; text-decoration: underline; }
.sup-msg.deleted .sup-msg-inner { opacity: .65; font-style: italic; }
.sup-msg-deleted { color: var(--sup-muted); font-size: .82rem; font-style: italic; }
.sup-msg-meta { display: flex; align-items: center; gap: 6px; justify-content: flex-end; margin-top: 3px; }
.sup-msg-time { font-size: .66rem; color: rgba(255, 255, 255, .55); }
.sup-edited { font-size: .64rem; color: rgba(255, 255, 255, .5); }
.sup-ticks { font-size: .7rem; color: rgba(255, 255, 255, .6); letter-spacing: -2px; }

/* reply preview inside bubble */
.sup-reply {
  display: flex; align-items: stretch; gap: 8px; background: rgba(0, 0, 0, .25);
  border-radius: 10px; padding: 6px 8px; margin-bottom: 6px; cursor: pointer;
  border: none; width: 100%; text-align: start; color: inherit;
}
.sup-reply-bar { width: 3px; border-radius: 2px; background: var(--sup-accent); flex-shrink: 0; }
.sup-reply-body { font-size: .78rem; color: rgba(255, 255, 255, .8); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-reply-del { font-style: italic; color: var(--sup-muted); }

/* reactions under bubble */
.sup-reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.sup-react {
  display: inline-flex; align-items: center; gap: 3px; background: rgba(0, 0, 0, .3);
  border: 1px solid var(--sup-line); border-radius: 12px; padding: 1px 7px;
  cursor: pointer; font-size: .78rem; transition: transform .1s ease;
}
.sup-react:hover { transform: scale(1.12); }
.sup-react-n { font-size: .66rem; color: var(--sup-muted); }

/* message hover actions */
.sup-msg-actions {
  position: absolute; top: -14px; display: none; gap: 2px;
  background: rgba(10, 6, 22, .92); border: 1px solid var(--sup-line);
  border-radius: 12px; padding: 2px; box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
}
.sup-msg.in .sup-msg-actions { inset-inline-start: 8px; }
.sup-msg.out .sup-msg-actions { inset-inline-end: 8px; }
.sup-msg:hover .sup-msg-actions { display: flex; }
.sup-msg-act { background: none; border: none; cursor: pointer; font-size: .9rem; padding: 3px 5px; border-radius: 8px; }
.sup-msg-act:hover { background: rgba(180, 92, 255, .18); }

/* voice message */
.sup-voice { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.sup-voice-play {
  width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--sup-grad); color: #fff; font-size: .9rem;
  display: grid; place-items: center; flex-shrink: 0; box-shadow: 0 4px 12px rgba(180, 92, 255, .4);
}
.sup-voice-wave { display: flex; align-items: center; gap: 2px; flex: 1; height: 24px; }
.sup-voice-wave i { width: 3px; border-radius: 2px; background: rgba(255, 255, 255, .45); }
.sup-voice-wave i:nth-child(3n) { height: 70%; }
.sup-voice-wave i:nth-child(3n+1) { height: 40%; }
.sup-voice-wave i:nth-child(3n+2) { height: 90%; }
.sup-voice.playing .sup-voice-wave i { animation: supwave 1s ease-in-out infinite; }
@keyframes supwave { 0%, 100% { transform: scaleY(.6); } 50% { transform: scaleY(1.15); } }
.sup-voice-dur { font-size: .72rem; color: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums; }

/* typing indicator */
.sup-typing { padding: 4px 18px; font-size: .76rem; color: var(--sup-muted); display: flex; align-items: center; gap: 6px; min-height: 22px; }
.sup-typing-dots { display: inline-flex; gap: 3px; }
.sup-typing-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--sup-accent); animation: supdot 1s infinite; }
.sup-typing-dots i:nth-child(2) { animation-delay: .2s; }
.sup-typing-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes supdot { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

/* reply bar above composer */
.sup-replybar {
  display: flex; align-items: center; gap: 10px; padding: 8px 16px;
  background: rgba(180, 92, 255, .08); border-top: 1px solid var(--sup-line);
  border-bottom: 1px solid var(--sup-line);
}
.sup-replybar .sup-reply-body { color: var(--sup-fg); }
.sup-reply-x { margin-inline-start: auto; background: none; border: none; color: var(--sup-muted); cursor: pointer; font-size: 1rem; }

/* composer */
.sup-composer {
  display: flex; align-items: flex-end; gap: 8px; padding: 12px 14px;
  border-top: 1px solid var(--sup-line); background: rgba(10, 6, 22, .5);
}
.sup-composer.closed { justify-content: center; }
.sup-closed-note { color: var(--sup-muted); font-size: .84rem; }
.sup-input-wrap { flex: 1; }
.sup-input {
  width: 100%; background: rgba(255, 255, 255, .06); border: 1px solid var(--sup-line);
  border-radius: 20px; padding: 10px 16px; color: var(--sup-fg); resize: none;
  font-family: inherit; font-size: .9rem; max-height: 140px; outline: none;
  transition: border-color .15s ease;
}
.sup-input:focus { border-color: rgba(180, 92, 255, .5); }
.sup-input::placeholder { color: var(--sup-muted); }
.sup-comp-btn {
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(180, 92, 255, .12); color: var(--sup-fg); font-size: 1.15rem;
  display: grid; place-items: center; flex-shrink: 0; transition: transform .12s ease, background .15s ease;
}
.sup-comp-btn:hover { background: rgba(180, 92, 255, .24); transform: scale(1.06); }
.sup-comp-btn.send { background: var(--sup-grad); color: #fff; box-shadow: 0 6px 16px rgba(180, 92, 255, .4); }
.sup-comp-btn.send.editing { background: linear-gradient(135deg, #ff9f43, #ff2e63); }
.sup-comp-btn.cancel { background: rgba(255, 77, 109, .16); color: #ffb0c4; }

/* recording bar */
.sup-rec { display: flex; align-items: center; gap: 12px; flex: 1; }
.sup-rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--sup-danger); animation: suppulse 1s infinite; }
@keyframes suppulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.8); } }
.sup-rec-time { font-weight: 800; font-variant-numeric: tabular-nums; }
.sup-rec-hint { color: var(--sup-muted); font-size: .82rem; }
.sup-rec .send, .sup-rec .cancel { margin-inline-start: auto; }
.sup-rec .cancel + .send { margin-inline-start: 8px; }

/* ---------- empty / loading ---------- */
.sup-empty { text-align: center; padding: 2.4rem 1rem; color: var(--sup-muted); display: grid; gap: 8px; place-items: center; }
.sup-empty .big, .sup-empty-ill, .sup-empty-list .sup-empty-ill { font-size: 2.6rem; }
.sup-empty-title { font-weight: 800; color: var(--sup-fg); font-size: 1.05rem; }
.sup-empty-sub { font-size: .86rem; }
.sup-empty-list { height: 100%; display: grid; place-content: center; gap: 10px; text-align: center; padding: 1.5rem; }
.sup-empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.sup-cta { background: var(--sup-grad) !important; color: #fff !important; border: none !important; box-shadow: 0 8px 20px rgba(180, 92, 255, .35); }
.sup-loading { display: grid; place-items: center; gap: 10px; padding: 3rem; color: var(--sup-muted); }

/* ---------- emoji picker ---------- */
.sup-emoji-pop {
  position: fixed; z-index: 1000; width: 300px; max-height: 340px;
  background: rgba(16, 9, 30, .97); border: 1px solid var(--sup-line);
  border-radius: 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
  display: flex; flex-direction: column; overflow: hidden; direction: rtl;
}
.sup-emoji-quick { display: flex; gap: 4px; padding: 10px; border-bottom: 1px solid var(--sup-line); }
.sup-emoji-q { background: none; border: none; font-size: 1.3rem; cursor: pointer; padding: 4px; border-radius: 10px; transition: transform .1s; }
.sup-emoji-q:hover { transform: scale(1.25); background: rgba(180, 92, 255, .15); }
.sup-emoji-tabs { display: flex; border-bottom: 1px solid var(--sup-line); }
.sup-emoji-tab { flex: 1; background: none; border: none; color: var(--sup-muted); padding: 8px; cursor: pointer; font-size: .74rem; font-weight: 700; border-bottom: 2px solid transparent; }
.sup-emoji-tab.active { color: var(--sup-fg); border-bottom-color: var(--sup-accent); }
.sup-emoji-body { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 8px; }
.sup-emoji-e { background: none; border: none; font-size: 1.35rem; cursor: pointer; padding: 4px; border-radius: 8px; transition: transform .1s; }
.sup-emoji-e:hover { transform: scale(1.25); background: rgba(180, 92, 255, .15); }

/* ---------- more menu ---------- */
.sup-more {
  position: fixed; z-index: 1001; min-width: 150px;
  background: rgba(16, 9, 30, .98); border: 1px solid var(--sup-line);
  border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
  padding: 6px; direction: rtl;
}
.sup-more-item {
  display: block; width: 100%; text-align: start; background: none; border: none;
  color: var(--sup-fg); padding: 9px 12px; border-radius: 10px; cursor: pointer; font-size: .86rem;
}
.sup-more-item:hover { background: rgba(180, 92, 255, .16); }

/* ---------- team dialog ---------- */
.sup-team { display: grid; gap: 8px; max-height: 60vh; overflow-y: auto; }
.sup-team-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; border: 1px solid var(--sup-line); background: rgba(180, 92, 255, .05); }
.sup-team-info { flex: 1; min-width: 0; }
.sup-team-name { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.sup-team-pres { margin-top: 2px; }
.sup-team-chat { background: var(--sup-grad) !important; color: #fff !important; border: none !important; }

/* ---------- agent chats oversight ---------- */
.sup-agents { display: flex; flex-direction: column; height: calc(100vh - 150px); min-height: 520px; }
.sup-agents-head { display: flex; align-items: center; gap: 14px; padding: 16px 4px; }
.sup-agents-head h2 { font-size: 1.15rem; font-weight: 800; margin: 0; }
.sup-back2 { }
.sup-agents-body { flex: 1; overflow-y: auto; }
.sup-agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; padding: 4px; }
.sup-agent-card {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  background: linear-gradient(165deg, var(--sup-bg), var(--sup-bg-2));
  border: 1px solid var(--sup-line); border-radius: 18px;
  transition: transform .14s ease, border-color .14s ease;
}
.sup-agent-card:hover { transform: translateY(-3px); border-color: rgba(180, 92, 255, .4); }
.sup-agent-av { position: relative; flex-shrink: 0; }
.sup-agent-info { flex: 1; min-width: 0; }
.sup-agent-name { font-weight: 800; }
.sup-agent-pres { margin: 2px 0 6px; }
.sup-agent-stats { display: flex; gap: 12px; font-size: .76rem; color: var(--sup-muted); align-items: center; }
.sup-agent-last { font-size: .7rem; color: var(--sup-muted); margin-top: 4px; }
.sup-convo-list { display: grid; gap: 6px; padding: 8px 0; }

/* ---------- telegram placeholder (own wrapper, never .sup-root) ---------- */
.sup-page { height: calc(100vh - 150px); min-height: 420px; }
.sup-page .sup-main { height: 100%; }

/* ---------- row actions (pin / hide / delete) ---------- */
.sup-row { position: relative; }
.sup-row.pinned { background: rgba(180, 92, 255, .08); border-color: rgba(180, 92, 255, .25); }
.sup-row-pin { font-size: .8rem; }
.sup-row-menu {
  opacity: 0; position: absolute; inset-inline-end: 6px; top: 50%;
  transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%;
  background: rgba(10, 6, 22, .8); border: 1px solid var(--sup-line);
  color: var(--sup-muted); cursor: pointer; font-size: .9rem; line-height: 1;
  display: grid; place-items: center; transition: opacity .12s ease;
}
.sup-row:hover .sup-row-menu, .sup-row-menu:focus { opacity: 1; }
.sup-row-menu:hover { color: var(--sup-fg); background: rgba(180, 92, 255, .3); }
.sup-more-item.danger { color: #ffb0c4; }
.sup-more-item.danger:hover { background: rgba(255, 77, 109, .16); }

/* ---------- media bubbles ---------- */
.sup-msg.media .sup-msg-inner { padding: 6px 6px 4px; overflow: hidden; }
.sup-img { display: block; border-radius: 12px; overflow: hidden; line-height: 0; }
.sup-img img {
  max-width: 300px; max-height: 360px; width: auto; height: auto;
  border-radius: 12px; display: block; background: rgba(0, 0, 0, .2);
}
.sup-video video { width: 300px; max-width: 100%; border-radius: 12px; display: block; background: #000; }
.sup-file {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit;
  background: rgba(0, 0, 0, .22); border: 1px solid var(--sup-line);
  border-radius: 12px; padding: 10px 12px; min-width: 190px; max-width: 300px;
}
.sup-file:hover { background: rgba(0, 0, 0, .35); }
.sup-file-ic { font-size: 1.7rem; flex-shrink: 0; }
.sup-file-txt { min-width: 0; display: grid; }
.sup-file-name { font-size: .84rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sup-file-size { font-size: .7rem; color: rgba(255, 255, 255, .6); }
.sup-caption { margin-top: 6px; font-size: .86rem; }

/* ---------- composer: attachment row + media preview bar ---------- */
.sup-composer { flex-direction: column; align-items: stretch; gap: 0; }
.sup-comp-row { display: flex; align-items: flex-end; gap: 8px; }
.sup-composer.has-media .sup-comp-row { display: none; }
.sup-mediabar {
  display: flex; align-items: center; gap: 10px; padding: 8px;
  margin-bottom: 8px; background: rgba(180, 92, 255, .08);
  border: 1px dashed var(--sup-line); border-radius: 14px;
}
.sup-mediabar[hidden] { display: none; }
.sup-mb-preview { flex-shrink: 0; line-height: 0; }
.sup-mb-preview img, .sup-mb-preview video {
  width: 64px; height: 64px; object-fit: cover; border-radius: 10px; display: block;
}
.sup-mb-file {
  display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--sup-fg);
  max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sup-mb-cap {
  flex: 1; min-width: 0; background: rgba(255, 255, 255, .06);
  border: 1px solid var(--sup-line); border-radius: 18px; padding: 8px 14px;
  color: var(--sup-fg); font-family: inherit; font-size: .86rem; outline: none;
}
.sup-mb-cap:focus { border-color: rgba(180, 92, 255, .5); }
.sup-mb-btns { display: flex; gap: 6px; flex-shrink: 0; }

/* ---------- oversight review pane (isolated from the main chat) ---------- */
.sup-review-head {
  display: flex; align-items: center; gap: 12px; padding: 12px 4px;
  border-bottom: 1px solid var(--sup-line); margin-bottom: 6px;
}
.sup-review-name { font-weight: 800; }
.sup-review-sub { font-size: .72rem; color: var(--sup-muted); }
.sup-review-msgs {
  height: calc(100% - 70px); overflow-y: auto; display: flex; flex-direction: column;
  gap: 4px; padding: 8px 4px;
}

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .sup-root { grid-template-columns: 1fr; }
  .sup-side, .sup-main { position: absolute; inset: 0; }
  .sup-root .sup-main { display: none; }
  .sup-root.chat-open .sup-side { display: none; }
  .sup-root.chat-open .sup-main { display: flex; }
  .sup-back { display: block; }
  .sup-chat-actions { gap: 4px; }
  .sup-act { font-size: .68rem; padding: 4px 8px; }
  .sup-msg { max-width: 88%; }
  .sup-img img, .sup-video video { max-width: 74vw; }
  .sup-file { max-width: 74vw; }
  .sup-agents { min-height: 420px; }
  .sup-agent-grid { grid-template-columns: 1fr; }
  .sup-page { height: calc(100vh - 120px); }
}
@media (max-width: 480px) {
  .sup-side-title { font-size: .92rem; }
  .sup-chat-actions [data-act="team"] span { display: none; }
  .sup-mediabar { flex-wrap: wrap; }
  .sup-mb-cap { order: 3; flex-basis: 100%; }
}

/* -- In-site image lightbox ----------------------------- */
.sup-lightbox {
  position: fixed; inset: 0; z-index: 9999; display: none;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,.82); backdrop-filter: blur(3px); padding: 24px;
}
.sup-lightbox.on { display: flex; }
.sup-lightbox img {
  max-width: 100%; max-height: 100%; border-radius: 10px;
  box-shadow: 0 10px 50px rgba(0,0,0,.5); object-fit: contain;
}
.sup-lb-close {
  position: absolute; top: 16px; inset-inline-end: 16px;
  width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.15); color: #fff; font-size: 20px; line-height: 1;
}
.sup-lb-close:hover { background: rgba(255,255,255,.3); }
