/* =========================================================
   H-CHAT V9 — ANA SOHBET ÇALIŞMA ALANI
   Modern menülerle aynı açık, kartlı ve katmanlı tasarım dili.
========================================================= */

#main.hc-chat-modern {
  --hc-workspace-accent: var(--primary, #2563eb);
  --hc-workspace-accent-rgb: 37, 99, 235;
  --hc-workspace-panel: rgba(255, 255, 255, .94);
  --hc-workspace-soft: rgba(241, 245, 249, .82);
  --hc-workspace-line: rgba(148, 163, 184, .26);
  --hc-workspace-ink: var(--text, #172033);
  --hc-workspace-muted: var(--muted, #6b7280);
  background:
    radial-gradient(circle at 8% 0%, rgba(var(--hc-workspace-accent-rgb), .08), transparent 28%),
    linear-gradient(180deg, #f6f8fc 0%, #edf2f8 100%);
}

#main.hc-chat-modern .app-grid {
  gap: 12px !important;
  padding: 12px !important;
}

#main.hc-chat-modern .chat-card,
#main.hc-chat-modern #userlist-sidebar,
#main.hc-chat-modern #channel-sidebar {
  border: 1px solid var(--hc-workspace-line) !important;
  background: var(--hc-workspace-panel) !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .09) !important;
  backdrop-filter: blur(14px);
}

#main.hc-chat-modern .chat-card {
  border-radius: 24px !important;
  overflow: hidden !important;
  isolation: isolate;
}

/* ===== Sohbet başlığı ===== */
.hc-chat-stage-head {
  position: relative;
  z-index: 5;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--hc-workspace-line);
  background:
    radial-gradient(circle at 92% 5%, rgba(var(--hc-workspace-accent-rgb), .12), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.94));
}

.hc-chat-stage-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  font-size: 19px;
  background: linear-gradient(145deg, var(--hc-workspace-accent), #60a5fa);
  box-shadow: 0 10px 24px rgba(var(--hc-workspace-accent-rgb), .25);
}

.hc-chat-stage-icon.is-private {
  background: linear-gradient(145deg, #7c3aed, #a78bfa);
  box-shadow: 0 10px 24px rgba(124, 58, 237, .23);
}

.hc-chat-stage-icon.is-status {
  background: linear-gradient(145deg, #0891b2, #22d3ee);
  box-shadow: 0 10px 24px rgba(8, 145, 178, .22);
}

.hc-chat-stage-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hc-chat-stage-kicker {
  color: var(--hc-workspace-muted);
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.hc-chat-stage-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

#hc-chat-stage-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--hc-workspace-ink);
  font: 800 18px/1.25 "Plus Jakarta Sans", "Inter", sans-serif;
}

#hc-chat-stage-subtitle {
  display: block;
  max-width: 680px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--hc-workspace-muted);
  font-size: 12px;
  font-weight: 550;
}

.hc-chat-live-pill,
.hc-chat-stage-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 25px;
  padding: 4px 9px;
  border: 1px solid rgba(var(--hc-workspace-accent-rgb), .18);
  border-radius: 999px;
  background: rgba(var(--hc-workspace-accent-rgb), .08);
  color: var(--hc-workspace-accent);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.hc-chat-live-pill > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,.12);
}

.hc-chat-stage-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hc-chat-stage-action {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--hc-workspace-line);
  border-radius: 13px;
  background: rgba(255,255,255,.82);
  color: #475569;
  box-shadow: 0 5px 14px rgba(15,23,42,.06);
  transition: transform .16s ease, background .16s ease, color .16s ease, border-color .16s ease;
}

.hc-chat-stage-action:hover {
  transform: translateY(-1px);
  color: var(--hc-workspace-accent);
  border-color: rgba(var(--hc-workspace-accent-rgb), .25);
  background: rgba(var(--hc-workspace-accent-rgb), .07);
}

/* PM başlığı artık sahne başlığının altında ikinci büyük şerit oluşturmasın. */
#main.hc-chat-modern #private-user-info {
  min-height: 0;
  padding: 7px 16px !important;
  border-bottom: 1px solid var(--hc-workspace-line) !important;
  background: rgba(124,58,237,.045) !important;
  color: #6d28d9;
}

