/* ═══════════════════════════════════════════════════════════════════════════
   Central V — DM Drawer v1
   Navbar zarf ikonuna bağlı global mesajlaşma paneli.
   Desktop: sağdan açılan drawer · Mobil: tam ekran overlay.
   Tema: style.css / premium.css monochrome diliyle birebir uyumlu.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --dm-bg: rgba(6,6,6,.97);
  --dm-line: rgba(255,255,255,.12);
  --dm-line-h: rgba(255,255,255,.28);
  --dm-muted: rgba(255,255,255,.55);
  --dm-soft: rgba(255,255,255,.045);
  --dm-ease: cubic-bezier(.2,.8,.2,1);
}

.dm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  background: rgba(0,0,0,.56);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.dm-overlay.open { display: block; animation: dmFade .2s ease; }
@keyframes dmFade { from { opacity: 0; } to { opacity: 1; } }

.dm-drawer {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(440px, 100vw);
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(160deg, rgba(255,255,255,.05), transparent 36%),
    var(--dm-bg);
  border-left: 1px solid var(--dm-line);
  box-shadow: -30px 0 90px rgba(0,0,0,.66);
  animation: dmSlideIn .26s var(--dm-ease);
  overflow: hidden;
}
@keyframes dmSlideIn {
  from { transform: translateX(46px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ── Header ─────────────────────────────────────────── */
.dm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 13px;
  border-bottom: 1px solid rgba(255,255,255,.09);
  background: rgba(0,0,0,.3);
  flex-shrink: 0;
}
.dm-head-kicker {
  display: block;
  margin-bottom: 2px;
  color: rgba(255,255,255,.42);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.dm-head-title {
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  font-size: .94rem;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
}
.dm-head-actions { display: flex; gap: 8px; flex-shrink: 0; }
.dm-icon-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.82);
  background: var(--dm-soft);
  border: 1px solid var(--dm-line);
  border-radius: 8px;
  font-size: .86rem;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.dm-icon-btn:hover {
  color: #fff;
  background: rgba(255,255,255,.12);
  border-color: var(--dm-line-h);
  transform: translateY(-1px);
}
.dm-icon-btn.danger:hover {
  color: #ff8d97;
  background: rgba(230,57,70,.16);
  border-color: rgba(230,57,70,.4);
}

/* ── Tabs ───────────────────────────────────────────── */
.dm-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.015);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.dm-tabs::-webkit-scrollbar { display: none; }
.dm-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 12px;
  color: var(--dm-muted);
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  font-family: 'Rajdhani', sans-serif;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}
.dm-tab:hover { color: #fff; background: rgba(255,255,255,.07); }
.dm-tab.active {
  color: #fff;
  background: rgba(255,255,255,.13);
  border-color: rgba(255,255,255,.3);
}
.dm-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  background: var(--error, #e63946);
  color: #fff;
  border-radius: 999px;
  font-size: .62rem;
  line-height: 1;
}

/* ── Search ─────────────────────────────────────────── */
.dm-search-wrap { padding: 10px 12px 0; flex-shrink: 0; }
.dm-search-input {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  color: #fff;
  background: rgba(0,0,0,.4);
  border: 1px solid var(--dm-line);
  border-radius: 8px;
  outline: none;
  font-family: 'Rajdhani', sans-serif;
  font-size: .9rem;
  font-weight: 600;
  transition: border-color .2s, background .2s;
}
.dm-search-input:focus { border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.05); }
.dm-search-input::placeholder { color: rgba(255,255,255,.3); }

/* ── List ───────────────────────────────────────────── */
.dm-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px 16px;
}
.dm-list::-webkit-scrollbar { width: 8px; }
.dm-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 8px; }

