/* RoyalSonic Talk — multi-window desktop messenger (MailEnable-style) */
:root {
  /* Match RoyalSonic webmail */
  --navy: #111827;
  --navy-2: #1f2937;
  --royal: #111827;
  --gold: #f5c518;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --orange: #ea580c;
  --orange-soft: #ffedd5;
  --blue: #2563eb;
  --blue-soft: #dbeafe;
  --bg: #f3f4f6;
  --pane: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e8ecf1;
  --font: "Plus Jakarta Sans", "Segoe UI", ui-sans-serif, sans-serif;
  --body: "Plus Jakarta Sans", "Segoe UI", ui-sans-serif, sans-serif;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body.rs-talk {
  font-family: var(--body);
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
}
.app-shell {
  height: 100%;
  display: grid;
  grid-template-rows: 64px 52px 1fr;
  min-height: 0;
}
.topnav {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0 1.1rem 0 1rem;
  background: var(--pane);
  color: #fff;
  overflow: hidden;
  z-index: 20;
  box-shadow: 0 2px 10px rgba(5, 20, 40, .25);
}
.brand {
  display: flex; align-items: center; gap: .55rem;
  text-decoration: none; color: inherit; z-index: 2;
}
.logo-mark { display: grid; place-items: center; }
.brand-text { font: 600 1.05rem/1 var(--font); white-space: nowrap; }
.brand-text strong { font-weight: 800; }
.main-nav {
  display: flex; justify-content: center; align-items: flex-end;
  gap: .15rem; height: 100%; z-index: 2;
}
.nav-item {
  appearance: none; border: 0; background: transparent;
  color: rgba(255,255,255,.82); text-decoration: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .2rem; min-width: 68px; height: 100%; padding: .55rem .45rem .4rem;
  font: 600 .68rem/1 var(--font); cursor: pointer; position: relative; opacity: .9;
}
.nav-item:hover { color: #fff; opacity: 1; background: rgba(255,255,255,.06); }
.nav-item.on { color: #fff; opacity: 1; }
.nav-item.on::after {
  content: ""; position: absolute; left: 18%; right: 18%; bottom: 0;
  height: 3px; border-radius: 3px 3px 0 0; background: #fff;
}
.top-utils {
  display: flex; align-items: center; gap: .35rem; z-index: 2; padding-right: 1.6rem;
}
.util {
  position: relative; width: 36px; height: 36px; border: 0; border-radius: 999px;
  background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer;
}
.util:hover { background: rgba(255,255,255,.1); }
.util .badge {
  position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: 999px; background: var(--royal); color: #fff;
  font: 700 .62rem/16px var(--font); text-align: center; box-shadow: 0 0 0 2px var(--navy);
}
.me-wrap { position: relative; margin-left: .35rem; width: 38px; height: 38px; }
.me-av {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8); color: #fff;
  font: 700 .72rem var(--font); border: 2px solid rgba(255,255,255,.35);
}
.me-dot {
  position: absolute; right: 0; bottom: 0; width: 10px; height: 10px;
  border-radius: 50%; background: #22c55e; border: 2px solid var(--navy);
}
.red-slash {
  position: absolute; top: 0; right: 0; width: 78px; height: 100%;
  background: var(--royal); clip-path: polygon(42% 0, 100% 0, 100% 100%, 0 100%);
  z-index: 1; pointer-events: none;
}
.toolbar {
  display: flex; align-items: center; gap: 1rem; padding: 0 1rem;
  background: #fff; border-bottom: 1px solid var(--line); z-index: 15;
}
.new-chat-wrap { position: relative; }
.btn-new {
  display: inline-flex; align-items: center; gap: .45rem; height: 36px;
  padding: 0 .9rem 0 .75rem; border: 0; border-radius: 8px;
  background: var(--navy-2); color: #fff; font: 700 .86rem var(--font); cursor: pointer;
}
.btn-new:hover { filter: brightness(1.08); }
.btn-new .caret { opacity: .75; }
.new-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 180px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .14); padding: .35rem; z-index: 30;
}
.new-menu button {
  width: 100%; text-align: left; border: 0; background: transparent;
  padding: .55rem .65rem; border-radius: 7px; font: 600 .85rem var(--body); cursor: pointer;
}
.new-menu button:hover { background: #f3f6f9; }
.toolbar-spacer { flex: 1; }
.presence-pills { display: flex; align-items: center; }
.presence-pills .pav {
  width: 26px; height: 26px; border-radius: 50%; color: #fff;
  font: 700 .58rem var(--font); display: grid; place-items: center;
  border: 2px solid #fff; margin-left: -6px;
}
.presence-pills .pav:first-child { margin-left: 0; }
.presence-pills .more { margin-left: .4rem; font: 600 .75rem var(--body); color: var(--muted); }
.workspace {
  min-height: 0; display: grid; grid-template-columns: 1fr 280px; background: var(--bg);
}
.chat-stage {
  min-width: 0; min-height: 0; display: flex; align-items: stretch; gap: 14px;
  padding: 14px 12px 14px 14px; overflow-x: auto; overflow-y: hidden;
}
.dock-win {
  flex: 1 1 0; min-width: 280px; max-width: 420px; display: flex; flex-direction: column;
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 35, 60, .1), 0 0 0 1px rgba(15, 35, 60, .06);
  animation: cardIn .35s ease both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.dock-win[data-theme="green"] { --accent: var(--green); --soft: var(--green-soft); }
.dock-win[data-theme="orange"] { --accent: var(--orange); --soft: var(--orange-soft); }
.dock-win[data-theme="blue"] { --accent: var(--blue); --soft: var(--blue-soft); }
.dock-win[data-theme="navy"] { --accent: var(--navy-2); --soft: #eef3f8; }
.dock-head {
  flex: 0 0 auto; display: flex; align-items: center; gap: .65rem;
  padding: .7rem .85rem; background: var(--accent, var(--green)); color: #fff;
}
.dock-head .who { display: flex; align-items: center; gap: .55rem; min-width: 0; flex: 1; }
.dock-head .av {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font: 700 .72rem var(--font); background: rgba(255,255,255,.22);
  border: 2px solid rgba(255,255,255,.35); flex: 0 0 auto;
}
.dock-head .meta { min-width: 0; }
.dock-head .meta strong {
  display: block; font: 700 .92rem/1.15 var(--font);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dock-head .meta span { display: block; font: 500 .72rem/1.2 var(--body); opacity: .9; }
.dock-acts { display: flex; align-items: center; gap: .15rem; }
.dock-acts .dh {
  width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent;
  color: #fff; display: grid; place-items: center; cursor: pointer;
}
.dock-acts .dh:hover { background: rgba(255,255,255,.18); }
.dock-feed {
  flex: 1; min-height: 0; overflow: auto; padding: .85rem .75rem 1rem;
  background: #f7f8fa; display: flex; flex-direction: column; gap: .65rem;
}
.day-pill {
  align-self: center; background: #e8ecf1; color: var(--muted);
  font: 600 .68rem var(--font); letter-spacing: .04em; text-transform: uppercase;
  padding: .25rem .7rem; border-radius: 999px;
}
.unread-sep {
  display: flex; align-items: center; gap: .55rem; margin: .15rem 0;
  color: var(--blue); font: 700 .72rem var(--font);
}
.unread-sep::before, .unread-sep::after {
  content: ""; flex: 1; height: 1px; background: rgba(47, 128, 237, .35);
}
.msg-row { display: flex; align-items: flex-end; gap: .4rem; max-width: 92%; }
.msg-row.them { align-self: flex-start; }
.msg-row.me { align-self: flex-end; flex-direction: row-reverse; }
.msg-row .mini-av {
  width: 24px; height: 24px; border-radius: 50%; font: 700 .55rem var(--font);
  color: #fff; display: grid; place-items: center; flex: 0 0 auto;
}
.msg-stack { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.msg-name { font: 700 .68rem var(--font); color: var(--muted); padding-left: .15rem; }
.dock-bubble {
  padding: .55rem .7rem; border-radius: 12px; font: 500 .88rem/1.35 var(--body);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04); word-break: break-word;
}
.msg-row.them .dock-bubble { background: #fff; color: var(--text); border-bottom-left-radius: 4px; }
.msg-row.me .dock-bubble { background: var(--soft, var(--green-soft)); color: var(--text); border-bottom-right-radius: 4px; }
.dock-bubble time {
  display: inline-flex; align-items: center; gap: .25rem; margin-top: .25rem;
  font: 500 .65rem var(--body); color: var(--muted); float: right; margin-left: .65rem;
}
.dock-bubble .ticks { color: var(--accent, var(--green)); font-weight: 700; }
.file-card {
  display: flex; align-items: center; gap: .55rem; margin-top: .35rem;
  padding: .45rem .5rem; background: rgba(255,255,255,.7);
  border: 1px solid rgba(15,23,42,.06); border-radius: 8px; min-width: 180px;
  text-decoration: none; color: inherit; max-width: 240px;
}
.file-card:hover { background: rgba(255,255,255,.95); }
.file-card .ficon {
  width: 34px; height: 34px; border-radius: 8px; background: #fee2e2; color: #dc2626;
  display: grid; place-items: center; font: 800 .65rem var(--font);
}
.file-card .fname { font: 700 .78rem var(--font); }
.file-card .fmeta { font: 500 .68rem var(--body); color: var(--muted); }
.msg-image {
  display: block; margin: .2rem 0 .15rem; border-radius: 10px; overflow: hidden; max-width: 240px;
}
.msg-image img { display: block; max-width: 100%; max-height: 220px; object-fit: cover; }
.msg-text { margin: .05rem 0 .1rem; white-space: pre-wrap; word-break: break-word; }
.dock-empty { margin: auto; color: var(--muted); font: 500 .9rem var(--body); }
.dock-foot {
  flex: 0 0 auto; display: flex; align-items: center; gap: .35rem;
  padding: .55rem .6rem .65rem; background: #fff; border-top: 1px solid var(--line);
}
.dock-emoji, .dock-attach {
  width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent;
  color: var(--muted); display: grid; place-items: center; cursor: pointer;
}
.dock-emoji:hover, .dock-attach:hover { background: #f1f4f7; color: var(--text); }
.dock-input {
  flex: 1; min-width: 0; height: 36px; border: 1px solid var(--line); border-radius: 999px;
  padding: 0 .9rem; font: 500 .88rem var(--body); outline: none; background: #f7f8fa;
}
.dock-input:focus { border-color: #9bb8e8; background: #fff; box-shadow: 0 0 0 3px rgba(47,128,237,.15); }
.dock-send {
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: var(--accent, var(--green)); color: #fff; display: grid; place-items: center; cursor: pointer;
}
.dock-send:hover { filter: brightness(1.06); }
.dock-min {
  align-self: flex-end; height: 36px; padding: 0 1rem; border: 0;
  border-radius: 10px 10px 0 0; color: #fff; font: 700 .8rem var(--font); cursor: pointer;
}
.contacts-panel {
  min-height: 0; background: #fff; border-left: 1px solid var(--line);
  display: flex; flex-direction: column; padding: .85rem .75rem .75rem;
}
.cp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .65rem; }
.cp-head strong { font: 800 1rem var(--font); }
.cp-collapse {
  border: 0; background: transparent; color: var(--muted); width: 28px; height: 28px;
  border-radius: 6px; cursor: pointer; font-size: 1rem;
}
.cp-collapse:hover { background: #f1f4f7; }
.cp-search {
  display: flex; align-items: center; gap: .4rem; background: #f3f5f8;
  border: 1px solid transparent; border-radius: 10px; padding: 0 .65rem;
  height: 38px; color: var(--muted); margin-bottom: .55rem;
}
.cp-search:focus-within { background: #fff; border-color: #c9d6e5; }
.cp-search input {
  flex: 1; border: 0; background: transparent; outline: none;
  font: 500 .88rem var(--body); color: var(--text);
}
.cp-tabs { display: flex; gap: .15rem; border-bottom: 1px solid var(--line); margin-bottom: .35rem; }
.cp-tab {
  flex: 1; border: 0; background: transparent; padding: .55rem .2rem;
  font: 700 .8rem var(--font); color: var(--muted); cursor: pointer; position: relative;
}
.cp-tab.on { color: var(--blue); }
.cp-tab.on::after {
  content: ""; position: absolute; left: 18%; right: 18%; bottom: -1px;
  height: 2px; background: var(--blue);
}
.cp-list { flex: 1; min-height: 0; overflow: auto; padding-top: .25rem; }
.cp-row {
  width: 100%; display: grid; grid-template-columns: 40px 1fr auto; align-items: center;
  gap: .55rem; padding: .55rem .35rem; border: 0; background: transparent;
  border-radius: 10px; cursor: pointer; text-align: left; color: inherit;
}
.cp-row:hover { background: #f3f6f9; }
.cp-row .av-wrap { position: relative; width: 40px; height: 40px; }
.cp-row .av {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font: 700 .75rem var(--font);
}
.cp-row .dot {
  position: absolute; right: 0; bottom: 0; width: 10px; height: 10px;
  border-radius: 50%; background: #94a3b8; border: 2px solid #fff;
}
.cp-row .dot.on { background: #22c55e; }
.cp-row .nm { font: 700 .88rem var(--font); }
.cp-row .st { font: 500 .72rem var(--body); color: var(--muted); }
.cp-row .more {
  border: 0; background: transparent; color: #94a3b8; width: 28px; height: 28px;
  border-radius: 6px; cursor: pointer; font-size: 1.1rem;
}
.workspace.contacts-collapsed { grid-template-columns: 1fr 48px; }
.contacts-panel.collapsed .cp-search,
.contacts-panel.collapsed .cp-tabs,
.contacts-panel.collapsed .cp-list,
.contacts-panel.collapsed .cp-head strong { display: none; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(12px);
  background: #0f172a; color: #fff; padding: .65rem 1rem; border-radius: 10px;
  font: 600 .85rem var(--font); opacity: 0; pointer-events: none; transition: .2s ease; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.legacy-pane { display: none !important; }
.compact-win {
  position: fixed; z-index: 80; background: #fff; border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25); overflow: hidden; display: flex; flex-direction: column;
}
.compact-win.size-md {
  width: min(720px, 92vw); height: min(520px, 80vh); left: 50%; top: 50%; transform: translate(-50%, -50%);
}
.compact-win[hidden] { display: none !important; }
.compact-head {
  display: flex; align-items: center; gap: .5rem; padding: .5rem .75rem;
  background: var(--navy); color: #fff;
}
.compact-win iframe { flex: 1; border: 0; width: 100%; }
.size-btns .sz, .compact-acts button {
  border: 0; background: rgba(255,255,255,.12); color: #fff; border-radius: 6px;
  width: 28px; height: 28px; cursor: pointer;
}
.size-btns { display: flex; gap: .25rem; margin-left: auto; }
.compact-acts { display: flex; gap: .25rem; }
@media (max-width: 1100px) {
  .workspace { grid-template-columns: 1fr 240px; }
  .dock-win { min-width: 260px; }
  .nav-item span { display: none; }
  .nav-item { min-width: 48px; }
}
@media (max-width: 820px) {
  .workspace { grid-template-columns: 1fr; }
  .contacts-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 35;
    border: 0;
    padding: 0;
    background: rgba(15, 23, 42, 0.35);
  }
  body.rs-talk.contacts-open .contacts-backdrop { display: block; }
  .contacts-panel {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100% !important;
    z-index: 40;
    transform: translateX(0);
    transition: transform .2s ease;
    box-shadow: none;
    border-left: 0;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    background: #fff;
  }
  .contacts-panel:not(.open) {
    transform: translateX(105%);
    pointer-events: none;
  }
  .contacts-panel.open { transform: none; pointer-events: auto; }
  .main-nav { display: none; }
  .btn-contacts-mobile {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font: 800 .8rem var(--font);
    cursor: pointer;
  }
  .cp-list { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  .cp-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--muted);
    font: 600 .9rem var(--body);
  }
}
.btn-contacts-mobile { display: none; }
.contacts-backdrop { display: none; }


/* RS-CALL-OVERLAY — floats over chat; does not hide messaging */
.rs-call-overlay {
  position: fixed;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  left: auto;
  top: auto;
  width: min(360px, calc(100vw - 24px));
  z-index: 1200;
  background: rgba(11, 18, 32, 0.96);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  pointer-events: auto;
}
.rs-call-overlay.is-expanded {
  inset: 0;
  width: auto;
  border-radius: 0;
  right: 0;
  bottom: 0;
  left: 0;
  top: 0;
}
.rs-call-overlay.is-compact .rs-call-stage {
  display: none;
}
.rs-call-stage {
  flex: 1 1 auto;
  min-height: 140px;
  max-height: 220px;
  display: grid;
  place-items: center;
  position: relative;
  padding: 12px;
}
.rs-call-overlay.is-expanded .rs-call-stage {
  max-height: none;
  min-height: 0;
}
.rs-call-remote {
  width: min(100%, 420px);
  max-height: 220px;
  object-fit: cover;
  border-radius: 14px;
  background: #0f172a;
}
#rsCallRemoteAudio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.rs-call-local {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: min(28vw, 110px);
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: #111827;
  z-index: 2;
}
.rs-call-peer,
.rs-call-voice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.rs-call-av {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #0e7490;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
}
.rs-call-av.lg {
  width: 72px;
  height: 72px;
  font-size: 1.35rem;
}
.rs-call-dock {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 10px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(15, 23, 42, 0.96);
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}
.rs-call-btn {
  min-width: 64px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 0;
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  background: #1e293b;
  color: #f8fafc;
  cursor: pointer;
}
.rs-call-btn.danger {
  background: #dc2626;
}
.rs-call-hint {
  margin: 0;
  padding: 0 12px 10px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.75rem;
}
/* Keep chat usable while on a call */
body.rs-in-call .app-shell {
  visibility: visible;
  padding-bottom: calc(168px + env(safe-area-inset-bottom, 0px));
}
body.rs-in-call .rs-call-overlay.is-expanded ~ .app-shell,
body.rs-in-call:has(.rs-call-overlay.is-expanded) .app-shell {
  /* expanded call still allows chat underneath when user collapses */
  visibility: visible;
}
@media (max-width: 820px) {
  .dock {
    padding: 8px;
    gap: 8px;
  }
  .dock-win {
    position: fixed !important;
    inset: 56px 0 0 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    border-radius: 0 !important;
    z-index: 30;
  }
  body.rs-in-call .dock-win {
    bottom: calc(150px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .dock-feed {
    max-height: none;
    flex: 1 1 auto;
  }
  .rs-call-overlay {
    left: 8px;
    right: 8px;
    width: auto;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .rs-call-local {
    width: min(36vw, 120px);
    right: 8px;
    bottom: 8px;
  }
  .topnav {
    padding-right: 8px;
  }
}

/* Direct message people picker */
.dm-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  place-items: center;
  padding: 1rem;
}
.dm-picker {
  width: min(420px, 100%);
  max-height: min(72vh, 560px);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dm-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  font: 700 1rem "Plus Jakarta Sans", system-ui, sans-serif;
  color: #111827;
}
.dm-picker-close {
  border: 0;
  background: transparent;
  font-size: 1.1rem;
  cursor: pointer;
  color: #64748b;
  line-height: 1;
  padding: 0.2rem 0.35rem;
}
.dm-picker-search {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid #eef2f7;
}
.dm-picker-search input {
  width: 100%;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font: 500 0.9rem inherit;
}
.dm-picker-list {
  overflow: auto;
  padding: 0.35rem;
  flex: 1;
}
.dm-picker-empty {
  color: #64748b;
  padding: 1.25rem;
  text-align: center;
  font-size: 0.9rem;
}
.dm-picker-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.dm-picker-row:hover {
  background: #f1f5f9;
}
.dm-picker-row .av-wrap {
  position: relative;
  flex: 0 0 auto;
}
.dm-picker-row .av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}
.dm-picker-row .dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #94a3b8;
  border: 2px solid #fff;
}
.dm-picker-row .dot.on {
  background: #22c55e;
}
.dm-picker-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.dm-picker-meta .nm {
  font-weight: 700;
  font-size: 0.92rem;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dm-picker-meta .st {
  font-size: 0.78rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Incoming call banner */
.incoming-call {
  position: fixed;
  left: 50%;
  top: 1rem;
  transform: translateX(-50%);
  z-index: 90;
  width: min(420px, calc(100% - 1.5rem));
}
.incoming-call-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #111827;
  color: #fff;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.35);
}
.incoming-call-card .av {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  flex: 0 0 auto;
}
.incoming-call-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.incoming-call-meta strong {
  font-size: 0.98rem;
}
.incoming-call-meta span {
  font-size: 0.8rem;
  opacity: 0.85;
}
.incoming-accept,
.incoming-decline {
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-weight: 700;
  cursor: pointer;
  font: inherit;
}
.incoming-accept { background: #22c55e; color: #052e16; }
.incoming-decline { background: #ef4444; color: #fff; }


/* === webmail theme lock (20260908chat1) === */
body.rs-talk {
  font-family: var(--body) !important;
  background: var(--bg) !important;
  color: var(--text) !important;
}
.app-shell {
  gap: 0;
  padding: 12px;
  box-sizing: border-box;
  background: var(--bg);
  grid-template-rows: auto auto 1fr !important;
}
.topnav {
  background: var(--pane) !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
  overflow: hidden;
  min-height: 56px;
}
.topnav .brand,
.topnav .brand-text,
.topnav .nav-item,
.topnav .util {
  color: var(--text) !important;
}
.nav-item {
  color: var(--muted) !important;
  opacity: 1 !important;
}
.nav-item:hover {
  color: var(--text) !important;
  background: var(--bg) !important;
}
.nav-item.on {
  color: var(--text) !important;
}
.nav-item.on::after {
  background: var(--gold) !important;
}
.util:hover {
  background: var(--bg) !important;
}
.util .badge {
  background: var(--gold) !important;
  color: #111827 !important;
}
.red-slash { display: none !important; }
.me-av {
  background: #111827 !important;
  color: #fff !important;
}
.toolbar {
  background: var(--pane) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
  margin-top: 12px;
  color: var(--text) !important;
}
.btn-new,
.btn.primary,
button.btn-new {
  background: var(--gold) !important;
  color: #111827 !important;
  border: 0 !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 700 !important;
}
.workspace,
.chat-dock,
.contacts-rail,
.thread,
.pane,
.panel,
.side-rail,
.chat-list,
.message-pane {
  background: var(--pane) !important;
  border-color: var(--line) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow);
}
.composer,
.msg-input,
input, textarea, select {
  font-family: var(--font) !important;
  border-color: var(--line) !important;
  border-radius: var(--radius-sm) !important;
}
.bubble.me,
.msg.me .bubble,
.mine {
  background: #111827 !important;
  color: #fff !important;
}
.bubble.them,
.msg.them .bubble {
  background: var(--bg) !important;
  color: var(--text) !important;
}
.muted, .meta, .time {
  color: var(--muted) !important;
}