/* ===== Mesaj sahnesi ===== */
#main.hc-chat-modern #messages {
  position: relative;
  opacity: 1 !important;
  gap: 4px !important;
  padding: 16px 18px 20px !important;
  padding-right: 18px !important;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(var(--hc-workspace-accent-rgb), .075) 1px, transparent 1.2px),
    linear-gradient(180deg, rgba(248,250,252,.90), rgba(255,255,255,.98)) !important;
  background-position: 0 0, 0 0 !important;
  background-size: 24px 24px, cover !important;
  background-repeat: repeat, no-repeat !important;
  scrollbar-gutter: stable;
}

#main.hc-chat-modern #messages::-webkit-scrollbar,
#main.hc-chat-modern #userlist::-webkit-scrollbar,
#main.hc-chat-modern #tabs::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

#main.hc-chat-modern #messages::-webkit-scrollbar-thumb,
#main.hc-chat-modern #userlist::-webkit-scrollbar-thumb,
#main.hc-chat-modern #tabs::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(100,116,139,.34);
  background-clip: padding-box;
}

#main.hc-chat-modern #messages:not(.pm-bubbles) .msg-row-container {
  width: 100%;
  min-height: 31px;
  padding: 6px 10px !important;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

#main.hc-chat-modern #messages:not(.pm-bubbles) .msg-row-container:hover {
  z-index: 2;
  transform: translateX(2px);
  border-color: rgba(var(--hc-workspace-accent-rgb), .10);
  background: rgba(255,255,255,.76);
  box-shadow: 0 6px 18px rgba(15,23,42,.045);
}

#main.hc-chat-modern #messages .msg-time {
  margin-right: 5px;
  color: #94a3b8 !important;
  font-size: 10px !important;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

#main.hc-chat-modern #messages .sep {
  color: rgba(var(--hc-workspace-accent-rgb), .62) !important;
  font-weight: 900;
}

#main.hc-chat-modern #messages .nick,
#main.hc-chat-modern #messages .nick-colored {
  font-weight: 800;
}

#main.hc-chat-modern #messages img.nick-mini-avatar,
#main.hc-chat-modern #messages .nick-avatar img,
#main.hc-chat-modern #messages .avatar-img {
  border: 2px solid rgba(255,255,255,.96);
  box-shadow: 0 0 0 1px rgba(var(--hc-workspace-accent-rgb), .17), 0 4px 10px rgba(15,23,42,.08);
}

#main.hc-chat-modern #messages .hc-welcome-card,
#main.hc-chat-modern #messages .message-line.topic,
#main.hc-chat-modern #messages .log-entry {
  border-radius: 16px !important;
  border-color: rgba(var(--hc-workspace-accent-rgb), .15) !important;
  box-shadow: 0 10px 28px rgba(15,23,42,.06);
}

/* Özel mesaj balonları */
#main.hc-chat-modern #messages.pm-bubbles {
  gap: 8px !important;
}

#main.hc-chat-modern #messages.pm-bubbles .msg-row .bubble {
  border-radius: 17px !important;
  box-shadow: 0 8px 18px rgba(15,23,42,.07);
}

/* ===== Hızlı araçlar + mesaj yazma alanı ===== */
#main.hc-chat-modern .chat-toolbar {
  min-height: 51px;
  margin: 10px 12px 6px;
  padding: 7px 8px !important;
  gap: 7px !important;
  border: 1px solid var(--hc-workspace-line) !important;
  border-radius: 16px !important;
  background: rgba(248,250,252,.90) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

#main.hc-chat-modern .chat-toolbar .icon-btn,
#main.hc-chat-modern .inputbar > .icon-btn,
#main.hc-chat-modern #main-plus-btn {
  width: 38px !important;
  height: 38px !important;
  border-radius: 13px !important;
  border: 1px solid var(--hc-workspace-line) !important;
  background: rgba(255,255,255,.90) !important;
  color: #475569 !important;
  box-shadow: 0 4px 12px rgba(15,23,42,.055) !important;
  backdrop-filter: none !important;
}

#main.hc-chat-modern .chat-toolbar .icon-btn:hover,
#main.hc-chat-modern .inputbar > .icon-btn:hover,
#main.hc-chat-modern #main-plus-btn:hover {
  color: var(--hc-workspace-accent) !important;
  border-color: rgba(var(--hc-workspace-accent-rgb), .26) !important;
  background: rgba(var(--hc-workspace-accent-rgb), .07) !important;
  transform: translateY(-1px);
}