.dm-section-label {
  padding: 12px 4px 7px;
  color: rgba(255,255,255,.5);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.dm-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 62px;
  margin-bottom: 7px;
  padding: 10px;
  background: rgba(255,255,255,.022);
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 9px;
  cursor: pointer;
  position: relative;
  transition: background .2s, border-color .2s, transform .2s;
}
.dm-row:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.14);
  transform: translateY(-1px);
}
.dm-row.static { cursor: default; }
.dm-row.static:hover { transform: none; }
.dm-row.request-sent {
  border-color: rgba(46,213,115,.4);
  background: rgba(46,213,115,.06);
}
.dm-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #111;
  border: 1.5px solid rgba(255,255,255,.12);
  flex-shrink: 0;
}
.dm-row-info { flex: 1; min-width: 0; }
.dm-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.dm-row-name {
  color: #fff;
  font-weight: 700;
  font-size: .92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dm-row-time { color: var(--dm-muted); font-size: .72rem; flex-shrink: 0; }
.dm-row-note {
  display: block;
  margin-top: 2px;
  color: var(--dm-muted);
  font-size: .78rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dm-unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 6px;
  background: #fff;
  color: #000;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(255,255,255,.22);
}
.dm-row-actions { display: flex; gap: 6px; flex-shrink: 0; }
.dm-row-actions .dm-icon-btn { width: 32px; height: 32px; font-size: .78rem; }
.dm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(46,213,115,.4);
  color: var(--success, #2ed573);
  background: rgba(46,213,115,.09);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  white-space: nowrap;
}
.dm-chip.warning {
  border-color: rgba(255,170,0,.35);
  color: var(--warning, #ffaa00);
  background: rgba(255,170,0,.08);
}

/* ── Empty / loading states ─────────────────────────── */
.dm-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 44px 24px;
  text-align: center;
  color: var(--dm-muted);
  animation: dmFade .25s ease;
}
.dm-empty-icon {
  width: 58px; height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  color: rgba(255,255,255,.6);
  background: var(--dm-soft);
  border: 1px solid var(--dm-line);
  border-radius: 16px;
  font-size: 1.4rem;
  transform: rotate(-6deg);
}
.dm-empty h4 {
  margin: 0;
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  font-size: .86rem;
  letter-spacing: .8px;
  text-transform: uppercase;
}
.dm-empty p { margin: 0; font-size: .86rem; line-height: 1.45; max-width: 300px; }
.dm-loading {
  display: flex;
  justify-content: center;
  padding: 36px;
  color: var(--dm-muted);
}

/* ── Chat view ──────────────────────────────────────── */
.dm-chat {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  background:
    linear-gradient(135deg, rgba(255,255,255,.03), transparent 36%),
    var(--dm-bg);
}
.dm-chat.open { display: flex; animation: dmSlideIn .22s var(--dm-ease); }
.dm-chat-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255,255,255,.09);
  background: rgba(0,0,0,.32);
  flex-shrink: 0;
}
.dm-chat-head .dm-avatar { width: 36px; height: 36px; }
.dm-chat-name {
  flex: 1;
  min-width: 0;
  color: #fff;
  font-weight: 700;
  font-size: .96rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dm-msgs {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 16px;
}
.dm-msgs::-webkit-scrollbar { width: 8px; }
.dm-msgs::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 8px; }
.dm-bubble-wrap { display: flex; flex-direction: column; max-width: 82%; }
.dm-bubble-wrap.sent { align-self: flex-end; align-items: flex-end; }
.dm-bubble-wrap.received { align-self: flex-start; align-items: flex-start; }
.dm-bubble {
  padding: 9px 13px;
  border-radius: 9px;
  font-size: .92rem;
  line-height: 1.45;
  word-break: break-word;
}
.dm-bubble-wrap.sent .dm-bubble {
  background: rgba(255,255,255,.92);
  color: #050505;
  border: 1px solid rgba(255,255,255,.3);
  border-bottom-right-radius: 3px;
}
.dm-bubble-wrap.received .dm-bubble {
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.94);
  border: 1px solid rgba(255,255,255,.11);
  border-bottom-left-radius: 3px;
}
.dm-bubble-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: var(--dm-muted);
  font-size: .68rem;
}
.dm-report-btn {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--dm-muted);
  font-size: .66rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s, color .2s;
}
.dm-bubble-wrap:hover .dm-report-btn { opacity: 1; }
.dm-report-btn:hover { color: #ff8d97; }

.dm-input-area {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,.09);
  background: rgba(0,0,0,.34);
  flex-shrink: 0;
}
.dm-textarea {
  flex: 1;
  height: 42px;
  max-height: 110px;
  padding: 10px 13px;
  color: #fff;
  background: rgba(0,0,0,.42);
  border: 1px solid var(--dm-line);
  border-radius: 8px;
  outline: none;
  resize: none;
  font-family: 'Rajdhani', sans-serif;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.4;
  transition: border-color .2s;
}
.dm-textarea:focus { border-color: rgba(255,255,255,.35); }
.dm-textarea::placeholder { color: rgba(255,255,255,.3); }
.dm-send-btn {
  width: 42px; height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fff 0%, #d8d8d8 60%, #fff 100%);
  color: #050505;
  border: 0;
  border-radius: 8px;
  font-size: .96rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .2s, box-shadow .2s;
}
.dm-send-btn:hover { transform: translateY(-1px); box-shadow: 0 0 18px rgba(255,255,255,.25); }
.dm-send-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.dm-privacy {
  padding: 8px 16px;
  color: rgba(255,255,255,.38);
  background: rgba(0,0,0,.5);
  border-top: 1px solid rgba(255,255,255,.04);
  font-size: .7rem;
  line-height: 1.4;
  text-align: center;
  flex-shrink: 0;
}

/* ── Footer (drawer ana görünüm) ────────────────────── */
.dm-foot {
  padding: 9px 14px;
  border-top: 1px solid rgba(255,255,255,.07);
  background: rgba(0,0,0,.32);
  flex-shrink: 0;
}
.dm-foot a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--dm-muted);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .2s;
}
.dm-foot a:hover { color: #fff; }

/* ── Loading butonu / mikro animasyonlar ────────────── */
.dm-icon-btn.is-loading i,
.dm-chip.is-loading i { animation: spin 1s linear infinite; }
@keyframes dmRowPulse {
  0% { box-shadow: 0 0 0 rgba(46,213,115,0); }
  45% { box-shadow: 0 0 22px rgba(46,213,115,.26); }
  100% { box-shadow: 0 0 0 rgba(46,213,115,0); }
}
.dm-row.request-pulse { animation: dmRowPulse 1.1s ease; }

/* ── Mobil ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .dm-drawer { width: 100vw; border-left: 0; }
  .dm-overlay { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .dm-bubble-wrap { max-width: 88%; }
}

@media (prefers-reduced-motion: reduce) {
  .dm-drawer, .dm-chat.open, .dm-overlay.open, .dm-row.request-pulse { animation: none !important; }
}