#main.hc-chat-modern .chat-toolbar .icon-btn.active,
#main.hc-chat-modern #main-plus-btn.active {
  color: #fff !important;
  border-color: transparent !important;
  background: linear-gradient(145deg, var(--hc-workspace-accent), #60a5fa) !important;
}

#main.hc-chat-modern #away-toggle-btn.away-btn-modern {
  min-height: 38px;
  margin-left: auto;
  padding: 7px 13px !important;
  border-radius: 13px !important;
  background: rgba(var(--hc-workspace-accent-rgb), .07) !important;
  border-color: rgba(var(--hc-workspace-accent-rgb), .17) !important;
}

#main.hc-chat-modern .inputbar {
  position: relative !important;
  z-index: 10;
  min-height: 64px !important;
  margin: 0 12px 12px;
  padding: 9px 10px !important;
  gap: 8px !important;
  border: 1px solid var(--hc-workspace-line) !important;
  border-radius: 18px !important;
  background: rgba(255,255,255,.96) !important;
  box-shadow: 0 12px 30px rgba(15,23,42,.10) !important;
}

#main.hc-chat-modern .inputbar #input {
  height: 44px;
  min-width: 0;
  padding: 0 15px !important;
  border: 1px solid transparent !important;
  border-radius: 14px !important;
  outline: none;
  background: #f1f5f9 !important;
  color: var(--hc-workspace-ink) !important;
  box-shadow: inset 0 1px 2px rgba(15,23,42,.035);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

#main.hc-chat-modern .inputbar #input:focus {
  border-color: rgba(var(--hc-workspace-accent-rgb), .35) !important;
  background: #fff !important;
  box-shadow: 0 0 0 4px rgba(var(--hc-workspace-accent-rgb), .10) !important;
}

#main.hc-chat-modern #send-button {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-grid;
  place-items: center;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: linear-gradient(145deg, var(--hc-workspace-accent), #3b82f6) !important;
  box-shadow: 0 10px 22px rgba(var(--hc-workspace-accent-rgb), .28) !important;
}

#main.hc-chat-modern #send-button:hover {
  transform: translateY(-1px);
  filter: none !important;
  box-shadow: 0 13px 27px rgba(var(--hc-workspace-accent-rgb), .34) !important;
}

#main.hc-chat-modern .plus-dropdown-content {
  min-width: 56px;
  padding: 9px !important;
  border: 1px solid var(--hc-workspace-line) !important;
  border-radius: 17px !important;
  background: rgba(255,255,255,.97) !important;
  box-shadow: 0 18px 42px rgba(15,23,42,.16) !important;
  backdrop-filter: blur(14px);
}

/* ===== Sağ paneller ===== */
#main.hc-chat-modern #userlist-sidebar,
#main.hc-chat-modern #channel-sidebar {
  border-radius: 22px !important;
  overflow: hidden !important;
}

#main.hc-chat-modern .hc-sidebar-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  padding: 13px !important;
  border-bottom: 1px solid var(--hc-workspace-line) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--hc-workspace-accent-rgb), .10), transparent 44%),
    rgba(255,255,255,.96) !important;
}

.hc-sidebar-heading {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
  color: var(--hc-workspace-ink);
  font: 800 13px/1.2 "Plus Jakarta Sans", "Inter", sans-serif;
}

.hc-sidebar-heading-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--hc-workspace-accent);
  background: rgba(var(--hc-workspace-accent-rgb), .09);
}

.hc-sidebar-heading small {
  color: var(--hc-workspace-muted);
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.hc-sidebar-search {
  position: relative;
}

.hc-sidebar-search > i {
  position: absolute;
  left: 12px;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 12px;
}

#main.hc-chat-modern #user-search {
  height: 38px;
  padding: 0 12px 0 34px !important;
  border: 1px solid var(--hc-workspace-line) !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  box-shadow: none !important;
}

#main.hc-chat-modern #user-search:focus {
  border-color: rgba(var(--hc-workspace-accent-rgb), .32) !important;
  box-shadow: 0 0 0 3px rgba(var(--hc-workspace-accent-rgb), .09) !important;
}

#main.hc-chat-modern #userlist {
  padding: 8px !important;
  overflow-y: auto !important;
}

#main.hc-chat-modern #userlist li.ul-item,
#main.hc-chat-modern #userlist li {
  min-height: 47px;
  margin: 2px 0;
  padding: 5px 7px !important;
  border: 1px solid transparent;
  border-radius: 13px !important;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

#main.hc-chat-modern #userlist li:hover {
  transform: translateX(2px) !important;
  border-color: rgba(var(--hc-workspace-accent-rgb), .11);
  background: rgba(var(--hc-workspace-accent-rgb), .055) !important;
  box-shadow: 0 5px 16px rgba(15,23,42,.045);
  filter: none !important;
}

#main.hc-chat-modern #userlist .ul-avatar-wrap {
  box-shadow: 0 0 0 2px rgba(255,255,255,.96), 0 0 0 3px rgba(var(--hc-workspace-accent-rgb), .13);
}

#main.hc-chat-modern #channel-sidebar #tabs {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
  padding: 8px !important;
  gap: 5px !important;
  border: 0 !important;
  background: transparent !important;
  overflow-y: auto !important;
}

#main.hc-chat-modern #channel-sidebar #tabs button {
  width: 100% !important;
  min-height: 30px;
  justify-content: flex-start !important;
  padding: 7px 10px !important;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
  background: transparent !important;
  box-shadow: none !important;
  font-weight: 700 !important;
}

#main.hc-chat-modern #channel-sidebar #tabs button:hover {
  color: var(--hc-workspace-accent) !important;
  border-color: rgba(var(--hc-workspace-accent-rgb), .10) !important;
  background: rgba(var(--hc-workspace-accent-rgb), .055) !important;
}

#main.hc-chat-modern #channel-sidebar #tabs button.active,
#main.hc-chat-modern #channel-sidebar #tabs button[aria-selected="true"] {
  color: #fff !important;
  border-color: transparent !important;
  background: linear-gradient(135deg, var(--hc-workspace-accent), #3b82f6) !important;
  box-shadow: 0 9px 22px rgba(var(--hc-workspace-accent-rgb), .23) !important;
}

/* Mobil üst switcher */
#main.hc-chat-modern .mobile-top-switcher {
  margin: 8px 8px 0;
  padding: 4px !important;
  border: 1px solid var(--hc-workspace-line) !important;
  border-radius: 15px !important;
  background: rgba(241,245,249,.90) !important;
}

#main.hc-chat-modern .mobile-top-switcher .mts-btn {
  border-radius: 11px !important;
}

/* ===== Dark tema ===== */
body.dark #main.hc-chat-modern {
  --hc-workspace-panel: rgba(15, 23, 42, .95);
  --hc-workspace-soft: rgba(30, 41, 59, .78);
  --hc-workspace-line: rgba(148, 163, 184, .15);
  --hc-workspace-ink: #f1f5f9;
  --hc-workspace-muted: #94a3b8;
  background:
    radial-gradient(circle at 8% 0%, rgba(59,130,246,.15), transparent 30%),
    linear-gradient(180deg, #07101f, #020617);
}

body.dark #main.hc-chat-modern .hc-chat-stage-head,
body.dark #main.hc-chat-modern .hc-sidebar-head {
  background:
    radial-gradient(circle at 92% 0%, rgba(59,130,246,.14), transparent 38%),
    rgba(15,23,42,.97) !important;
}

body.dark #main.hc-chat-modern #messages {
  background-image:
    radial-gradient(circle at 1px 1px, rgba(148,163,184,.085) 1px, transparent 1.2px),
    linear-gradient(180deg, #0b1220, #070d18) !important;
}

body.dark #main.hc-chat-modern #messages:not(.pm-bubbles) .msg-row-container:hover {
  border-color: rgba(96,165,250,.12);
  background: rgba(30,41,59,.62);
}

body.dark #main.hc-chat-modern .chat-toolbar,
body.dark #main.hc-chat-modern .inputbar,
body.dark #main.hc-chat-modern .hc-chat-stage-action,
body.dark #main.hc-chat-modern .chat-toolbar .icon-btn,
body.dark #main.hc-chat-modern .inputbar > .icon-btn,
body.dark #main.hc-chat-modern #main-plus-btn {
  background: rgba(15,23,42,.94) !important;
  color: #cbd5e1 !important;
}

body.dark #main.hc-chat-modern .inputbar #input,
body.dark #main.hc-chat-modern #user-search {
  background: #0b1220 !important;
  color: #f1f5f9 !important;
}

body.dark #main.hc-chat-modern .plus-dropdown-content {
  background: rgba(15,23,42,.98) !important;
}

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
  #main.hc-chat-modern .app-grid {
    gap: 0 !important;
    padding: 0 !important;
  }

  #main.hc-chat-modern .chat-card {
    border-radius: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    box-shadow: none !important;
  }

  .hc-chat-stage-head {
    min-height: 64px;
    padding: 9px 11px;
  }

  .hc-chat-stage-icon {
    width: 41px;
    height: 41px;
    flex-basis: 41px;
    border-radius: 13px;
  }

  #hc-chat-stage-title {
    font-size: 15px;
  }

  #hc-chat-stage-subtitle {
    max-width: 48vw;
    font-size: 10px;
  }

  .hc-chat-stage-count,
  #hc-chat-stage-menu {
    display: none !important;
  }

  #main.hc-chat-modern #messages {
    padding: 11px 10px 14px !important;
  }

  #main.hc-chat-modern .chat-toolbar {
    margin: 6px 7px 4px;
    padding: 5px 6px !important;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  #main.hc-chat-modern .chat-toolbar .icon-btn,
  #main.hc-chat-modern .inputbar > .icon-btn,
  #main.hc-chat-modern #main-plus-btn {
    width: 35px !important;
    height: 35px !important;
    flex: 0 0 35px;
    border-radius: 12px !important;
  }

  #main.hc-chat-modern #away-toggle-btn.away-btn-modern {
    min-width: 35px;
    min-height: 35px;
    padding: 7px 10px !important;
  }

  #main.hc-chat-modern .inputbar {
    min-height: 58px !important;
    margin: 0 7px 7px;
    padding: 7px !important;
    border-radius: 16px !important;
  }

  #main.hc-chat-modern .inputbar #input {
    height: 42px;
  }

  #main.hc-chat-modern #send-button {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }
}

@media (max-width: 520px) {
  .hc-chat-live-pill,
  #hc-chat-stage-users {
    display: none !important;
  }

  #hc-chat-stage-subtitle {
    max-width: 58vw;
  }

  #main.hc-chat-modern #messages:not(.pm-bubbles) .msg-row-container {
    padding: 5px 7px !important;
  }

  #main.hc-chat-modern #away-toggle-btn .away-btn-content span {
    display: none;
  }
}

/* =========================================================
   H-CHAT V10 — SOHBETLER/KANAL LİSTESİ HİZALAMA DÜZELTMESİ
   Sol rozet kanal adının üzerine binmesin; metin ve kapatma
   düğmesi kendi güvenli alanlarında kalsın.
========================================================= */
#main.hc-chat-modern #channel-sidebar #tabs button {
  position: relative;
  min-width: 0;
  padding: 7px 34px 7px 44px !important;
  overflow: hidden !important;
}

#main.hc-chat-modern #channel-sidebar #tabs button::before {
  left: 9px !important;
  width: 27px !important;
  height: 27px !important;
  z-index: 1;
  pointer-events: none;
}

#main.hc-chat-modern #channel-sidebar #tabs button > span:not(.close-tab-button) {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

#main.hc-chat-modern #channel-sidebar #tabs button .close-tab-button {
  position: absolute;
  top: 50%;
  right: 8px;
  z-index: 3;
  width: 20px;
  height: 20px;
  margin: 0 !important;
  padding: 0 !important;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 7px;
  line-height: 1;
}

#main.hc-chat-modern #channel-sidebar #tabs button .close-tab-button:hover {
  transform: translateY(-50%) scale(1.08) !important;
}

#main.hc-chat-modern #channel-sidebar #tabs button.active > span:not(.close-tab-button),
#main.hc-chat-modern #channel-sidebar #tabs button[aria-selected="true"] > span:not(.close-tab-button) {
  color: #fff !important;
}

#main.hc-chat-modern #channel-sidebar #tabs button.active .close-tab-button,
#main.hc-chat-modern #channel-sidebar #tabs button[aria-selected="true"] .close-tab-button {
  color: rgba(255, 255, 255, .82) !important;
}

@media (max-width: 991.98px) {
  #main.hc-chat-modern #channel-sidebar #tabs button {
    padding-left: 42px !important;
    padding-right: 32px !important;
  }
}


/* V12: Kanal konusu çalışma alanı başlığında */
.hc-chat-stage-topic{display:flex;align-items:center;gap:7px;min-width:0;max-width:760px;margin-top:3px;color:#334155;font-size:11px;font-weight:650;line-height:1.35}
.hc-chat-stage-topic[hidden]{display:none!important}
.hc-chat-stage-topic i{flex:0 0 auto;color:var(--hc-workspace-accent);font-size:10px}
#hc-chat-stage-topic-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#hc-chat-stage-topic-meta{flex:0 0 auto;color:var(--hc-workspace-muted);font-size:10px;font-weight:600}
@media(max-width:700px){.hc-chat-stage-topic{max-width:100%}#hc-chat-stage-topic-meta{display:none}}

/* =========================================================
   H-CHAT V22 — KANAL LİSTESİ SCROLL DÜZELTMESİ
   Panel başlığı sabit kalır, kanal satırları kendi alanında kayar.
========================================================= */
@media (min-width: 992px) {
  #main.hc-chat-modern #channel-sidebar {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow: hidden !important;
  }

  #main.hc-chat-modern #channel-sidebar .channel-head {
    flex: 0 0 auto !important;
  }

  #main.hc-chat-modern #channel-sidebar #tabs {
    display: flex !important;
    flex-flow: column nowrap !important;
    flex: 1 1 0 !important;
    min-height: 0 !important;
    max-height: 100% !important;
    width: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-width: thin;
    scrollbar-color: rgba(100,116,139,.42) transparent;
    scrollbar-gutter: stable;
  }

  #main.hc-chat-modern #channel-sidebar #tabs > button {
    flex: 0 0 auto !important;
  }
}

@media (max-width: 991.98px) {
  #main.hc-chat-modern #channel-sidebar {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  #main.hc-chat-modern #channel-sidebar #tabs {
    display: flex !important;
    flex-flow: row nowrap !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scrollbar-width: thin;
    scrollbar-gutter: stable;
  }

  #main.hc-chat-modern #channel-sidebar #tabs > button {
    flex: 0 0 auto !important;
  }
}
.hc-chat-stage-topic {
  width: 100%;
  max-width: none;
  align-items: flex-start;
}

#hc-chat-stage-topic-text {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}
/* =========================================================
   H-CHAT V26 — BİRLEŞİK SOHBET ÇALIŞMA ALANI
   Mesaj alanı, katılımcılar ve sohbetler tek dış gövde içinde
   görünür. İşlevler ve panel genişletme/kapatma davranışı korunur.
========================================================= */
@media (min-width: 992px) {
  #main.hc-chat-modern #app-grid {
    box-sizing: border-box;
    height: calc(100vh - var(--topbar-h) - 24px) !important;
    margin: 12px !important;
    padding: 0 !important;
    gap: 0 !important;
    overflow: hidden !important;
    isolation: isolate;
    border: 1px solid var(--hc-workspace-line) !important;
    border-radius: 24px !important;
    background: var(--hc-workspace-panel) !important;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .10) !important;
    backdrop-filter: blur(14px);
  }

  #main.hc-chat-modern #app-grid > .chat-card,
  #main.hc-chat-modern #app-grid > #userlist-sidebar,
  #main.hc-chat-modern #app-grid > #channel-sidebar {
    height: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  #main.hc-chat-modern #app-grid > .chat-card {
    overflow: hidden !important;
  }

  #main.hc-chat-modern #app-grid > #userlist-sidebar,
  #main.hc-chat-modern #app-grid > #channel-sidebar {
    overflow: hidden !important;
    border-left: 1px solid var(--hc-workspace-line) !important;
  }

  /* Paneller sola taşındığında iç ayraçların yönü de değişir. */
  body.hc-panels-left #main.hc-chat-modern #app-grid > #userlist-sidebar,
  body.hc-panels-left #main.hc-chat-modern #app-grid > #channel-sidebar {
    margin: 0 !important;
    border-left: 0 !important;
    border-right: 1px solid var(--hc-workspace-line) !important;
  }

  body.hc-panels-left #main.hc-chat-modern #app-grid > .chat-card {
    margin: 0 !important;
  }

  /* Panel kapanırken görünmeyen kolon ayraç bırakmasın. */
  body.hc-users-closed #main.hc-chat-modern #userlist-sidebar,
  body.hc-channels-closed #main.hc-chat-modern #channel-sidebar {
    border-left-width: 0 !important;
    border-right-width: 0 !important;
  }

  #main.hc-chat-modern #app-grid .hc-sidebar-head,
  #main.hc-chat-modern #app-grid .hc-chat-stage-head {
    box-shadow: none !important;
  }
}

body.dark #main.hc-chat-modern #app-grid {
  box-shadow: 0 22px 54px rgba(0, 0, 0, .42) !important;
}

/* Mobilde mevcut üst switcher ve açılır panel davranışı korunur. */
@media (max-width: 991.98px) {
  #main.hc-chat-modern #app-grid {
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
}
/* KLASİK MOD — CHAT MODERN RADIUS KESİN İPTAL */
@media (max-width: 991.98px) {

    body.mobile-layout-classic #main.hc-chat-modern,
    body.mobile-layout-classic #main.hc-chat-modern .topbar,
    body.mobile-layout-classic #main.hc-chat-modern .app-grid,
    body.mobile-layout-classic #main.hc-chat-modern .chat-card,

    body.mobile-layout-classic #main.hc-chat-modern #userlist-sidebar,
    body.mobile-layout-classic #main.hc-chat-modern #channel-sidebar,

    body.mobile-layout-classic #main.hc-chat-modern #userlist-sidebar .userlist-head,
    body.mobile-layout-classic #main.hc-chat-modern #userlist-sidebar .hc-sidebar-head,
    body.mobile-layout-classic #main.hc-chat-modern #user-search,

    body.mobile-layout-classic #main.hc-chat-modern #channel-sidebar #tabs,
    body.mobile-layout-classic #main.hc-chat-modern #channel-sidebar #tabs button,

    body.mobile-layout-classic #main.hc-chat-modern .inputbar,
    body.mobile-layout-classic #main.hc-chat-modern .inputbar #input,
    body.mobile-layout-classic #main.hc-chat-modern .inputbar #send-button,
    body.mobile-layout-classic #main.hc-chat-modern .inputbar .icon-btn,
    body.mobile-layout-classic #main.hc-chat-modern .inputbar .btn,

    body.mobile-layout-classic #main.hc-chat-modern .topbar .btn,
    body.mobile-layout-classic #main.hc-chat-modern .topbar .avatar-chip,
    body.mobile-layout-classic #main.hc-chat-modern .topbar .avatar-chip img,
    body.mobile-layout-classic #main.hc-chat-modern .topbar .theme-btn-img,
    body.mobile-layout-classic #main.hc-chat-modern .topbar #radio-toggle,
    body.mobile-layout-classic #main.hc-chat-modern .mobile-layout-toggle {

        border-radius: 0 !important;
        -webkit-border-radius: 0 !important;
        clip-path: none !important;
    }

    body.mobile-layout-classic #main.hc-chat-modern .app-grid > *,
    body.mobile-layout-classic #main.hc-chat-modern .app-grid > *::before,
    body.mobile-layout-classic #main.hc-chat-modern .app-grid > *::after {
        border-radius: 0 !important;
        -webkit-border-radius: 0 !important;
    }
}
/* Masaüstü kanal listesini daha ince yap */
@media (min-width: 992px) {

  #main.hc-chat-modern #channel-sidebar #tabs {
    gap: 2px !important;
    padding: 4px !important;
  }

  #main.hc-chat-modern #channel-sidebar #tabs button {
    min-height: 34px !important;
    height: 34px !important;
    padding: 3px 30px 3px 38px !important;
    margin: 0 !important;
    border-radius: 9px !important;
    font-size: 12px !important;
  }

  #main.hc-chat-modern #channel-sidebar #tabs button::before {
    width: 23px !important;
    height: 23px !important;
    left: 7px !important;
    font-size: 11px !important;
  }

  #main.hc-chat-modern #channel-sidebar #tabs button .close-tab-button {
    width: 18px !important;
    height: 18px !important;
    right: 6px !important;
  }
}
/* STATUS ekranında mesaj üzerine gelince çıkan beyaz şeridi kaldır */
#main.hc-chat-modern
#messages[data-current-tab="status"]:not(.pm-bubbles)
.msg-row-container:hover {
    transform: none !important;
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
}