/* Chat */

:root {
    --bg-primary:    #080A10;
    --bg-secondary:  #0D1017;
    --bg-tertiary:   #111520;
    --bg-surface:    #161B28;
    --bg-hover:      #1A2030;
    --bg-active:     #1E2638;
    --bg-floating:   #1E2233;
    --bg-input:      #0B0E16;
    --accent:        #06B6D4;
    --accent-hover:  #0891B2;
    --accent-soft:   rgba(6, 182, 212, 0.12);
    /* Secim tonu merdiveni (5100 paritesi): secili %9, secili+hover %14.
       `--accent-soft` (%12) baska bilesenlerce kullanildigi icin DEGISMEDI. */
    --accent-tint:       rgba(6, 182, 212, 0.09);
    --accent-tint-hover: rgba(6, 182, 212, 0.14);
    /* Secim tiki (5100 varligi): yuvarlak uclu polyline. Maske olarak
       kullanilir; rengi maskeyi tasiyan elemanin `background`i belirler. */
    --cctx-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    --accent2:       #8B5CF6;
    --brand:         #4C6EF5;   /* primary action / bot identity tone (own token; NOT #5865F2) */
    --brand-deep:    #364FC7;   /* darker companion for :hover of --brand surfaces */
    --accent-grad:   linear-gradient(135deg, #06B6D4, #8B5CF6);
    --text-primary:  #E2E8F0;
    --text-secondary:#94A3B8;
    --text-muted:    #475569;
    --text-link:     #38BDF8;
    /* KEYBOARD-FOCUS-VISIBILITY-1: klavye odak halkasi rengi (koyu / AMOLED: accent; acik tema asagida). */
    --focus-ring:    var(--accent);
    --online:        #10B981;
    --idle:          #F59E0B;
    --dnd:           #EF4444;
    --offline:       #475569;
    --border:        rgba(255, 255, 255, 0.05);
    --border-hover:  rgba(255, 255, 255, 0.08);
    --glow:          0 0 16px rgba(6, 182, 212, 0.08);
    --radius-sm:     8px;
    --radius-md:     12px;
    --radius-lg:     18px;
    --radius-full:   50%;
    --shadow:        0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg:     0 8px 48px rgba(0, 0, 0, 0.6);
    --transition:    180ms cubic-bezier(0.4, 0, 0.2, 1);
    --font:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* ── Tema paleti (THEME-COLOR-PARITY) ─────────────────────────────────────
       Bilesenlerdeki eski SABIT renkler bu tokenlara baglandi. KOYU degerler eski
       literallerin AYNISIDIR (koyu tema birebir korunur); Acik/AMOLED karsiliklari
       asagidaki [data-theme] bloklarindadir. Yeni bilesen sabit renk YAZMAZ. */
    /* Yuzeye gore yikama/kenarlik kanali: rgb(var(--overlay-rgb) / a).
       Koyu+AMOLED: beyaz isik; Acik: siyah golge. */
    --overlay-rgb:          255 255 255;
    /* Koyu golgelendirme (siyah-alfa ic yuzeyler) olcegi: rgb(0 0 0 / calc(a * k)). */
    --shade-k:              1;
    /* Video/degrade ustu metin parlamasi (text-shadow): yuzey rengi yonunde.
       Koyu+AMOLED siyah (acik metni ayirir), Acik beyaz (koyu metni ayirir). */
    --text-glow-rgb:        0 0 0;
    /* Cevrimdisi uye satiri soluklugu (acik zeminde daha az soluk) */
    --offline-member-opacity: 0.35;
    /* Discord paleti yuzeyleri (5100 parite bilesenleri) */
    --ui-floating:          #111214;
    --ui-floating-alt:      #18191c;
    --ui-card-deep:         #16181c;
    --ui-stage:             #1a1b1e;
    --ui-deep:              #1c1e22;
    --ui-tertiary:          #1e1f22;
    --ui-deep-alt:          #1f2023;
    --ui-secondary-alt:     #232428;
    --ui-secondary:         #2b2d31;
    --ui-primary:           #313338;
    --ui-raised:            #34373d;
    --ui-hover:             #35373c;
    --ui-folder:            #36393f;
    --ui-hover-alt:         #383a40;
    --ui-active:            #404249;
    --ui-scroll-thumb:      #4a4d5a;
    --ui-scroll-track:      #3a3d4a;
    /* Diger koyu yuzeyler (Tailwind/GitHub tonlari, tam ekran ekranlar, klasor) */
    --ui-folder-open-wrap:  rgba(14, 16, 30, 0.90);
    --ui-folder-open:       rgba(36, 39, 58, 0.92);
    --ui-surface-hover:     #1e2435;
    --ui-menu-alt:          #16181d;
    --ui-menu-navy:         #141722;
    --ui-gh-input:          #0d1117;
    --ui-gh-raised:         #111827;
    --ui-punish-bg:         #050709;
    --ui-force-bg:          #0d0e11;
    --ui-btn-disabled:      #2a2d36;
    /* Kanal tokenlari (yari saydam yuzey turevleri): rgb(var(--x-rgb) / a).
       Deger = ilgili yuzeyin R G B'si; hex karsiligi olan ikisi BIRLIKTE degisir. */
    --bg-primary-rgb:       8 10 16;
    --bg-secondary-rgb:     13 16 23;
    --bg-tertiary-rgb:      17 21 32;
    --bg-surface-rgb:       22 27 40;
    --ui-surface-deep-rgb:  16 20 30;
    --ui-catchup-rgb:       15 23 42;
    /* Koyu zemin icin secilmis PASTEL metin/ikonlar ton ailesinin ROL tokenini
       kullanir: var(--tint-amber|green|cyan|indigo|violet|pink|neutral, <pastel>)
       — koyu/AMOLED'de tanimsiz (pastel AYNEN), Acik'ta okunur koyu ton. */
    /* Bos ses sahnesi "aurora" (dekoratif marka degradesi) */
    --aurora-1:             #1b2a6e;
    --aurora-2:             #2a1f74;
    --aurora-3:             #3a1d63;
    --aurora-4:             #202a78;
    --aurora-5:             #15183f;
    --aurora-6:             #0e1130;
    --aurora-blob-a:        rgba(124, 132, 255, 0.60);
    --aurora-blob-b:        rgba(190, 110, 255, 0.52);
    --aurora-fg:            #fff;
    --aurora-fg-soft:       rgba(255, 255, 255, 0.82);
    --aurora-icon-bg:       rgba(255, 255, 255, 0.10);
    --aurora-icon-fg:       rgba(255, 255, 255, 0.92);
    --aurora-btn-bg:        #fff;
    --aurora-btn-fg:        #1e2024;
    --aurora-tile-bg:       rgba(0, 0, 0, 0.32);
    --aurora-more-fg:       rgba(255, 255, 255, 0.88);
    /* Discord paleti metinleri */
    --ui-text-strong:       #ffffff;
    --ui-text-header:       #f2f3f5;
    --ui-text-header-alt:   #f3f4f6;
    --ui-text-normal:       #dbdee1;
    --ui-text-normal-alt:   #dcddde;
    --ui-text-bright:       #e0e0e0;
    --ui-text-soft:         #c4c9d4;
    --ui-text-soft-alt:     #c4cbd4;
    --ui-text-soft-2:       #c7cbd6;
    --ui-text-secondary:    #b5bac1;
    --ui-text-muted:        #949ba4;
    --ui-text-muted-alt:    #9b9ea4;
    --ui-text-faint:        #80848e;
    --ui-text-faint-alt:    #87898f;
    --ui-text-dim:          #72767d;
    --ui-text-ghost:        #4e5058;
    --ui-text-slate-strong: #f1f5f9;
    --ui-text-slate:        #cbd5e1;
    --ui-text-gray-soft:    rgba(209, 213, 219, 0.75);
    /* Discord adli degiskenler: bazi bilesenler `var(--text-normal, #dbdee1)` gibi
       geri donuslu kullaniyor; TANIMSIZ olduklari icin geri donus HER temada sabit
       kaliyordu. Koyu deger = geri donusun AYNISI; acik/AMOLED paletten izler. */
    --text-normal:          var(--ui-text-normal);
    --header-primary:       var(--ui-text-header);
    --interactive-normal:   var(--ui-text-secondary);
    --interactive-hover:    var(--ui-text-normal-alt);
    --bg-modifier-hover:    rgba(79, 84, 92, 0.3);
    --link-color:           #00aff4;
    /* Rol tokenlari: bildirim (toast) */
    --toast-success-bg:     #1a2e22;
    --toast-success-fg:     #57f287;
    --toast-warning-bg:     #2e2410;
    --toast-warning-fg:     #ffd479;
    --toast-info-bg:        #131a2e;
    --toast-blocked-bg:     #2a1518;
    --toast-blocked-fg:     #ffb4b6;
    /* Rol yuzeyleri (--surface-menu / --surface-dialog / --surface-card /
       --surface-tile) ve tooltip (--tooltip-bg / --tooltip-fg) KOYUDA TANIMLANMAZ:
       bilesen `var(--surface-x, <palet>)` yazar, koyu tema kendi palet rengini
       korur; Acik/AMOLED ayni rolu TEK degere baglar (yari saydam kart icin
       --surface-card-rgb). --danger-text (kirmizi pastel hata metni) ve --tint-*
       yalniz Acik'ta tanimlidir. */
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
button { border: none; background: none; font-family: inherit; color: inherit; font-size: inherit; }
html, body { width: 100%; height: 100%; overflow: hidden; background: var(--bg-primary); }
body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
input, button, textarea { font-family: inherit; font-size: inherit; color: inherit; border: none; outline: none; background: none; }
input, textarea { -webkit-user-select: text; -moz-user-select: text; -ms-user-select: text; user-select: text; }
/* KEYBOARD-FOCUS-VISIBILITY-1: yukaridaki sifirlama FARE icin KORUNUR (tiklamada kalici halka YOK); KLAVYE odagi
   (:focus-visible — Tab / Shift+Tab ve Esc sonrasi programatik odak donusu) gorunur halka alir. :where() ile
   ozgulluk 0,1,0 ve kural sifirlamanin HEMEN ardinda → kendi odak stilini tanimlayan bilesen kurallari (sonra gelir
   ya da daha ozgul) USTUN kalir. outline yerlesimi / boyutu DEGISTIRMEZ; devre disi kontrol halka ALMAZ. Metin
   alanlari bilerek DISARIDA (kendi kenarlik / golge odak stilleri var). */
:where(button:not(:disabled):not([aria-disabled="true"]), input[type="checkbox"]:not(:disabled),
       input[type="radio"]:not(:disabled), input[type="range"]:not(:disabled)):focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}
a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgb(var(--overlay-rgb) / 0.06); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgb(var(--overlay-rgb) / 0.12); }
.hidden { display: none !important; }
/* Pre-paint hide for auto-login: prevents auth screen flash */
html.vc-auto-login #auth-screen { display: none !important; }

/* ═══════════════ AUTH SCREEN ═══════════════ */
.auth-screen {
    position: fixed; inset: 0; display: flex;
    flex-direction: column;
    align-items: center; justify-content: flex-start;
    background: var(--bg-primary); z-index: 1000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.auth-titlebar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 32px;
    display: none; /* hidden by default; only shown in frameless desktop mode */
    align-items: center;
    justify-content: flex-end;
    z-index: 1001;
    -webkit-app-region: drag;
}
.auth-titlebar-controls {
    display: flex;
    align-items: center;
    height: 32px;
    -webkit-app-region: no-drag;
}
/* `pointer-events: none`: `.auth-bg` SALT DEKORATIFTIR (uc bulanik orb, hicbir
   etkilesimli icerik yok) ama `position: fixed; inset: 0` ile TUM viewport'u
   kapliyor ve kartin disindaki her noktada isabet hedefi OLUYORDU. Sabit
   konumlu bir elemanin kaydirma zinciri `overflow` atasini ATLADIGI icin arka
   plan uzerindeki tekerlek olaylari hicbir seyi kaydirmiyordu: form YALNIZ
   kartin uzerindeyken kayiyordu (olculdu — arka planda scrollTop 0 -> 0,
   kartta 0 -> 250). Isabet testini gecirgen yapmak, olayi ZATEN var olan tek
   kaydirma kabina (`.auth-screen`) birakir; IKINCI bir kaydirma kabi veya JS
   tekerlek isleyicisi EKLENMEZ. */
.auth-bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.auth-orb {
    position: absolute; border-radius: 50%;
    filter: blur(100px); opacity: 0.35;
    animation: orbFloat 25s ease-in-out infinite;
}
.auth-orb-1 { width: 420px; height: 420px; background: #06B6D4; top: -120px; right: -80px; opacity: 0.2; }
.auth-orb-2 { width: 350px; height: 350px; background: #8B5CF6; bottom: -80px; left: -100px; animation-delay: -8s; opacity: 0.18; }
.auth-orb-3 { width: 250px; height: 250px; background: #10B981; top: 45%; left: 35%; opacity: 0.1; animation-delay: -16s; }

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(40px, -50px) scale(1.06); }
    50% { transform: translate(-30px, 30px) scale(0.94); }
    75% { transform: translate(50px, 40px) scale(1.03); }
}

.auth-container { position: relative; z-index: 1; width: 100%; max-width: 440px; padding: 20px; margin: auto; }
.auth-card {
    background: rgb(var(--bg-secondary-rgb) / 0.8);
    backdrop-filter: blur(24px) saturate(1.2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 32px 32px;
    box-shadow: var(--shadow-lg), var(--glow);
}
.auth-logo { text-align: center; margin-bottom: 14px; }
.logo-icon { display: inline-flex; margin-bottom: 6px; }
.logo-text {
    font-size: 28px; font-weight: 800;
    background: var(--accent-grad);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; letter-spacing: -0.5px;
}
.logo-tagline { color: var(--text-muted); font-size: 12px; margin-top: 2px; letter-spacing: 2px; text-transform: uppercase; font-weight: 500; }
.auth-form { display: none; }
.auth-form.active { display: block; }
.auth-form h2 { font-size: 18px; font-weight: 700; text-align: center; margin-bottom: 2px; }
.auth-subtitle { color: var(--text-secondary); text-align: center; margin-bottom: 10px; font-size: 13px; }

.input-group { margin-bottom: 12px; }
.input-group label {
    display: flex; align-items: center; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.8px;
    color: var(--text-secondary); margin-bottom: 8px;
}

/* Label info tooltip icon */
.label-info-icon {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    width: 14px; height: 14px; margin-left: 6px;
    background: var(--bg-tertiary); border: 1px solid var(--border);
    border-radius: 50%; font-size: 9px; font-weight: 700;
    color: var(--text-muted); cursor: help;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0; line-height: 1;
}
.label-info-icon:hover, .label-info-icon:focus {
    background: var(--accent); color: #fff; border-color: var(--accent);
}
.label-info-tooltip {
    display: none; position: absolute; left: 50%; bottom: calc(100% + 8px);
    transform: translateX(-50%);
    width: 230px; padding: 10px 12px;
    background: var(--bg-primary); border: 1px solid var(--border);
    border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    font-size: 12px; font-weight: 400; line-height: 1.5;
    color: var(--text-secondary); text-transform: none; letter-spacing: 0;
    white-space: normal; z-index: 999; pointer-events: none;
}
.label-info-tooltip::after {
    content: ''; position: absolute; left: 50%; top: 100%;
    transform: translateX(-50%);
    border: 6px solid transparent; border-top-color: var(--bg-primary);
}
.label-info-icon:hover .label-info-tooltip,
.label-info-icon:focus .label-info-tooltip {
    display: block;
}

/* ─── Input with @ prefix ─────────────────────────────────────────────────── */
.input-with-prefix {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.input-with-prefix:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.input-prefix {
    padding: 12px 0 12px 14px;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    user-select: none;
    flex-shrink: 0;
}
.input-with-prefix input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding-left: 4px !important;
}
.input-with-prefix input:focus {
    border: none !important;
    box-shadow: none !important;
}
.username-check-msg {
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
}
.username-check-msg.error { color: #f04747; }
.username-check-msg.success { color: #43b581; }

.input-group input {
    width: 100%; padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary); font-size: 14px;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.input-group input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-group input::placeholder { color: var(--text-muted); }
.pw-input-wrap { position: relative; }
.pw-input-wrap input { padding-right: 42px; }
.pw-toggle-btn {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; padding: 4px;
    color: var(--text-muted); display: flex; align-items: center; justify-content: center;
    border-radius: 4px; transition: color var(--transition); line-height: 0;
}
.pw-toggle-btn:hover { color: var(--text-primary); }
.pw-toggle-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pw-toggle-btn .eye-off-icon { display: none; }
.pw-toggle-btn.active .eye-icon { display: none; }
.pw-toggle-btn.active .eye-off-icon { display: inline; }

.btn-primary {
    width: 100%; padding: 12px;
    background: var(--accent-grad); color: white;
    font-weight: 700; border-radius: var(--radius-sm);
    cursor: pointer; transition: opacity var(--transition), transform 0.1s;
    margin-top: 4px; letter-spacing: 0.3px;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
    padding: 10px 20px; background: var(--bg-surface);
    color: var(--text-primary); font-weight: 600;
    border-radius: var(--radius-sm); cursor: pointer;
    transition: background var(--transition);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-hover); }

.btn-danger {
    padding: 10px 20px; background: var(--dnd); color: white;
    font-weight: 700; border-radius: var(--radius-sm); cursor: pointer;
    transition: background var(--transition);
}
.btn-danger:hover { background: #DC2626; }

.auth-switch { text-align: center; margin-top: 10px; font-size: 13px; color: var(--text-secondary); }
.auth-error { color: var(--dnd); text-align: center; margin-top: 8px; font-size: 13px; min-height: 18px; }
/* B4: auth ekraninda yasal metin baglantilari (kayit + giris). */
/* ── AUTH LEGAL / MARKETING CONSENT (kayit formu) ────────────────────────── */
.auth-consent { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 14px; }
.auth-consent-row {
    display: flex; align-items: flex-start; gap: 10px;
    cursor: pointer; user-select: none;
}
/* Native kutu gizlenir ama ODAKLANABILIR kalir (display:none klavyeyi kirardi):
   TAB ile ulasilir, SPACE ile degisir, `:focus-visible` gorunur halka verir. */
.auth-consent-row input[type="checkbox"] {
    position: absolute; opacity: 0; width: 0; height: 0; margin: 0;
    pointer-events: none;
}
.auth-consent-box {
    flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--text-muted); border-radius: 4px;
    background: transparent; color: transparent;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.auth-consent-row:hover .auth-consent-box { border-color: var(--text-secondary); }
.auth-consent-row input:checked + .auth-consent-box {
    background: var(--brand); border-color: var(--brand); color: #fff;
}
.auth-consent-row input:focus-visible + .auth-consent-box {
    box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--accent);
}
.auth-consent-text {
    font-size: 12.5px; line-height: 1.45; color: var(--text-secondary);
}
.auth-consent-link { color: var(--accent); text-decoration: none; }
.auth-consent-link:hover { text-decoration: underline; }
/* Gonderimde isaretlenmemis ZORUNLU kutu: mevcut `var(--dnd)` hata dili. */
.auth-consent-row.consent-error .auth-consent-box { border-color: var(--dnd); }
.auth-consent-row.consent-error .auth-consent-text { color: var(--dnd); }

/* Ayarlar > Bildirimler > E-posta: kaydetme geri bildirimi (bos iken yer
   kaplamaz; hata durumunda `.is-error` ile mevcut hata rengine doner). */
.settings-hint { font-size: 12px; line-height: 1.45; color: var(--text-muted); }
.settings-hint:empty { display: none; }
.settings-hint.is-error { color: var(--dnd); }

.auth-legal { text-align: center; margin-top: 6px; font-size: 12px; color: var(--text-secondary); }
.auth-legal-link { color: var(--text-secondary); text-decoration: none; }
.auth-legal-link:hover { color: var(--accent); text-decoration: underline; }
.auth-legal-sep { margin: 0 6px; opacity: 0.5; }
/* P5B-4C.2: parola degisimi sonrasi giris ekranindaki tek-seferlik BILGI
   notu. Ayni elemani kullanir ama HATA degildir → kirmizi yerine notr/
   olumlu ton ve okunabilir satir yuksekligi. */
.auth-error.auth-notice { color: var(--text-secondary); line-height: 1.45; text-align: center; }
.login-back-link {
    display: block; font-size: 12px; color: var(--text-muted);
    text-decoration: none; margin-bottom: 10px;
    transition: color 0.12s;
}
.login-back-link:hover { color: var(--accent); }

/* Saved Accounts */
.saved-accounts { text-align: center; }
.saved-accounts h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.saved-accounts-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; max-height: min(380px, calc(100vh - 310px)); overflow-y: auto; padding-right: 2px; }
.saved-account-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: var(--radius-sm);
    background: var(--bg-surface); border: 1px solid var(--border);
    cursor: pointer; transition: background var(--transition), border-color var(--transition);
    text-align: left; user-select: none;
}
.saved-account-card:hover { background: var(--bg-hover); border-color: var(--accent); }
.saved-account-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 16px; color: white; flex-shrink: 0;
}
.saved-account-info { flex: 1; min-width: 0; }
.saved-account-name { font-weight: 600; font-size: 14px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved-account-tag { font-size: 12px; color: var(--text-muted); }
.saved-account-remove {
    width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); background: transparent;
    transition: background var(--transition), color var(--transition);
    flex-shrink: 0;
}
.saved-account-remove:hover { background: rgba(239,68,68,0.15); color: var(--dnd); }
.saved-accounts-new {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 8px; padding: 12px; user-select: none;
}

/* ═══════════════ MAIN APP ═══════════════ */
.app { display: flex; height: 100vh; width: 100vw; overflow: hidden; }

/* ─── Server Bar ────────────────────── */
.server-bar {
    width: 72px; min-width: 72px;
    background: var(--bg-primary);
    display: flex; flex-direction: column; align-items: center;
    padding: 12px 0 88px; gap: 6px; overflow-y: auto;
    scrollbar-width: none; border-right: 1px solid var(--border);
}
/* Extra scroll clearance when voice/call panel is visible above the user panel */
body.voice-panel-open .server-bar {
    padding-bottom: 196px;
}
.server-bar::-webkit-scrollbar { display: none; }

.server-icon {
    width: 48px; height: 48px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-radius var(--transition), background var(--transition), transform 0.15s;
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-weight: 700; font-size: 18px;
    position: relative; z-index: 1; user-select: none;
}
.server-icon:hover {
    border-radius: 12px;
    background: var(--accent); color: white;
}
.server-icon.active { border-radius: 12px; background: var(--accent); color: white; }
.server-icon.has-custom-icon:hover,
.server-icon.has-custom-icon.active {
    background: transparent;
    color: var(--text-secondary);
    box-shadow: none;
    outline: none;
}
.server-icon.has-custom-icon:hover .server-icon-image-wrap,
.server-icon.has-custom-icon.active .server-icon-image-wrap {
    box-shadow: none;
    outline: none;
    border-color: transparent;
}
.server-icon-image-wrap {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    background: var(--bg-surface);
    pointer-events: none;
}
.server-icon-img {
    width: 100%; height: 100%; border-radius: inherit;
    object-fit: cover; pointer-events: none; display: block;
}

/* Active indicator: vertical glow line */
.server-icon::before {
    content: ''; position: absolute; left: -14px;
    width: 3px; height: 0;
    border-radius: 0 3px 3px 0;
    background: var(--accent-grad);
    transition: height var(--transition);
    box-shadow: var(--glow);
}
.server-icon:hover::before { height: 20px; }
.server-icon.active::before { height: 34px; }

/* Sağ-tık menüsü açıkken sunucu ikonları hover'a tepki vermesin (fare üzerinde değilmiş gibi); aktif sunucu vurgusu korunur */
body.server-context-open .server-icon:not(.active):hover {
    border-radius: 16px;
    transform: none;
    background: var(--bg-surface);
    color: var(--text-secondary);
}
body.server-context-open .server-icon:not(.active):hover::before { height: 0; }
/* "Fare üzerinde değilmiş gibi" okunmamış ikonda kısa çizgidir (0 değil) — sağ tıklanan okunmamış sunucu çizgisini korur */
body.server-context-open .server-icon.has-unread:not(.active):hover::before { height: 8px; }

.home-icon { background: var(--bg-surface); }
.home-icon:hover, .home-icon.active { background: transparent; }

.server-separator { width: 32px; height: 2px; border-radius: 1px; background: var(--border); margin: 4px 0; flex-shrink: 0; }
.server-list { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }

/* ─── Server bar DM avatarları (okunmamış DM + aktif DM araması) ─── */
/* display:contents → çocuklar doğrudan .server-bar flex akışına girer;
   liste boşken fazladan gap/boşluk oluşmaz. */
.server-bar-dms { display: contents; }
/* Daire avatar; hover/aktifte .server-icon:hover kuralı (daha yüksek özgüllük)
   Discord'daki gibi yuvarlatılmış kareye morflar. */
.server-dm-icon { border-radius: 50%; }
.server-dm-initial {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    border-radius: inherit;
    color: white; font-weight: 700; font-size: 18px;
    user-select: none;
}
/* Aktivite rozeti (sağ üst): arama sürerken hoparlör, yayında ekran ikonu */
.server-dm-activity {
    position: absolute;
    top: -3px; right: -3px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 2px solid var(--bg-primary);
    display: flex; align-items: center; justify-content: center;
    color: var(--online);
    z-index: 2;
    pointer-events: none;
}
.server-dm-activity svg { width: 11px; height: 11px; display: block; }
.add-server { color: var(--online); background: var(--bg-surface); }
.add-server:hover { background: var(--online); color: white; }

.server-icon[title]:hover::after {
    display: none;
}

/* ─── Server DnD: keep icons from shrinking ─── */
.server-icon,
.server-folder,
.server-folder-wrapper,
.add-server-btn {
    flex: 0 0 auto;
}

/* ─── Dragging state ─────────────────── */
.server-icon.dragging,
.server-folder.dragging {
    opacity: 0.35;
    pointer-events: none;
}

/* ─── Drag ghost ─────────────────────── */
.server-drag-ghost {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    border-radius: 16px;
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-weight: 700; font-size: 18px;
    opacity: 0.85;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    transform: scale(1.1);
    transition: none;
    overflow: hidden;
}
.server-drag-ghost img {
    width: 100%; height: 100%; object-fit: cover; border-radius: inherit;
}
/* Folder drag ghost: suppress pill indicator and lock transitions */
.server-drag-ghost-folder::before {
    display: none !important;
}
.server-drag-ghost-folder,
.server-drag-ghost-folder * {
    transition: none !important;
}

/* ─── Drop indicator ─────────────────── */
.server-drop-indicator {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    height: 3px;
    width: 40px;
    border-radius: 999px;
    background: var(--accent, #06b6d4);
    display: none;
    box-shadow: 0 0 8px var(--accent, #06b6d4);
    transform: translateX(-50%);
}

/* ─── Folder-target highlight ────────── */
/* Server icon targeted for folder-create (drag A over B → 600ms → folder) */
.server-icon.folder-target {
    transform: scale(1.08) translateY(-2px);
    transition: transform 0.15s ease;
}
.server-icon.folder-target::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 18px;
    background: rgba(6, 182, 212, 0.18);
    border: 1.5px solid rgba(34, 211, 238, 0.7);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12), 0 0 12px rgba(6, 182, 212, 0.25);
    pointer-events: none;
    z-index: 1;
    animation: folder-target-pulse 1.2s ease-in-out infinite;
}
@keyframes folder-target-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12), 0 0 12px rgba(6, 182, 212, 0.25); }
    50%       { box-shadow: 0 0 0 5px rgba(6, 182, 212, 0.18), 0 0 18px rgba(6, 182, 212, 0.38); }
}
/* Folder targeted for folder-add (drag server over existing folder) */
.server-folder.folder-drag-target {
    transform: scale(1.08);
    background: rgba(6, 182, 212, 0.16);
    border: 1.5px solid rgba(34, 211, 238, 0.6);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12), 0 0 12px rgba(6, 182, 212, 0.22);
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

/* ─── Server Folder Item ─────────────── */

/* Wrapper: lays out the folder icon + inner-server list vertically.
   When open, becomes a Discord-like folder tray container via :has(). */
.server-folder-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    flex: 0 0 auto;
    border-radius: 18px;
    transition:
        background 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
        padding 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* Folder tray: shown when the inner .server-folder has .open */
.server-folder-wrapper:has(.server-folder.open) {
    background: var(--ui-folder-open-wrap);
    box-shadow:
        0 6px 24px rgba(0, 0, 0, 0.40),
        0 0 0 1px rgb(var(--overlay-rgb) / 0.05),
        inset 0 1px 0 rgb(var(--overlay-rgb) / 0.03);
    padding: 5px 5px 8px;
}

/* The clickable folder icon */
.server-folder {
    width: 48px; height: 48px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-radius 240ms cubic-bezier(0.2, 0.8, 0.2, 1), background 240ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
    background: var(--bg-active);
    position: relative; z-index: 1;
    user-select: none;
    box-shadow: inset 0 1px 0 rgb(var(--overlay-rgb) / 0.05), 0 2px 4px rgba(0, 0, 0, 0.30);
}
.server-folder:hover {
    border-radius: 12px;
    transform: translateY(-2px);
    background: var(--bg-hover);
    box-shadow: inset 0 1px 0 rgb(var(--overlay-rgb) / 0.07), 0 4px 10px rgba(0, 0, 0, 0.35);
}
.server-folder.open {
    border-radius: 14px;
    background: var(--ui-folder-open);
    box-shadow:
        inset 0 1px 0 rgb(var(--overlay-rgb) / 0.07),
        0 0 0 1.5px rgba(88, 101, 242, 0.55),
        0 4px 14px rgba(88, 101, 242, 0.14);
}
.server-folder.open:hover {
    transform: translateY(-1px);
}

/* Active indicator for folder */
.server-folder::before {
    content: ''; position: absolute; left: -14px;
    width: 3px; height: 0;
    border-radius: 0 3px 3px 0;
    background: var(--accent-grad);
    transition: height var(--transition);
}
.server-folder:hover::before { height: 20px; }
.server-folder.open::before  { height: 34px; }
/* Seçili sunucu KAPALI klasördeyse uzun çizgi klasörde (seçili sunucu ikonuyla aynı 34px); açıkken çizgi içteki
   sunucuda kalır. İç ikonlar kapalıyken de DOM'dadır ve `active`i taşır → JS gerekmez. Hover / okunmamıştan üstün. */
.server-folder-wrapper:has(> .server-folder-servers > .server-icon.active) > .server-folder:not(.open)::before { height: 34px; }

/* ── Folder glyph: proper folder shape, purple gradient, fades in when open ── */
.server-folder-glyph {
    position: absolute;
    width: 22px; height: 16px;
    border-radius: 4px 5px 5px 5px;
    background: linear-gradient(180deg, #6875ff 0%, #5865f2 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 3px 8px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    opacity: 0;
    transform: scale(0.75) translateY(3px);
    transform-origin: center;
    transition:
        opacity     240ms cubic-bezier(0.2, 0.8, 0.2, 1),
        transform   240ms cubic-bezier(0.2, 0.8, 0.2, 1),
        background  240ms cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow  240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* Tab / sekme kısmı */
.server-folder-glyph::before {
    content: '';
    position: absolute;
    left: 2px; top: -4px;
    width: 10px; height: 6px;
    border-radius: 4px 4px 1px 1px;
    background: linear-gradient(180deg, #7c86ff 0%, #5865f2 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
/* Subtle horizontal highlight line on glyph body */
.server-folder-glyph::after {
    content: '';
    position: absolute;
    left: 4px; right: 4px;
    top: 5px; height: 1px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}
/* When open: deeper purple gradient, glow; mini-grid fades out */
.server-folder.open .server-folder-glyph {
    opacity: 1;
    transform: scale(1.04) translateY(0);
    background: linear-gradient(180deg, #7c86ff 0%, #5865f2 55%, #4752c4 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 0 0 1px rgba(88, 101, 242, 0.35),
        0 6px 12px rgba(88, 101, 242, 0.22);
}
.server-folder.open .server-folder-glyph::before {
    background: linear-gradient(180deg, #8d95ff 0%, #5865f2 100%);
}
.server-folder.open .server-folder-grid {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* Mini server grid inside folder icon (shown when closed) */
.server-folder-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    width: 28px; height: 28px;
    border-radius: 7px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.30);
    transition: opacity 240ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.server-folder-mini {
    display: flex; align-items: center; justify-content: center;
    font-size: 7px; font-weight: 700; color: rgb(var(--overlay-rgb) / 0.85);
    background: var(--ui-folder);
    overflow: hidden;
}

/* ── Inner servers container (always in DOM, animates open/closed) ── */
.server-folder-servers {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    /* overflow: visible — allows ::before pill indicator to escape the container.
       Hiding is handled by opacity: 0 + pointer-events: none + max-height: 0. */
    overflow: visible;
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition:
        max-height 320ms cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity    240ms ease,
        transform  280ms cubic-bezier(0.2, 0.8, 0.2, 1);
    padding-top: 0;
}
.server-folder-servers.open {
    max-height: 900px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    padding-top: 4px;
}

/* Server icons inside open folder (slightly smaller) */
.server-icon.folder-server {
    width: 40px; height: 40px;
    border-radius: 14px;
    font-size: 14px;
}
.server-icon.folder-server:hover { border-radius: 10px; }
.server-icon.folder-server.active { border-radius: 10px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .server-folder,
    .server-folder-glyph,
    .server-folder-grid,
    .server-folder-servers,
    .server-folder-wrapper {
        transition: none !important;
        animation: none !important;
    }
}

/* ─── Folder tooltip (wider, multi-line) ─────── */
.server-tooltip.folder-tooltip {
    max-width: 280px;
    white-space: normal;
    line-height: 1.3;
    text-align: center;
    word-break: normal;
    overflow-wrap: anywhere;
}
.folder-tooltip-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary, #b0b0b0);
}

/* ─── Server Tooltip ─────────────────── */
.server-tooltip {
    position: fixed;
    background: var(--bg-floating);
    border-radius: 8px;
    padding: 12px 14px;
    min-width: 0;
    max-width: 210px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.1s ease;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6), 0 0 0 1px rgb(var(--overlay-rgb) / 0.06);
    white-space: nowrap;
}
.server-tooltip::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: var(--bg-floating);
}
.server-tooltip.visible {
    opacity: 1;
    visibility: visible;
}
body.server-context-open .server-tooltip,
body.server-context-open .server-tooltip.visible {
    opacity: 0 !important;
    visibility: hidden !important;
}
.server-tooltip-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--ui-text-strong);
    white-space: normal;        /* container nowrap'ı override → uzun isim alt satıra geçer */
    overflow-wrap: anywhere;    /* boşluksuz uzun isimleri de kır */
    line-height: 1.3;
}
.server-tooltip-voice {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-hover);
}
.server-tooltip-voice-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.server-tooltip-voice-icon {
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    color: #9B9B9B;
    flex-shrink: 0;
}
.server-tooltip-avatars {
    display: flex;
    align-items: center;
}
.server-tooltip-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid var(--bg-floating);
    margin-left: -10px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    object-fit: cover;
    flex-shrink: 0;
}
.server-tooltip-avatar:first-child { margin-left: 0; }
img.server-tooltip-avatar { background: var(--bg-surface); }
.server-tooltip-extra {
    background: var(--bg-active);
    color: var(--ui-text-strong);
    font-size: 11px;
    font-weight: 700;
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid var(--bg-floating);
    margin-left: -10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ─── Channel Sidebar ────────────────── */
/* C17: genişlik JS tarafından (hesaba özel tercih) satır içi yazılır;
   buradaki değerler VARSAYILANDIR. `position: relative` sürükleme tutamacını
   konumlandırmak içindir ve mevcut flex düzenini DEĞİŞTİRMEZ. */
/* ─── Kanal/DM kenar cubugu surukleme tutamaci (5100 paritesi) ─────────────
   Gorunmez 8px serit; yalniz `col-resize` imleci. Alt kullanici karti aciken
   imleci SAHIPLENMEZ (kart z-index yarisi degil, sahiplik devri). */
/* Gorunmez tutamac: YALNIZ col-resize imleci (5100 sunumu — renkli ipucu YOK).
   TEK otoriter tanim; ikinci bir `.channel-sidebar-resize-handle` kurali
   BULUNMAMALIDIR (rakip cascade kopya hatasiydi). */
.channel-sidebar-resize-handle {
    position: absolute; right: -3px; top: 0;
    width: 8px; height: 100%;
    cursor: col-resize; z-index: 5;
}
/* Sertlestirme KORUNUR: profil popup aciksa tutamac tiklanamaz. */
body:has(#user-profile-popup:not(.hidden)) .channel-sidebar-resize-handle {
    pointer-events: none;
}
/* 5100 SUNUMU: gorsel gosterge — normalde SEFFAF ince bar, hover'da accent,
   surukleme sirasinda daha belirgin. `::after` BASKA bir secicidir; "tek otoriter
   kural" sarti TABAN seciciye aittir (kopya `.channel-sidebar-resize-handle`
   tanimi kaldirildi) — bu gorsel katman 5100'un sunumunun PARCASIDIR.
   Kutu akisa girmez (absolute) -> sidebar/ana icerik genisligi KAYMAZ. */
.channel-sidebar-resize-handle::after {
    content: '';
    position: absolute;
    top: 0;
    /* Bar SAG kenardan konumlandirilir -> surukleme sirasinda 2->3px SOLA buyur,
       sinir hizasi bozulmaz. */
    right: 2px;
    width: 2px;
    height: 100%;
    border-radius: 1px;
    /* Renk SABIT accent; gorunurluk `opacity` ile -> kirli ara tonlar olusmaz. */
    background: var(--accent);
    opacity: 0;
    /* Gecikme 0s: fare AYRILDIGINDA bar ANINDA kaybolur. */
    transition: opacity var(--transition) 0s, width var(--transition), box-shadow var(--transition);
    pointer-events: none;        /* surukleme hedefi tutamacin KENDISI kalir */
}
.channel-sidebar-resize-handle:hover::after {
    opacity: 1;
    /* YALNIZ gorunme gecikir (~150ms): sinirdan hizlica gecerken bar yanip sonmez. */
    transition-delay: 150ms;
}
/* Suruklerken imlec tutamactan ciksa da bar GORUNUR kalir.
   NOT: surukleme sinifi URETIMDE `resizing-chsidebar`'dir (5100'deki
   `resizing-channel-sidebar` bu kod tabaninda YOKTUR) -> olu CSS uretilmez. */
body.resizing-chsidebar .channel-sidebar-resize-handle::after {
    opacity: 1;
    /* `transition: none` SART: imlec zaten tutamactayken hover'in 150ms gecikmeli
       gecisi baslamis olur ve hedef deger ayni kaldigindan tarayici onu SURDURUR. */
    transition: none;
    width: 3px;
    box-shadow: 0 0 6px rgba(6, 182, 212, 0.45);
}

.channel-sidebar {
    /* 5100 sunumu: genislik CSS degiskeninden (varsayilan 260px). JS
       (`_applyChannelSidebarWidth`) hesaba ozel tercihi INLINE yazmaya devam
       eder ve inline deger daima kazanir -> sertlestirilmis kelepceleme ve
       kaydetme mantigi DEGISMEZ; buradaki deger yalniz ilk kareyi belirler. */
    width: var(--channel-sidebar-width, 260px);
    min-width: var(--channel-sidebar-width, 260px);
    position: relative;          /* sag kenardaki tutamacin konumlanma baglami */
    background: var(--bg-secondary);
    display: flex; flex-direction: column;
    border-right: 1px solid var(--border);
}
.sidebar-view { display: none; flex-direction: column; flex: 1; overflow: visible; min-height: 0; }  /* min-height:0 → alt liste (dm-list) küçük ekranda büyüyüp taşmak yerine kaydırılabilsin */
.sidebar-view.active { display: flex; }

.sidebar-header {
    padding: 12px; border-bottom: 1px solid var(--border);
    min-height: 49px; display: flex; align-items: center;
    position: relative;
}
.server-name-header {
    padding: 10px 16px; display: flex;
    align-items: center; justify-content: space-between;
}
.server-name-header h3 {
    font-size: 15px; font-weight: 700;
    flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.server-header-actions {
    display: flex; align-items: center; gap: 2px;
}

.search-box {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-input); border-radius: var(--radius-sm);
    padding: 8px 12px; width: 100%;
    border: 1px solid var(--border);
    transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 80ms ease;
}
.sidebar-header .search-box:hover {
    background: var(--bg-input);
    border-color: rgb(var(--overlay-rgb) / 0.12);
    filter: brightness(1.06);
}
.sidebar-header .search-box:hover svg { opacity: 0.6; }
.sidebar-header .search-box:hover input::placeholder { color: var(--text-secondary); }
/* left-click press animation managed by JS class; :active removed so right-click has no visual feedback */
.sidebar-header .search-box.is-left-pressing { transform: translateY(1px); }
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(88,101,242,0.18); }
.sidebar-header .search-box:focus-within {
    background: rgb(var(--overlay-rgb) / 0.045);
    border-color: rgba(88,101,242,0.55);
    box-shadow: 0 0 0 2px rgba(88,101,242,0.18);
    filter: none;
    transform: none;
}
.search-box input { flex: 1; font-size: 13px; color: var(--text-primary); background: none; }
.search-box input::placeholder { color: var(--text-muted); }

/* ─── DM Sidebar (Discord-style) ─────── */
.dm-sidebar-items {
    padding: 8px 8px 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.dm-sidebar-btn {
    width: 100%; display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; font-size: 14px; font-weight: 600;
    color: var(--text-secondary); border-radius: 10px;
    cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease; position: relative;
    background: none; border: none;
}
.dm-sidebar-btn:hover { background: rgb(var(--overlay-rgb) / 0.06); color: var(--text-primary); }
.dm-sidebar-btn.active {
    background: rgb(var(--overlay-rgb) / 0.1); color: var(--text-primary);
}

.nav-badge {
    background: var(--dnd); color: white; font-size: 10px; font-weight: 700;
    min-width: 16px; height: 16px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; padding: 0 4px;
    margin-left: auto;
}

.dm-section-header {
    display: flex; align-items: center; padding: 14px 14px 6px;
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.8px; color: var(--text-muted); user-select: none;
}

.dm-convo-list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 0 4px; }  /* min-height:0 → içerik taşınca aşağı kaydırma çubuğu çıkar (küçük ekran / çok DM) */
/* DM listesi kaydırma çubuğu daha İNCE (global 5px → 3px). NOT: scrollbar-width KULLANILMAZ — Chromium webview'da
   'thin' native ok-butonlu çubuğa geçip bozuk görünüyordu; sadece ::-webkit-scrollbar (global ile aynı temiz yaklaşım). */
.dm-convo-list::-webkit-scrollbar { width: 3px; }
.dm-convo-list::-webkit-scrollbar-button { display: none; height: 0; width: 0; }
.dm-convo-list::-webkit-scrollbar-track { background: transparent; }
.dm-convo-list::-webkit-scrollbar-thumb { background: rgb(var(--overlay-rgb) / 0.12); border-radius: 3px; }
.dm-convo-list::-webkit-scrollbar-thumb:hover { background: rgb(var(--overlay-rgb) / 0.2); }

/* ─── Friends View (main area) ───────── */
.friends-view { display: none; flex-direction: column; flex: 1; overflow: hidden; }
.friends-view.active { display: flex; }
.friends-view .chat-header { border-bottom: 1px solid var(--border); }
.friends-view .chat-header-left { gap: 12px; }
.friends-view .chat-header-left h3 { font-size: 15px; font-weight: 700; margin-right: 0; }

.header-divider {
    width: 1px; height: 20px; background: var(--border); margin: 0 4px;
}

/* ─── DISCOVER-1: Keşfet (ray düğmesi + DM ana görünümü sekmesi) — yalnız tema tokenları ─── */
.discover-server { color: var(--accent); }
.discover-view .discover-body { flex: 1; overflow-y: auto; padding: 24px 32px 40px; }
.discover-hero {
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    margin-bottom: 28px;
    background: linear-gradient(135deg, var(--aurora-1) 0%, var(--aurora-2) 45%, var(--aurora-6) 100%);
    color: var(--aurora-fg);
}
.discover-hero-title { margin: 0 0 8px; font-size: 28px; font-weight: 800; letter-spacing: -0.01em; color: var(--aurora-fg); }
.discover-hero-text { margin: 0; max-width: 560px; font-size: 15px; line-height: 1.5; color: var(--aurora-fg-soft); }
.discover-section-title { margin: 0 0 14px; font-size: 16px; font-weight: 700; color: var(--text-primary); }
.discover-status { padding: 8px 0 16px; font-size: 14px; color: var(--text-secondary); }
.discover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.discover-card {
    position: relative;
    display: flex; flex-direction: column;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition), transform var(--transition);
}
.discover-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.discover-card-cover { position: relative; height: 92px; overflow: hidden; background: var(--bg-surface); }
.discover-card-cover-img {
    position: absolute; inset: -28px;
    background-size: cover; background-position: center;
    filter: blur(18px) saturate(1.15);
    opacity: 0.85;
}
.discover-card-icon {
    position: absolute; top: 58px; left: 16px;
    width: 64px; height: 64px;
    border-radius: 18px;
    border: 4px solid var(--bg-secondary);
    background: var(--bg-surface);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.discover-card-icon-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.discover-card-icon-letter { font-size: 22px; font-weight: 700; color: var(--text-primary); }
.discover-card-body { flex: 1; padding: 40px 16px 6px; }
.discover-card-name { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--text-primary); }
.discover-card-desc {
    margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--text-secondary);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.discover-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 16px; }
.discover-card-members { font-size: 12.5px; color: var(--text-secondary); }
.discover-card-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: var(--accent); color: white;
    font-size: 13.5px; font-weight: 600;
    transition: background var(--transition), opacity var(--transition);
}
.discover-card-btn:hover { background: var(--accent-hover); }
.discover-card-btn:disabled { opacity: 0.6; cursor: default; }
.discover-card-btn.is-member { background: var(--bg-surface); color: var(--text-primary); }
.discover-card-btn.is-member:hover { background: var(--bg-hover); }
@media (max-width: 720px) {
    .discover-view .discover-body { padding: 16px; }
    .discover-hero { padding: 28px 20px; }
    .discover-hero-title { font-size: 22px; }
}

.friends-header-tabs { display: flex; gap: 6px; margin-right: 12px; }
.friends-header-tabs .filter-btn {
    padding: 7px 14px; font-size: 13px; font-weight: 600; letter-spacing: 0.2px;
    color: var(--text-muted); border-radius: 8px;
    cursor: pointer; transition: background var(--transition), color var(--transition); text-align: center;
    background: none; border: none; white-space: nowrap;
}
.friends-header-tabs .filter-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.friends-header-tabs .filter-btn.active { background: var(--bg-active); color: var(--text-primary); }

/* FRIENDS-HEADER-NARROW-1: Arkadaşlar başlığı KENDİ genişliğine göre kademeli sıkışır (`friendshdr`, yalnız #friends-view;
   İstekler / Keşfet başlıkları etkilenmez) ve "Arkadaş Ekle" HİÇ kırpılmaz. Eşikler başlık İÇERİK genişliğidir; gerçek
   uygulamada "99+" rozetiyle ölçülen ihtiyaçtan (698 / 623 / 486 / 432 px) pay bırakır. Sıra: sekmeler küçülür →
   "Arkadaşlar" yazısı + ayraç gizlenir → ikon gizlenir, iç boşluklar daralır (üst çubuktaki "Arkadaşlar" kalır); varsayılan
   260 px kenar çubuğuyla 800 px masaüstü alt sınırında da her şey sığar. Kenar çubuğu daha genişse ya da pencere daha
   darsa sekmeler yana kayar (çubuk gizli). Sekme kabının 4px iç boşluğu + eşit negatif dış boşluğu yerleşimi
   DEĞİŞTİRMEZ, odak halkasını (2px + 2px ofset) kaydırma kabında kırpılmaktan korur. */
#friends-view .chat-header { container: friendshdr / inline-size; }
#friends-view .chat-header-left { min-width: 0; }
#friends-view .chat-header-left > :not(.friends-header-tabs) { flex-shrink: 0; }
#friends-view .friends-header-tabs {
    min-width: 0; overflow-x: auto; scrollbar-width: none;
    padding: 4px; margin: -4px 8px -4px -4px; scroll-padding-inline: 4px;
}
#friends-view .friends-header-tabs::-webkit-scrollbar { display: none; }
@container friendshdr (max-width: 710px) {
    #friends-view .friends-header-tabs .filter-btn { padding: 4px 7px; font-size: 12px; }
}
@container friendshdr (max-width: 640px) {
    #friends-view .chat-header-left { gap: 8px; }
    #friends-view .chat-header-left > h3,
    #friends-view .chat-header-left > .header-divider { display: none; }
    #friends-view .friends-header-tabs { gap: 2px; margin-right: 4px; }
}
@container friendshdr (max-width: 500px) {
    #friends-view .chat-header-left { gap: 6px; }
    #friends-view .chat-header-left > svg { display: none; }
    #friends-view .friends-header-tabs .filter-btn { padding: 4px 5px; }
    #friends-view .chat-header-left > #add-friend-btn { padding-left: 12px; padding-right: 12px; }
}

.tab-badge {
    background: var(--dnd); color: white; font-size: 10px; font-weight: 700;
    min-width: 14px; height: 14px; border-radius: 7px;
    display: inline-flex; align-items: center; justify-content: center; padding: 0 3px;
    margin-left: 4px; vertical-align: middle;
}

.btn-add-friend-header {
    padding: 7px 16px; font-size: 13px; font-weight: 600; letter-spacing: 0.2px;
    background: var(--brand); color: #fff;
    border-radius: 8px; cursor: pointer; border: none; white-space: nowrap;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn-add-friend-header:hover { background: #4954e0; box-shadow: 0 2px 10px rgba(88,101,242,0.35); }
.btn-add-friend-header:active { background: #3f49c9; transform: translateY(1px); box-shadow: none; }
.btn-add-friend-header.active { background: var(--bg-active); color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--border); }

/* ─── Arkadaş Ekle paneli (Arkadaşlar görünümü içinde) ─── */
.add-friend-view { display: none; flex: 1; flex-direction: column; padding: 24px 30px; overflow-y: auto; min-width: 0; }
.friends-view.add-friend-open .friends-list-wrapper { display: none; }
.friends-view.add-friend-open .add-friend-view { display: flex; }
/* Panel açıkken aktif filtre sekmesinin (Çevrim içi vb.) arka planı gizlenir →
   yalnızca "Arkadaş Ekle" vurgulu görünsün, iki kısım açıkmış gibi durmasın */
.friends-view.add-friend-open .friends-header-tabs .filter-btn.active { background: none; color: var(--text-muted); }
.add-friend-title { font-size: 18px; font-weight: 800; color: var(--text-primary); margin: 0 0 6px; }
.add-friend-subtitle { font-size: 14px; color: var(--text-secondary); margin: 0 0 18px; }
.add-friend-input-row {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: 10px; padding: 6px 6px 6px 16px;
    transition: border-color var(--transition), box-shadow var(--transition);
    width: 100%;
}
.add-friend-input-row:focus-within {
    border-color: rgba(6,182,212,0.6);
    box-shadow: 0 0 0 3px rgba(6,182,212,0.09), 0 0 0 5px rgba(139,92,246,0.06);
}
.add-friend-input-row.is-error { border-color: var(--dnd); box-shadow: 0 0 0 3px rgba(239,68,68,0.12); }
.add-friend-input-row input {
    flex: 1; background: none; border: none; outline: none;
    color: var(--text-primary); font-size: 15px; padding: 8px 0; min-width: 0;
}
.add-friend-input-row input::placeholder { color: var(--text-muted); }
.add-friend-send-btn {
    flex-shrink: 0; padding: 9px 16px; font-size: 13px; font-weight: 700;
    background: var(--accent-grad); color: white; border: none;
    border-radius: 7px; cursor: pointer; white-space: nowrap;
    transition: opacity var(--transition);
}
.add-friend-send-btn:hover { opacity: 0.85; }
.add-friend-send-btn:disabled { opacity: 0.45; cursor: default; }
.add-friend-view .friend-req-status { width: 100%; }

/* ─── ADD-FRIEND-DISCOVER-1: Arkadaş Ekle altında Keşfet önerileri — yalnız tema tokenları, düz yüzeyler ─── */
.af-discover { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.af-discover-title { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--text-primary); }
.af-discover-text { margin: 0 0 16px; max-width: 640px; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
.af-discover-list {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
    gap: 12px; margin-bottom: 12px;
}
.af-discover-card {
    display: flex; flex-direction: column; gap: 10px; min-width: 0;
    padding: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color var(--transition), transform var(--transition);
}
.af-discover-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.af-discover-card-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.af-discover-card-icon {
    flex-shrink: 0; width: 44px; height: 44px; border-radius: 14px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-surface);
}
.af-discover-card-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.af-discover-card-letter { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.af-discover-card-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.af-discover-card-name {
    font-size: 14.5px; font-weight: 700; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.af-discover-card-meta { font-size: 12.5px; color: var(--text-secondary); }
.af-discover-card-btn { padding: 7px 14px; font-size: 13px; }
.af-discover-card-desc {
    margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-secondary);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.af-discover-cta {
    display: flex; align-items: center; gap: 14px; width: 100%;
    padding: 12px 14px; text-align: left; cursor: pointer;
    background: var(--bg-secondary); color: var(--text-primary);
    border: 1px solid var(--border); border-radius: var(--radius-md);
    transition: border-color var(--transition), background var(--transition);
}
.af-discover-cta:hover { border-color: var(--border-hover); background: var(--bg-hover); }
.af-discover-cta-icon {
    flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-surface); color: var(--accent);
}
.af-discover-cta-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.af-discover-cta-title { font-size: 14.5px; font-weight: 700; }
.af-discover-cta-sub { font-size: 12.5px; color: var(--text-secondary); }
.af-discover-cta-arrow { flex-shrink: 0; color: var(--text-muted); transition: transform var(--transition), color var(--transition); }
.af-discover-cta:hover .af-discover-cta-arrow { transform: translateX(3px); color: var(--text-primary); }

/* ─── Friends Search & Count ─── */
.friends-list-wrapper {
    display: flex; flex-direction: column; flex: 1; overflow: hidden;
}
.friends-search-bar {
    display: flex; align-items: center; gap: 8px;
    margin: 12px 20px 0; padding: 7px 10px;
    background: var(--bg-input); border-radius: var(--radius-sm);
    border: 1px solid var(--border); transition: border-color var(--transition), box-shadow var(--transition);
}
.friends-search-bar:hover { border-color: rgba(6,182,212,0.22); }
.friends-search-bar:focus-within {
    border-color: rgba(6,182,212,0.6);
    box-shadow: 0 0 0 3px rgba(6,182,212,0.09), 0 0 0 5px rgba(139,92,246,0.06);
}
.friends-search-bar input {
    flex: 1; font-size: 13px; color: var(--text-primary);
    background: none; border: none; outline: none;
}
.friends-search-bar input::placeholder { color: var(--text-muted); }

.friends-count-label {
    padding: 14px 24px 6px; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-muted); user-select: none;
}

.friends-list-main { flex: 1; overflow-y: auto; padding: 8px 16px; }

.friends-list { flex: 1; overflow-y: auto; padding: 4px 0; }

.friend-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; margin: 1px 0;
    border-radius: var(--radius-sm); cursor: pointer;
    transition: background var(--transition);
    border-bottom: 1px solid var(--border);
}
.friend-item:hover { background: var(--bg-hover); }
.friend-item:last-child { border-bottom: none; }

.friend-avatar {
    width: 38px; height: 38px; border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px; color: white; flex-shrink: 0;
    position: relative;
}
.friend-avatar .status-dot {
    position: absolute; bottom: -1px; right: -1px;
    width: 12px; height: 12px; border-radius: 50%;
    border: 2.5px solid var(--bg-secondary);
}

.friend-info { flex: 1; overflow: hidden; }
.friend-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-username { font-size: 11px; color: var(--text-muted); }

.friend-actions { display: flex; gap: 4px; }
.friend-action-btn {
    width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-full); cursor: pointer; color: var(--text-secondary);
    transition: all var(--transition); background: var(--bg-surface);
}
.friend-action-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.friend-action-btn.accept:hover { background: var(--online); color: white; }
.friend-action-btn.reject:hover { background: var(--dnd); color: white; }
.friend-action-btn.dm:hover { background: var(--accent); color: white; }
/* Satır hover'ında ve KLAVYE odağında görünür. Gizli hâl display:none DEĞİL (Tab odağı alamazdı): akış dışı + tamamen
   kırpık → yer kaplamaz, görünmez, tıklanamaz; iki özellik de kesikli olduğundan hover'daki anlık görünüş aynı kalır. */
.remove-friend-btn { position: absolute; clip-path: inset(50%); }
.friend-item:hover .remove-friend-btn, .remove-friend-btn:focus-visible { position: static; clip-path: none; }

.friends-empty {
    min-height: 220px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center;
    padding: 32px 24px;
}
.friends-empty-title {
    font-size: 15px; font-weight: 700; color: var(--text-primary, #f2f3f5); margin-bottom: 8px;
}
.friends-empty-text {
    max-width: 380px; font-size: 13px; line-height: 1.45; color: var(--text-muted, #b5bac1);
}

/* Arkadaş Ekle alt-mesajı giriş/çıkış geçiş animasyonları (art arda mesajlar arası) */
@keyframes afStatusIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes afStatusOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-5px); } }
.friend-req-status {
    font-size: 13px;
    line-height: 1.4;
    border-radius: 6px;
    overflow: hidden;
    transition: margin 0.15s ease, padding 0.15s ease;
}
.friend-req-status:empty { margin: 0; padding: 0; }
.friend-req-status.success,
.friend-req-status.error {
    margin-top: 12px;
    padding: 9px 12px 9px 34px;
    position: relative;
}
.friend-req-status.success {
    background: rgba(59,165,93,0.12);
    border: 1px solid rgba(59,165,93,0.30);
    color: var(--tint-green, #57f287);
}
.friend-req-status.success::before {
    content: '✓';
    position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
    font-size: 13px; font-weight: 700; color: #3ba55d;
}
.friend-req-status.error {
    background: rgba(237,66,69,0.10);
    border: 1px solid rgba(237,66,69,0.30);
    color: #ed4245;
}
.friend-req-status.error::before {
    content: '✕';
    position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
    font-size: 12px; font-weight: 700; color: #ed4245;
}
.input-with-prefix.is-error {
    border-color: rgba(237,66,69,0.6);
    box-shadow: 0 0 0 3px rgba(237,66,69,0.15);
}

/* ─── Friends View Body (list + active now sidebar) ─── */
.friends-view-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}
.friends-view-body .friends-list-main {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px;
}

/* ─── Active Now Sidebar ─── */
.active-now-sidebar {
    width: 340px;
    min-width: 340px;
    border-left: 1px solid var(--border);
    padding: 16px;
    overflow-y: auto;
    background: var(--bg-primary);
    user-select: none;
    -webkit-user-select: none;
}
.active-now-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}
.active-now-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--transition);
    margin-bottom: 4px;
    background: var(--bg-secondary);
}
.active-now-card:hover {
    background: var(--bg-hover);
}
.active-now-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
    position: relative;
}
.active-now-avatar .status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2.5px solid var(--bg-secondary);
}
.active-now-info {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}
.active-now-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.active-now-activity {
    font-size: 12px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}
.active-now-activity .activity-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--online);
    flex-shrink: 0;
}
.active-now-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-muted);
}
.active-now-icon svg {
    width: 20px;
    height: 20px;
}
.active-now-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 20px 8px;
    line-height: 1.5;
}
.active-now-empty-sub {
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.7;
}

/* Voice Activity Card */
.active-now-voice-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
}
.active-now-voice-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px 8px;
}
.active-now-voice-avatars {
    display: flex;
    flex-shrink: 0;
}
.active-now-voice-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: white;
    border: 2px solid var(--bg-secondary);
    margin-right: -8px;
}
.active-now-voice-avatar:last-child {
    margin-right: 0;
}
.active-now-voice-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.active-now-voice-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.active-now-voice-label {
    font-size: 11px;
    color: var(--online);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}
.active-now-voice-label svg {
    width: 8px;
    height: 8px;
}
.active-now-voice-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 10px;
    background: rgb(0 0 0 / calc(0.15 * var(--shade-k)));
    border-top: 1px solid var(--border);
    cursor: pointer;
    transition: background var(--transition);
}
.active-now-voice-bottom:hover {
    background: rgb(0 0 0 / calc(0.25 * var(--shade-k)));
}
.active-now-voice-channel-icon {
    flex-shrink: 0;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}
.active-now-voice-channel-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.active-now-voice-server {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.active-now-voice-channel {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.active-now-vc-users {
    display: flex;
    flex-shrink: 0;
    align-items: center;
}
.active-now-vc-user {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 10px;
    color: white;
    border: 2px solid var(--bg-secondary);
    margin-right: -6px;
}
.active-now-vc-user:last-child {
    margin-right: 0;
}
.active-now-vc-extra {
    font-size: 10px;
    color: var(--text-muted);
    margin-left: 4px;
}

/* ─── Sidebar Section ────────────────── */
.sidebar-section { flex: 1; overflow-y: auto; padding: 8px 0; }
.section-header {
    display: flex; align-items: center; gap: 4px; padding: 8px 14px;
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.8px; color: var(--text-muted); cursor: pointer; user-select: none;
}
.section-header:hover { color: var(--text-secondary); }
.section-header .section-arrow {
    transition: transform var(--transition); flex-shrink: 0;
}
.section-header.collapsed .section-arrow {
    transform: rotate(-90deg);
}
.section-add-btn {
    margin-left: auto; display: flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border-radius: 4px;
    color: var(--text-muted); cursor: pointer; background: none;
    transition: all var(--transition); flex-shrink: 0;
}
.section-add-btn:hover { color: var(--text-primary); background: var(--bg-hover); }
.channel-list { overflow: hidden; transition: max-height 0.25s ease, opacity 0.2s ease; }
.channel-list.collapsed-list { max-height: 0 !important; opacity: 0; pointer-events: none; }
/* Suppress transitions during programmatic state restore (e.g. server switch) */
.no-collapse-transition,
.no-collapse-transition * { transition: none !important; animation: none !important; }
/* Hide the container during chat-switch scroll restore to prevent intermediate paints */
#messages-container.chat-restore-silent {
    visibility: hidden;
    scroll-behavior: auto !important;
    overflow-anchor: none;
}
/* Suppress smooth scroll and CSS transitions during chat-switch scroll restore */
#messages-container.no-scroll-restore-animation,
#messages-container.no-scroll-restore-animation * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
}
/* Suppress message item transitions for 120 ms after reveal to prevent flash on first paint */
#messages-container.chat-restoring-no-item-motion .message,
#messages-container.chat-restoring-no-item-motion .message *,
#messages-container.chat-restoring-no-item-motion .day-divider {
    animation: none !important;
    transition: none !important;
}

.channel-item {
    display: flex; align-items: center; gap: 8px;
    /* 5100 paritesi: yatay padding 14 -> 8 (ikon+ad sol kenara, hover aksiyonlari
       sag kenara yaklasir). DIKEY padding ve `height` DEGISMEDI -> satir 32px. */
    height: 32px; padding: 7px 8px; margin: 1px 8px;   /* SABİT yükseklik: hover aksiyon butonları (22px) satırı BÜYÜTMESİN (border-box) */
    border-radius: var(--radius-sm);
    cursor: pointer; color: var(--text-secondary);
    transition: all var(--transition); font-size: 14px;
    position: relative;
    user-select: none; -webkit-user-select: none;
}
.channel-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.channel-item.active {
    background: var(--accent-soft); color: var(--accent);
}
/* İkon 20x18 ortalı kutu (height satırı şişirmez) — ses kanalıyla AYNI satır yüksekliği için */
.channel-item .channel-icon { font-size: 18px; opacity: 0.5; flex-shrink: 0; width: 20px; height: 18px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.channel-item.active .channel-icon { opacity: 1; }
.channel-item .channel-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; line-height: 18px; }
.channel-delete-btn {
    display: none; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 4px;
    color: var(--text-muted); cursor: pointer; background: none;
    flex-shrink: 0; transition: all var(--transition);
}
.channel-item:hover .channel-delete-btn { display: flex; }
.channel-delete-btn:hover { color: var(--dnd); background: rgba(239,68,68,0.12); }

.dm-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 16px 12px;
    gap: 6px;
}
.dm-empty-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary, #f2f3f5);
    line-height: 1.3;
}
.dm-empty-desc {
    font-size: 12px;
    color: var(--text-muted, #b5bac1);
    line-height: 1.35;
    max-width: 190px;
}

.dm-item {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 12px; margin: 1px 8px;
    border-radius: var(--radius-sm); cursor: pointer;
    transition: background var(--transition);
    position: relative;
}
.dm-item:hover { background: var(--bg-hover); }
.dm-item.active { background: var(--bg-active); }

.dm-remove-btn {
    display: none; position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    font-size: 14px; padding: 4px 6px; border-radius: var(--radius-sm);
    line-height: 1; z-index: 2;
}
.dm-remove-btn:hover { color: var(--text-primary); background: none; }
.dm-item:hover .dm-remove-btn { display: flex; }
.dm-item:hover .dm-unread { display: none; }
/* Sabitlenmiş DM göstergesi (Batch 3A) — YALNIZ görsel; sıralama/semantik
   Batch 2B'de belirlenir. Okunmamış rozetiyle aynı kural: hover'da gizlenir ki
   "Sohbeti kaldır" (✕) butonuna yer açılsın (mevcut .dm-unread deseni). */
.dm-pin-indicator {
    display: flex; align-items: center; flex-shrink: 0;
    color: var(--text-muted);
    opacity: .75;
    pointer-events: none;   /* tıklama hedefi satırın kendisi kalır */
}
.dm-item:hover .dm-pin-indicator { display: none; }

/* Yazılı (resimsiz) sunucu ikonunun METNİ kendi kapsayıcısında kırpılır.
   Kırpma `.server-icon`in KENDİSİNE konulamaz: okunmamış rozeti ve ses
   göstergesi kutunun DIŞINA konumlanır, `overflow:hidden` onları keserdi. */
.server-icon-abbrev {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    line-height: 1;
    text-align: center;
    pointer-events: none;
}

.dm-avatar {
    width: 34px; height: 34px; border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; color: white;
    flex-shrink: 0; position: relative;
}
.dm-avatar .status-dot {
    position: absolute; bottom: -1px; right: -1px;
    width: 11px; height: 11px; border-radius: 50%;
    border: 2.5px solid var(--bg-secondary);
}
.dm-info { flex: 1; overflow: hidden; }
.dm-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-blocked .dm-name { opacity: 0.5; }
.dm-blocked-label { font-size: 11px; color: var(--dnd); font-weight: 600; opacity: 0.8; }
.dm-blocked .dm-avatar { opacity: 0.5; filter: grayscale(0.5); }
.dm-username { font-size: 11px; color: var(--text-muted); }
.dm-unread {
    background: var(--dnd); color: white; font-size: 10px; font-weight: 700;
    min-width: 18px; height: 18px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center; padding: 0 5px;
}

.search-results {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-tertiary, #111520);
    border: 1px solid var(--border); border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 380px; overflow-y: auto; z-index: 200; padding: 4px 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
.search-category-header {
    padding: 8px 16px 4px; font-size: 11px; font-weight: 700;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
}
.search-result-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 16px; cursor: pointer; border-radius: 4px; margin: 0 4px;
    transition: background var(--transition);
}
.search-result-item:hover, .search-result-item.keyboard-active { background: var(--bg-hover); }
.search-result-item .dm-avatar { width: 32px; height: 32px; min-width: 32px; font-size: 14px; }
.search-result-item .sr-status {
    font-size: 11px; color: var(--text-muted); margin-left: auto; flex-shrink: 0;
}
.search-no-results {
    padding: 20px 16px; text-align: center; color: var(--text-muted); font-size: 13px;
}

/* ─── User Panel ────────────────────── */
.user-panel {
    display: flex; align-items: center;
    padding: 10px 8px;
    margin: 0 8px 8px -64px;
    background: var(--bg-surface);
    border-radius: 14px;
    min-height: 56px;
    gap: 4px;
    position: relative;
    z-index: 1;
    border-top: 1px solid rgb(var(--overlay-rgb) / 0.055);
}
/* Underlay: fills the left gap (server rail bottom) with the sidebar background colour,
   visually unifying the user panel with the DM/channel sidebar.
   z-index:-1 within the user-panel stacking context sits BEHIND the panel's own
   background (invisible inside) but extends left outside the border-box — visible there. */
.user-panel::before {
    content: '';
    position: absolute;
    z-index: -1;
    left: -80px;   /* past the 72 px server rail left edge */
    right: 0;
    top: -8px;     /* cover the margin gap above */
    bottom: -8px;  /* cover the margin gap below */
    background: var(--bg-secondary);
    pointer-events: none;
}
/* When voice-panel or dm-call-panel is visible above, square off the top of user-panel
   and add a thin internal divider — making the two look like one unified block. */
#voice-panel:not(.hidden) ~ .user-panel,
#dm-call-panel:not(.hidden) ~ .user-panel {
    border-radius: 0 0 14px 14px;
    border-top: 1px solid rgb(var(--overlay-rgb) / 0.07);
}
.user-info { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; overflow: hidden; cursor: pointer; user-select: none; -webkit-user-select: none; padding: 6px 6px; border-radius: 6px; transition: background 0.12s; }
.user-info:hover { background: rgb(var(--overlay-rgb) / 0.08); }
.user-avatar {
    width: 32px; height: 32px; border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; color: white; flex-shrink: 0;
}
.user-details { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.user-display-name { font-size: 13px; font-weight: 600; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-primary); }
.user-username { font-size: 11px; color: var(--text-muted); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#user-username-display { display: none; }
.user-actions { display: flex; gap: 4px; align-items: center; flex-shrink: 0; margin-left: 4px; }
.icon-btn.panel-muted { color: var(--dnd); position: relative; }
.icon-btn.panel-muted svg line.mute-slash {
    stroke: var(--dnd); stroke-width: 3;
}

.icon-btn {
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); cursor: pointer; color: var(--text-secondary);
    transition: all var(--transition);
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
/* Muted/deafened active-danger state: red tint background + red icon */
.icon-btn.panel-muted { background: rgba(237,66,69,0.15); color: var(--dnd) !important; }
/* E5C (Karar #39): sunucu-kilitli mute/deafen — kalıcı sunucu kısıtlaması aktifken
   buton kırmızı halkalı görünür (local tercihten görsel olarak ayrışır; tooltip
   "Sunucu tarafından susturuldun/sağırlaştırıldın"). Davranış app.js'te. */
.icon-btn.server-locked {
    box-shadow: 0 0 0 1.5px var(--dnd);
    background: rgba(237,66,69,0.22);
}
/* Scoped status-dot and avatar tweaks for user panel */
.user-panel .user-status-dot { border-color: var(--bg-surface); }
.user-panel .user-avatar { box-shadow: 0 0 0 2px rgb(var(--overlay-rgb) / 0.08); transition: box-shadow 0.15s ease; }
/* Speaking ring on the bottom-left profile — set while the user REALLY speaks in a server voice channel or a DM call */
.user-panel .user-avatar.speaking { box-shadow: 0 0 0 2px var(--accent), 0 0 8px rgba(6, 182, 212, 0.45); }

/* ─── Chat Area ────────────────────── */
.chat-members-wrapper { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg-tertiary); }
.chat-members-content { display: flex; flex: 1; min-height: 0; }
.chat-area { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; }

/* ─── Top Navigation Toolbar ─── */
.app-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    height: 32px;
    min-height: 32px;
    padding: 0 120px 0 12px;
    background: var(--bg-tertiary, #111520);
    border-bottom: 1px solid var(--border);
    user-select: none;
    -webkit-user-select: none;
}
.toolbar-left {
    display: flex;
    align-items: center;
    gap: 4px;
    -webkit-app-region: no-drag;
    flex-shrink: 0;
}
.toolbar-nav-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    padding: 0;
}
.toolbar-nav-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}
.toolbar-nav-btn:disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}
.toolbar-nav-btn:disabled:hover {
    background: none;
    color: var(--text-muted);
}
.toolbar-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    pointer-events: none;
}
.toolbar-center .toolbar-breadcrumb {
    pointer-events: auto;
}
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
    -webkit-app-region: no-drag;
    padding-right: 4px;
}
.toolbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}
.toolbar-breadcrumb-icon {
    opacity: 0.6;
}

/* ── Toolbar separator ── */
.toolbar-separator {
    width: 1px;
    height: 16px;
    background: rgb(var(--overlay-rgb) / 0.1);
    margin: 0 4px;
    flex-shrink: 0;
}

/* ── Window Control Buttons (frameless mode) ── */
.window-controls {
    display: flex;
    align-items: center;
    height: 32px;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 9999;
    -webkit-app-region: no-drag;
}
.window-ctrl-btn {
    width: 36px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    padding: 0;
    border-radius: 4px;
    margin: 2px 1px;
}
.window-ctrl-btn:hover {
    background: rgb(var(--overlay-rgb) / 0.1);
    color: var(--text-primary);
}
.window-ctrl-close:hover {
    background: #e81123;
    color: #fff;
}

.chat-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px; height: 49px; min-height: 49px;
    border-bottom: 1px solid var(--border);
    background: rgb(var(--bg-tertiary-rgb) / 0.6);
    backdrop-filter: blur(12px);
    position: relative; z-index: 110;
}
.chat-header-left { display: flex; align-items: center; gap: 8px; }
.chat-header-left h3 { font-size: 15px; font-weight: 700; }
.chat-subtitle { font-size: 12px; color: var(--text-muted); margin-left: 4px; }
.header-icon { display: flex; align-items: center; }
/* DM header mini avatar + status dot */
.dm-header-av-wrap { position: relative; flex-shrink: 0; transition: opacity 0.12s; }
.dm-header-av-wrap:hover { opacity: 0.8; }
.dm-header-avatar {
    width: 26px; height: 26px;
    border-radius: 50%;
    font-size: 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
}
.dm-header-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.dm-header-status-dot {
    position: absolute; bottom: -1px; right: -1px;
    width: 9px; height: 9px;
    border-radius: 50%;
    border: 2px solid var(--bg-tertiary, #1e1f22);
    pointer-events: none;
}
.chat-header-right { display: flex; align-items: center; gap: 4px; }

/* WELCOME-EMPTY-STATE-1: sade boş durum — blok soluklaştırılmaz, degrade metin YOK; hiyerarşi tema token'larıyla.
   İkon uygulama (marka) ikonudur (/app-icon.png, kendi squircle zemini var → ek karo / çerçeve / gölge YOK;
   rail home ve giriş ekranındaki gibi her temada AYNI marka görüntüsü). */
.welcome-state {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 32px 24px; text-align: center;
}
.welcome-icon { margin-bottom: 20px; line-height: 0; }
.welcome-icon img { display: block; width: 64px; height: 64px; user-select: none; }
.welcome-state h2 { margin: 0 0 8px; font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--text-primary); text-wrap: balance; }
.welcome-state p { margin: 0; max-width: 360px; font-size: 14px; line-height: 1.5; color: var(--text-secondary); text-wrap: balance; }

.messages-container { flex: 1; overflow-y: auto; padding: 16px 0; display: flex; flex-direction: column;
    overflow-anchor: none; /* prevent browser scroll-anchoring from shifting position on layout changes */
    /* Firefox: hide scrollbar at rest, show on hover */
    scrollbar-width: thin;
    scrollbar-color: transparent transparent; }
/* Voice lobby is now a direct child of .chat-area (decoupled from #messages-container) so it can
   stay in the MAIN area while the real chat (#messages-container) is relocated into the right
   voice-chat sidebar. The lobby has flex:1 + its own gradient and fills the area; #messages-container
   is hidden by JS while the lobby is shown (mutually-exclusive siblings → only one visible). */
/* When the chat sidebar is OPEN, round the voice lobby's RIGHT corners so the colourful lobby
   reads as a rounded surface facing the (also rounded) chat card across the gap. Left corners
   stay flush against the channel list. Sidebar closed → :has() no match → square, full-width. */
body:has(#voice-chat-sidebar:not(.hidden)) #voice-lobby:not(.hidden) {
    border-top-right-radius: 14px;
    border-bottom-right-radius: 14px;
}
/* Keep layout space but stay invisible until scrollTop is primed at the correct position */
.messages-container.scroll-priming { visibility: hidden; }

/* ── Messages scrollbar — hidden at rest, visible on hover ── */
/* WebKit/Blink (Chrome, Edge, Safari): reserve 9px gutter, keep thumb transparent */
.messages-container::-webkit-scrollbar { width: 9px; }
.messages-container::-webkit-scrollbar-track { background: transparent; }
.messages-container::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 999px;
    border: 2px solid transparent; /* padding trick keeps thumb thinner than the gutter */
    background-clip: padding-box;
}
/* Reveal on hover — fires when the pointer is anywhere over messages-container */
.messages-container:hover {
    scrollbar-color: rgb(var(--overlay-rgb) / 0.26) transparent;
}
.messages-container:hover::-webkit-scrollbar-thumb {
    background: rgb(var(--overlay-rgb) / 0.26);
    background-clip: padding-box;
}
.messages-container:hover::-webkit-scrollbar-thumb:hover {
    background: rgb(var(--overlay-rgb) / 0.4);
    background-clip: padding-box;
}
.messages { display: flex; flex-direction: column; padding: 0 16px; gap: 1px; margin-top: auto; }

.message {
    display: flex; gap: 14px; padding: 6px 8px;
    position: relative; border-radius: var(--radius-sm);
    transition: background 0.15s;
}
.message:hover { background: rgb(var(--overlay-rgb) / 0.02); }

/* Subtle left accent on own messages */
.message[data-own="1"] { border-left: 2px solid transparent; }
.message[data-own="1"]:hover { border-left-color: var(--accent); }

/* ── AKTİF MESAJ KİLİDİ ────────────────────────────────────────────────────
   Bağlam menüsü (.ctx-active) veya tepki picker'ı (.reaction-picker-open) bir mesaja
   aitken: O mesajın hover vurgusu menü/picker kapanana kadar AÇIK kalır ve başka
   mesajlara hover ne gri arka plan ne de sol aksan verir. Ayrı state YOK — mevcut iki
   sınıf (hideCtxMenu / _clearPickerOpenState merkezî olarak temizler) ve mevcut
   body.ctx-menu-open senkronu kullanılır → kapanınca normal hover kendiliğinden döner. */
.message.ctx-active,
.message.reaction-picker-open { background: rgb(var(--overlay-rgb) / 0.02); }
.message[data-own="1"].ctx-active,
.message[data-own="1"].reaction-picker-open { border-left-color: var(--accent); }
body.ctx-menu-open .message:hover:not(.ctx-active) { background: transparent; }
body.ctx-menu-open .message[data-own="1"]:hover:not(.ctx-active) { border-left-color: transparent; }
body:has(.message.reaction-picker-open) .message:hover:not(.reaction-picker-open) { background: transparent; }
body:has(.message.reaction-picker-open) .message[data-own="1"]:hover:not(.reaction-picker-open) { border-left-color: transparent; }

.message.grouped { padding: 1px 8px 1px 62px; }

.message-avatar {
    width: 40px; height: 40px;
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 16px; color: white;
    flex-shrink: 0; margin-top: 2px; cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    user-select: none; -webkit-user-select: none;
}
.message-avatar:hover { transform: scale(1.08); box-shadow: 0 0 0 3px var(--accent-soft); }

.message-content { flex: 1; min-width: 0; user-select: text; -webkit-user-select: text; }
/* SATIR-İÇİ akış (flex DEĞİL): tarayıcının kopyalama/innerText serileştirmesi flex çocuklarını
   blok gibi ele alıp yazar adı ile saati ayrı satırlara koyuyordu — inline akışta "admin111 22:52"
   tek satır kopyalanır. Görünüm birebir: baseline hizası inline'da doğal, eski gap:8px'in dengi
   margin (4px) + span'ler arası doğal boşluk (~4px). */
.message-header { display: block; margin-bottom: 2px; }
.message-header > * + * { margin-left: 4px; }
.message-author { font-weight: 700; font-size: 14px; cursor: pointer; transition: opacity 0.15s; user-select: text; -webkit-user-select: text; color: var(--text-primary); }
.message-author:hover { opacity: 0.8; }
.message-timestamp { font-size: 11px; color: var(--text-muted); font-weight: 400; user-select: text; -webkit-user-select: text; }
.message-text {
    color: var(--text-primary); font-size: 14px; line-height: 1.55;
    word-wrap: break-word; overflow-wrap: break-word;
    white-space: pre-wrap;
    user-select: text; -webkit-user-select: text;
}
.message-text a { color: var(--text-link); }
/* Silme onayı önizlemesindeki linkler de sohbetteki gibi mavi */
.delete-preview-text a { color: var(--text-link); }
.message-text code {
    background: rgb(var(--overlay-rgb) / 0.06); padding: 2px 6px;
    border-radius: 4px; font-size: 13px; font-family: 'Consolas', 'Monaco', monospace;
}
/* "İletildi" label — shown above the text of messages sent via the İlet (forward) action */
.message-forwarded .message-text::before {
    content: "↪ İletildi";
    display: block;
    font-size: 11px;
    font-weight: 500;
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 3px;
    user-select: none;
}

.edited-tag { font-size: 11px; color: var(--text-muted); font-weight: 400; user-select: none; }

/* Emoji-only messages (wumboji) */
.msg-wumboji {
    display: block;
    font-size: 48px;
    line-height: 1.15;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
    user-select: text;
}

.message-actions {
    position: absolute; top: -16px; right: 8px;   /* mesajın üst kenarının biraz ÜZERİNDE (Discord) */
    display: none; gap: 1px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 3px; box-shadow: var(--shadow);
    user-select: none; -webkit-user-select: none;
}
.message:hover .message-actions { display: flex; }
/* Mesajın bağlam menüsü AÇIKKEN çubuk görünür kalır (fare çubuktan menüye geçerken kaybolmaz). */
.message.ctx-active .message-actions { display: flex; }
/* Hızlı emojiler | aksiyonlar ayracı — ince, kısa, mevcut kenarlık rengiyle uyumlu. */
.message-actions .msg-action-sep {
    flex: 0 0 auto; align-self: center;
    width: 1px; height: 18px; margin: 0 5px;
    background: var(--border); border-radius: 1px;
}
/* ── 6) Bir bağlam menüsü AÇIKKEN yalnız menünün ait olduğu mesajın çubuğu görünür;
   başka mesaja hover çubuk AÇMAZ. Menü kapanınca normal hover davranışı geri gelir. */
body.ctx-menu-open .message:hover .message-actions { display: none; }
body.ctx-menu-open .message.ctx-active .message-actions { display: flex; }
/* Tepki picker'ı bu mesaj için açıkken çubuk görünür kalır (mevcut reaction-picker-open sınıfı;
   _clearPickerOpenState merkezî olarak temizler); başka mesaja hover çubuk AÇMAZ. */
.message.reaction-picker-open .message-actions { display: flex; }
body:has(.message.reaction-picker-open) .message:hover:not(.reaction-picker-open) .message-actions { display: none; }
.msg-action-btn {
    width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    border-radius: 6px; cursor: pointer; color: var(--text-secondary);
    transition: all var(--transition);
}
.msg-action-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
/* Hover çubuğundaki hızlı tepki emojileri (en çok kullanılanlar) — mevcut buton kutusu, emoji glyph'i */
.msg-action-btn.msg-quick-react { font-size: 18px; line-height: 1; }
/* 3 hızlı emoji BİTİŞİK bir grup gibi dursun (aradaki 1px gap kapatılır; ayraç korunur). */
.message-actions .msg-quick-react + .msg-quick-react { margin-left: -1px; }
.msg-action-btn.delete-btn:hover { background: rgba(239,68,68,0.15); color: var(--dnd); }

.message.grouped .inline-timestamp {
    display: none; font-size: 10px; color: var(--text-muted);
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    font-weight: 500; user-select: none; -webkit-user-select: none;
}
.message.grouped:hover .inline-timestamp { display: block; }
/* Aktif mesaj kilidi (bkz. AKTİF MESAJ KİLİDİ): menü/tepki picker'ı açıkken BAŞKA mesajlara
   hover ne gri arka plan, ne çubuk, ne de saat gösterir — yalnız aktif mesajın görünümü korunur.
   AKTİF mesajın saati ise fare mesajdan ayrılsa da (menü/picker üzerindeyken) hover'daymış gibi
   GÖRÜNÜR kalır; overlay kapanınca (sınıf kalkınca) normal hover davranışına döner — JS state yok. */
.message.grouped.ctx-active .inline-timestamp,
.message.grouped.reaction-picker-open .inline-timestamp { display: block; }
body.ctx-menu-open .message.grouped:hover:not(.ctx-active) .inline-timestamp { display: none; }
body:has(.message.reaction-picker-open) .message.grouped:hover:not(.reaction-picker-open) .inline-timestamp { display: none; }

/* Extra visual breathing room before the start of each new message group */
.message.grouped + .message:not(.grouped):not(.system-pin-msg):not(.system-call-msg) {
    margin-top: 8px;
}

.day-divider {
    display: flex; align-items: center; gap: 16px;
    margin: 20px 0; color: var(--text-muted);
    font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
    user-select: none; pointer-events: none; cursor: default;
}
.day-divider::before, .day-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ─── Channel & DM Start States ─────────────────────────────────────────────── */
.channel-start-state,
.dm-start-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 48px 32px 32px;
    max-width: 480px;
    margin: 0 auto;
    gap: 10px;
}

/* Channel icon */
.start-state-icon svg {
    width: 72px;
    height: 72px;
    animation: ss-icon-pulse 3s ease-in-out infinite;
}
@keyframes ss-icon-pulse {
    0%, 100% { filter: drop-shadow(0 0 6px rgba(88,101,242,0.35)); }
    50%       { filter: drop-shadow(0 0 16px rgba(88,101,242,0.65)); }
}

.start-state-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 4px 0 0;
    line-height: 1.3;
}
.start-state-ch-name { color: var(--accent, #5865f2); }

.start-state-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 380px;
    margin: 0;
}

.start-state-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.start-state-card {
    --ss-icon-box: 21px;   /* = butonun MEVCUT icerik yuksekligi (olculdu) */
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-secondary, #2b2d31);
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.start-state-card:hover {
    background: var(--bg-hover, rgba(255,255,255,0.06));
    color: var(--text-primary);
    border-color: rgba(88,101,242,0.4);
}
/* Ikon kutusu: SABIT kare + glif ortada. `line-height: 1` emoji satir
   kutusundaki asimetrik bosluğu (leading) kaldirir; boylece farkli ikonlar
   (emoji vs inline SVG) ayni dikey merkezi ve ayni yazi baslangicini verir. */
.start-state-card-icon {
    flex: 0 0 auto;
    width: var(--ss-icon-box); height: var(--ss-icon-box);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 16px;
    line-height: 1;
}
/* Bu ekrandaki SVG ikonlarin ortak olcusu (emoji gliflerin gorsel agirligiyla
   ayni: 16px). Kilit rozeti bir ALT satirdaki kendi kurallariyla 15px kalir —
   ayni ozgullukte oldugu icin KAYNAK SIRASI belirler, bu kural ONDE durmali. */
.start-state-card-icon svg { width: 16px; height: 16px; display: block; }
/* 5100 paritesi: ozel kanalda BUYUK ikonun uzerine kilit rozeti. Kutu akisa
   girmez (absolute) -> baslik/aciklama konumu KAYMAZ. */
.start-state-icon { position: relative; display: inline-flex; color: #5865F2; }
.start-state-icon .start-state-lock {
    position: absolute; right: -2px; bottom: -2px;
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--bg-secondary, #2b2d31);
    border: 2px solid var(--bg-primary, #1e1f22);
    color: var(--text-secondary);
}
.start-state-icon .start-state-lock svg { width: 14px; height: 14px; display: block; }
/* "Kimler erisebilir?" kartinin ikonu: emoji DEGIL cizgi-ikon (accent). */
.start-state-card-lock { display: inline-flex; color: var(--accent); }
.start-state-card-lock svg { width: 15px; height: 15px; display: block; }

/* DM start state */
.dm-start-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.dm-start-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--bg-tertiary, #1e1f22);
    flex-shrink: 0;
    overflow: hidden;
}
.dm-start-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.dm-start-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 4px;
}
.dm-start-uname { font-size: 13px; color: var(--text-muted); }

.dm-start-illustration { margin: 4px 0; animation: float-void 3.5s ease-in-out infinite; }
.dm-start-bot-svg {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 0 10px rgba(88,101,242,0.35));
}
@keyframes float-void {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.dm-start-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 340px;
    margin: 0;
}
.dm-start-desc strong { color: var(--text-secondary); font-weight: 600; }

.dm-start-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}
.dm-start-cta {
    padding: 10px 22px;
    background: var(--accent, #5865f2);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}
.dm-start-cta:hover { background: var(--accent-hover, #4752c4); transform: translateY(-1px); }

.dm-start-friend-btn {
    padding: 10px 22px;
    background: var(--bg-secondary, #2b2d31);
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.dm-start-friend-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

.dm-start-friend-btn.is-pending {
    opacity: 0.55;
    cursor: default;
    pointer-events: none;
    background: var(--bg-secondary, #2b2d31);
    color: var(--text-muted, #b5bac1);
    border-color: transparent;
}
.dm-start-friend-btn.is-pending:hover {
    background: var(--bg-secondary, #2b2d31);
    color: var(--text-muted, #b5bac1);
    filter: none;
    transform: none;
}

.channel-beginning {
    display: flex; align-items: center; gap: 16px;
    margin: 20px 0 4px; color: var(--text-muted);
    font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
    user-select: none; pointer-events: none; cursor: default;
}
.channel-beginning::before, .channel-beginning::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Persistent conversation intro (top of chat history) ─────────────────────
   Left-aligned, flows above the oldest message (Discord-like, VoidChat themed).
   Distinct from the centered .channel-start-state / .dm-start-state empty card. */
.chat-intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 28px 8px 14px;
    margin: 0 0 4px;
}
.chat-intro-icon {
    display: flex; align-items: center; justify-content: center;
    width: 64px; height: 64px; border-radius: var(--radius-full);
    font-size: 34px; font-weight: 800; line-height: 1;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid rgba(6, 182, 212, 0.28);
    margin-bottom: 2px;
}
.chat-intro-title {
    font-size: 26px; font-weight: 800;
    color: var(--text-primary);
    margin: 0; line-height: 1.2;
    word-break: break-word;
}
.chat-intro-hash { color: var(--text-muted); font-weight: 800; margin-right: 1px; }
.chat-intro-desc {
    font-size: 14px; color: var(--text-secondary);
    line-height: 1.45; margin: 0; max-width: 620px;
    word-break: break-word;
}
.chat-intro-desc strong { color: var(--text-primary); font-weight: 600; }
.chat-intro-uname { font-size: 13px; color: var(--text-muted); }
.chat-intro-dm-head { display: flex; align-items: center; gap: 14px; }
.chat-intro-avatar {
    width: 64px; height: 64px; border-radius: var(--radius-full);
    font-size: 26px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; overflow: hidden;
    border: 3px solid var(--bg-tertiary);
}
.chat-intro-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.chat-intro-dm-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chat-intro-mutual { font-size: 13px; color: var(--text-muted); }
.chat-intro-mutual.hidden { display: none; }
.chat-intro-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chat-intro-btn {
    padding: 7px 16px; border-radius: var(--radius-sm);
    background: var(--bg-surface); border: 1px solid var(--border);
    color: var(--text-secondary); font-size: 13px; font-weight: 600;
    cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chat-intro-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.chat-intro-btn--primary { background: var(--accent); border-color: transparent; color: #fff; }
.chat-intro-btn--primary:hover { background: var(--accent-hover); color: #fff; }
.chat-intro-btn--danger:hover { background: rgba(239, 68, 68, 0.12); color: var(--dnd); border-color: rgba(239, 68, 68, 0.4); }
.chat-intro-btn.is-pending { opacity: 0.55; cursor: default; pointer-events: none; }
@media (max-width: 600px) {
    .chat-intro { padding: 20px 6px 12px; }
    .chat-intro-title { font-size: 22px; }
    .chat-intro-icon, .chat-intro-avatar { width: 56px; height: 56px; }
    .chat-intro-icon { font-size: 28px; }
}

.message.deleting { animation: msgDelete 0.3s ease forwards; }
@keyframes msgDelete {
    to { opacity: 0; transform: translateX(-20px); height: 0; padding: 0; margin: 0; overflow: hidden; }
}

/* ─── Deleted Message Style ────────── */
.message.message-deleted { opacity: 0.5; }
.message.message-deleted:hover { background: transparent; }
.deleted-placeholder {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--text-muted); font-style: italic; font-size: 13px;
    user-select: none;
}
.deleted-placeholder svg { opacity: 0.6; }

/* ─── Blocked Message Style ────────── */
.message.message-blocked { opacity: 0.45; }
.message.message-blocked:hover { background: rgba(255, 80, 80, 0.04); }
.blocked-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--bg-tertiary) !important;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0; user-select: none;
}
.blocked-author { color: var(--text-muted) !important; font-style: italic; }
.blocked-text { color: var(--text-muted); font-style: italic; font-size: 13px; }

/* Collapsed blocked messages indicator */
.blocked-collapse {
    display: flex; align-items: center; gap: 14px;
    padding: 3px 8px;
    color: var(--text-muted);
    font-size: 14px;
    user-select: none;
    border-left: 2px solid var(--border);
    margin: 3px 0;
    transition: background 0.15s, border-color 0.15s;
    cursor: pointer;
}
.blocked-collapse:hover {
    background: rgb(var(--overlay-rgb) / 0.02);
    border-left-color: var(--text-muted);
}
.blocked-collapse-icon {
    width: 40px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    opacity: 0.6;
    transition: opacity 0.15s;
}
.blocked-collapse-sep { color: var(--text-muted); opacity: 0.4; font-size: 14px; }
.blocked-collapse-text {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 0.15s;
}
.blocked-collapse:hover .blocked-collapse-text { color: var(--text-primary); }
.blocked-collapse:hover .blocked-collapse-icon { opacity: 0.9; }
.blocked-collapse-show {
    color: var(--accent);
    font-size: 12px;
    cursor: pointer;
    transition: color 0.12s;
    opacity: 0.8;
}
.blocked-collapse-show:hover {
    color: var(--accent);
    opacity: 1;
    text-decoration: underline;
}
.message-blocked-hidden:not(.blocked-revealed) {
    user-select: none;
    pointer-events: none;
}
.message-blocked-hidden.blocked-revealed {
    display: flex !important;
    opacity: 0.75;
    background: rgb(var(--overlay-rgb) / 0.02);
    border-left: 2px solid var(--border);
}
.message-blocked-hidden.blocked-revealed:hover {
    background: rgb(var(--overlay-rgb) / 0.03);
}

/* ─── DM Blocked Bot Message ────────── */
.dm-blocked-message {
    background: rgba(237, 66, 69, 0.06) !important;
    border-left: 3px solid #ed4245;
    padding-left: 12px !important;
    opacity: 0.9;
}
.dm-blocked-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: #5865f2 !important;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0; user-select: none;
}
.dm-blocked-author { color: var(--brand) !important; font-weight: 600; }
.dm-blocked-bot-tag {
    /* İsimle AYNI hizada: inline-flex + center (Karar #33) + onay tiki için gap */
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: var(--brand);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: middle;
    align-self: center;
    line-height: 1;
    letter-spacing: 0.3px;
    cursor: default;
}
.dm-blocked-bot-tag .bot-tag-check { flex-shrink: 0; }

/* ─── VoidChat sistem botu (Karar #33) ─── */
.voidchat-bot-click { cursor: pointer; }
/* Bot avatarı: logo kendi gradyan karesini taşır — düz mavi daireyi ez */
.message-avatar.voidchat-bot-avatar {
    background: var(--bg-surface) !important;
    overflow: hidden;
}
.message-avatar.voidchat-bot-avatar svg { display: block; }
/* Bot kartı: bilgilendirme bölümü */
.pc-bot-info { display: flex; flex-direction: column; gap: 6px; padding: 10px 0 4px; }
.pc-bot-verified {
    display: flex; align-items: center; gap: 6px;
    color: var(--online); font-size: 12.5px; font-weight: 700;
}
.pc-bot-desc { font-size: 12.5px; color: var(--text-secondary); line-height: 1.45; }
.pc-bot-note { font-size: 11.5px; color: var(--text-muted); }
/* Bot kartında boş kalan aksiyon alanı + ayracı gizle */
.pc-bot-card #pc-large-actions { display: none; }
.pc-bot-card .pc-separator { display: none; }
.dm-blocked-text { color: var(--text-secondary); font-size: 13.5px; }
.dm-blocked-hint {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 4px;
    opacity: 0.7;
}
.dm-blocked-hint-sep {
    margin: 0 4px;
    color: var(--text-muted);
}
.dm-blocked-delete {
    background: none; border: none; cursor: pointer;
    color: #f23f42; font-size: 12px; font-weight: 600;
    padding: 0; text-decoration: none;
}
.dm-blocked-delete:hover { text-decoration: underline; }

/* ─── DM Failed Delivery Message ────────── */
.dm-failed-message {
    background: rgba(237, 66, 69, 0.06) !important;
    border-left: 3px solid #ed4245;
    padding-left: 12px !important;
    opacity: 0.85;
}
.dm-failed-tag {
    color: #ed4245;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}
.dm-failed-hint {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 4px;
    opacity: 0.7;
}

/* ─── DM Blocked Banner (disabled composer state) ────────── */
.dm-blocked-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 46px;
    margin: 0 16px 8px;
    padding: 8px 10px 8px 13px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-left: 3px solid rgba(248, 113, 113, 0.45);
    border-radius: var(--radius-md);
}
.dm-blocked-banner.hidden { display: none; }
.dm-blocked-banner-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}
.dm-blocked-banner-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: var(--radius-full);
    color: rgba(248, 113, 113, 0.85);
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.18);
}
.dm-blocked-banner-text {
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.35;
    min-width: 0;
}
.dm-blocked-unblock-btn {
    flex-shrink: 0;
    height: 32px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(6, 182, 212, 0.35);
    background: rgba(6, 182, 212, 0.06);
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition), border-color var(--transition), transform 100ms ease;
}
.dm-blocked-unblock-btn:hover {
    background: rgba(6, 182, 212, 0.12);
    border-color: rgba(6, 182, 212, 0.55);
}
.dm-blocked-unblock-btn:active { transform: translateY(1px); }
.dm-blocked-unblock-btn:focus-visible { outline: 2px solid rgba(6, 182, 212, 0.4); outline-offset: 2px; }
@media (max-width: 640px) {
    .dm-blocked-banner { flex-direction: column; align-items: stretch; gap: 10px; }
    .dm-blocked-unblock-btn { width: 100%; height: 36px; }
}

/* ─── Scroll-to-bottom Button ────────── */
/* ─── Jump to Present bar ─────────────────────────────────────────────────── */
.jump-to-present {
    position: absolute;
    bottom: calc(var(--composer-height, 72px) + 10px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid rgb(var(--overlay-rgb) / 0.1);
    border-radius: 20px;
    padding: 4px 4px 4px 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    cursor: pointer;
    z-index: 10;
    white-space: nowrap;
    animation: jtpSlideUp 0.18s ease;
    user-select: none; -webkit-user-select: none;
}
.jump-to-present:hover { background: var(--ui-surface-hover); }
.jump-to-present__label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-right: 10px;
}
.jump-to-present__cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 11px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    pointer-events: none;
    line-height: 1;
}
.jump-to-present:hover .jump-to-present__cta { filter: brightness(1.12); }
@keyframes jtpSlideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ─── Edit Banner ────────────────────── */
.edit-banner {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 16px;
    background: var(--accent-soft);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    font-size: 13px; font-weight: 600; color: var(--accent);
    margin: 0 16px;
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-bottom: none;
}
.edit-cancel-btn {
    margin-left: auto; font-size: 12px; font-weight: 600;
    color: var(--text-secondary); cursor: pointer;
    padding: 2px 8px; border-radius: 4px;
    transition: all var(--transition);
}
.edit-cancel-btn:hover { color: var(--text-primary); background: var(--bg-hover); }

/* Editing highlight on the message being edited */
.message.editing-highlight,
.message.replying-highlight {
    background: rgba(6, 182, 212, 0.1);
    border-left: 3px solid var(--accent);
    padding-left: 13px;
    border-radius: 4px;
    transition: background 0.3s ease;
}
/* Gruplanmış (başlıksız) mesaj düzenlenirken sol padding'i koru → sol .inline-timestamp (saat) metinle
   iç içe geçmesin. 59px + 3px border = normal grouped'un 62px'i. (Başlıklı ilk mesajda saat üstte, sorun yok.) */
.message.grouped.editing-highlight,
.message.grouped.replying-highlight { padding-left: 59px; }

/* ─── Typing ─────────────────────────── */
.typing-indicator {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 16px; font-size: 12px; color: var(--text-secondary);
    min-height: 24px;
}
.typing-dots { display: flex; gap: 3px; }
.typing-dots span {
    width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
    animation: typingBounce 1.4s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.3; }
    40% { transform: translateY(-5px); opacity: 1; }
}

/* ─── Input Area ─────────────────────── */
.message-input-area { padding: 0 16px 8px; position: relative; }

/* ─── Slowmode info bar ─────────────────────── */
.slowmode-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 14px 6px;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 2px;
}
.slowmode-bar.hidden { display: none; }
.slowmode-bar svg { flex-shrink: 0; opacity: 0.7; }
.slowmode-bar-bypass { opacity: 0.7; }
.slowmode-bar-countdown { color: var(--tint-amber, #f59e0b); }

/* ── Rate-limit warning bar (too-fast guard, near composer) ── */
/* Rate-limit uyarısı — toast'larla aynı şık dil: amber gradyan + sol vurgu + yumuşak glow + yuvarlak kart. */
.rate-limit-bar {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 2px 8px;
    padding: 9px 13px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.1px;
    color: var(--tint-amber, #fcd34d);
    background: linear-gradient(180deg, rgba(245,158,11,0.15), rgba(245,158,11,0.09));
    border: 1px solid rgba(245,158,11,0.30);
    border-left: 3px solid #f59e0b;
    border-radius: 9px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.32), 0 0 12px rgba(245,158,11,0.13);
}
.rate-limit-bar.hidden { display: none; }
.rate-limit-bar svg { flex-shrink: 0; width: 15px; height: 15px; color: var(--tint-amber, #fbbf24); opacity: 1; filter: drop-shadow(0 1px 2px rgba(245,158,11,0.35)); }
.rate-limit-bar.rl-anim { animation: rateLimitBarIn 0.25s cubic-bezier(0.34,1.4,0.6,1); }
@keyframes rateLimitBarIn {
    from { opacity: 0; transform: translateY(6px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
/* SPAM-WARNING-MODAL-1: hız sınırı ZORUNLU onay modalı (yalnız "Anladım" kapatır). Katman: ayarlar / hızlı geçiş /
   tepki modalının ÜSTÜNDE; toast ve ceza / yaptırım / zorunlu şifre / hukuk ekranlarının (9998+) ALTINDA.
   SPAM-WARNING-MODAL-UI-1 (yalnız görünüm): üst kenarda amber vurgu çizgisi + sıcak hale, halkalı ikon rozeti, başlık /
   metin hiyerarşisi, tam genişlik birincil düğme. Zemin / metin / ikon tema tokenlarından (Koyu / Açık / AMOLED); amber ve
   cyan vurgular yarı saydam (her zeminde aynı aile); gölge --shade-k ile ölçeklenir; reduced-motion'da hareket YOK. */
#spam-warning-modal { z-index: 9995; }
#spam-warning-modal .modal-backdrop { animation: spamWarnFade 0.2s ease; }
#spam-warning-modal .spam-warning-content {
    width: calc(100% - 32px);
    max-width: 400px;
    text-align: center;
    overflow: hidden;
    background: var(--surface-dialog, var(--ui-tertiary));
    background-image: radial-gradient(120% 56% at 50% 0%, rgba(245,158,11,0.10), transparent 70%);
    border: 1px solid rgb(var(--overlay-rgb) / 0.08);
    border-radius: var(--radius-lg);
    padding: 36px 28px 24px;
    box-shadow: 0 24px 64px rgb(0 0 0 / calc(0.5 * var(--shade-k))), 0 4px 14px rgb(0 0 0 / calc(0.3 * var(--shade-k)));
    animation: spamWarnIn 0.34s cubic-bezier(0.16, 1, 0.3, 1);
}
/* Üst kenarda ortadan sönen amber çizgi (kap overflow:hidden → köşe yarıçapına kırpılır; tıklamayı yutmaz). */
#spam-warning-modal .spam-warning-content::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(245,158,11,0.85) 50%, transparent);
    pointer-events: none;
}
/* Programatik odak alan kap (tabindex=-1): halka düğmede (#206), kutuda değil. */
#spam-warning-modal .spam-warning-content:focus { outline: none; }
#spam-warning-modal .spam-warning-icon {
    width: 56px; height: 56px;
    margin: 0 auto 20px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: var(--tint-amber, #fbbf24);
    background: rgba(245,158,11,0.14);
    box-shadow: 0 0 0 8px rgba(245,158,11,0.06), inset 0 0 0 1px rgba(245,158,11,0.28);
    animation: spamWarnBadgeIn 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) 0.08s both;
}
#spam-warning-modal .spam-warning-icon svg { width: 28px; height: 28px; }
#spam-warning-modal .spam-warning-content h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.2px; color: var(--ui-text-header); margin: 0 0 8px; line-height: 1.3; }
#spam-warning-modal .spam-warning-content p { max-width: 320px; margin: 0 auto 26px; color: var(--ui-text-muted-alt); font-size: 14.5px; line-height: 1.6; text-wrap: balance; }
#spam-warning-modal .modal-actions { justify-content: center; margin-top: 0; }
/* Tek eylem: tam genişlik; halka (#206) genel :focus-visible kuralından — outline'a dokunulmaz. */
#spam-warning-modal .btn-primary {
    width: 100%; min-height: 44px; margin: 0; padding: 11px 24px;
    border-radius: 12px; font-size: 14.5px; letter-spacing: 0.2px;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.18), 0 6px 18px rgba(6,182,212,0.24);
    transition: transform 0.12s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
#spam-warning-modal .btn-primary:hover { opacity: 1; filter: brightness(1.08); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.22), 0 10px 26px rgba(6,182,212,0.32); }
#spam-warning-modal .btn-primary:active { filter: brightness(0.96); transform: translateY(0) scale(0.985); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12), 0 3px 10px rgba(6,182,212,0.2); }
@keyframes spamWarnFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes spamWarnIn {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes spamWarnBadgeIn {
    from { opacity: 0; transform: scale(0.5); }
    to   { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    #spam-warning-modal .modal-backdrop,
    #spam-warning-modal .spam-warning-content,
    #spam-warning-modal .spam-warning-icon { animation: none; }
    #spam-warning-modal .btn-primary { transition: none; }
    #spam-warning-modal .btn-primary:hover,
    #spam-warning-modal .btn-primary:active { transform: none; }
}
@media (max-width: 480px) {
    #spam-warning-modal .spam-warning-content { padding: 30px 20px 20px; }
}
.input-wrapper {
    display: flex; align-items: flex-end; gap: 6px; /* butonlar büyüyen composer'da ortaya kaymasın, hep altta sabit kalsın */
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    border: 1px solid var(--border);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.input-wrapper:focus-within { border-color: rgba(6,182,212,0.3); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-wrapper input {
    flex: 1; padding: 10px 8px; font-size: 14px;
    color: var(--text-primary); background: none;
}
.input-wrapper input::placeholder { color: var(--text-muted); }

.input-action-btn {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); cursor: pointer; color: var(--text-muted);
    transition: all var(--transition); flex-shrink: 0;
}
.input-action-btn:hover { color: var(--text-primary); background: var(--bg-hover); }
/* Composer butonları (sol "+" ve sağ GIF/çıkartma/emoji) alttaki yazı satırıyla aynı hizada
   kalsın — input'un alt padding'ini telafi eden 3px = (42px tek-satır input − 36px buton)/2. */
.input-wrapper .input-action-btn { margin-bottom: 3px; }
.send-btn { color: var(--accent); }
.send-btn:hover { color: white; background: var(--accent); }

/* ─── GIF / Sticker input buttons ─── */
.input-gif-btn { font-size: 10px; font-weight: 700; letter-spacing: 0.4px; }
.gif-btn-label {
    font-size: 11px; font-weight: 700; letter-spacing: 0.4px; line-height: 1;
    opacity: 0.55; transition: opacity 0.15s ease;
    font-family: var(--font-sans); pointer-events: none;
}
.input-gif-btn:hover .gif-btn-label,
#gif-btn.picker-open .gif-btn-label { opacity: 1; }
#gif-btn.picker-open { color: var(--accent); background: var(--bg-hover); }
/* Çıkartma butonu.
   NOT: Burada eskiden `opacity: 0.55` vardı. Buton rengi zaten
   `--text-muted` olduğundan ikon İKİ KEZ soluklaşıyor ve hemen yanındaki
   "+" (dosya ekle) butonundan belirgin biçimde sönük duruyordu — düğmenin
   "belirsiz" görünmesinin ikinci sebebi buydu. Soluklaştırma kaldırıldı;
   ikon artık komşularıyla aynı ağırlıkta. Vurgu farkı hover/açık
   durumlarında RENKLE veriliyor. */
.input-sticker-btn svg { transition: transform var(--transition); }
/* Hover'da çok hafif büyüme: "etiket kalkıyor" hissi, dikkat dağıtmadan. */
.input-sticker-btn:hover svg { transform: scale(1.06); }
#sticker-btn.picker-open { color: var(--accent); background: var(--bg-hover); }
#sticker-btn:active svg { transform: scale(0.94); }

/* Composer butonlarında klavye odağı görünür olsun (fare tıklamasında çıkmaz).
   Bu kural tüm composer butonlarına uygulanır; yalnız çıkartmaya eklenseydi
   düğmeler arasında tutarsızlık oluşurdu. */
.input-action-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.input-action-btn:disabled,
.input-action-btn[aria-disabled='true'] {
    opacity: 0.4;
    cursor: not-allowed;
}
.input-action-btn:disabled:hover,
.input-action-btn[aria-disabled='true']:hover {
    color: var(--text-muted);
    background: none;
}

@media (prefers-reduced-motion: reduce) {
    .input-sticker-btn svg,
    .input-sticker-btn:hover svg,
    #sticker-btn:active svg { transition: none; transform: none; }
}

/* ─── Emoji btn animated face (desaturated by default) ─── */
.emoji-btn-face {
    font-size: 20px;
    line-height: 1;
    display: block;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
    pointer-events: none;
    user-select: none;
    transform-origin: center;
    will-change: opacity, transform, filter;
    transition: opacity 80ms ease, transform 80ms ease, filter 80ms ease;
}
/* Default state: soluk gri 😊 — sadece initial + context reset */
#emoji-btn.emoji-btn-default .emoji-btn-face {
    opacity: 0.55;
    filter: grayscale(1) saturate(0.15) brightness(0.85);
    transform: scale(1) rotate(0deg);
}
/* Random idle state: son random emoji soluk/gri */
#emoji-btn.emoji-btn-has-random:not(.emoji-btn-hovered) .emoji-btn-face {
    opacity: 0.55;
    filter: grayscale(1) saturate(0.2) brightness(0.85);
    transform: scale(1) rotate(0deg);
}
/* Hovered state: random emoji renkli/canlı — sadece has-random olunca */
#emoji-btn.emoji-btn-has-random.emoji-btn-hovered .emoji-btn-face {
    opacity: 1;
    filter: none;
    transform: scale(1.1) rotate(0deg);
}
/* Picker açık + Emoji sekmesi aktif: tam renkli — tüm diğer state'leri override et */
#emoji-btn.picker-open .emoji-btn-face {
    opacity: 1 !important;
    filter: none !important;
    transform: scale(1.08) rotate(5deg);
}
/* Swap geçiş anı: kısa fade-out/scale */
#emoji-btn.emoji-btn-swap .emoji-btn-face {
    opacity: 0;
    filter: grayscale(1) saturate(0.1) brightness(0.8);
    transform: scale(0.55) rotate(12deg);
    transition: opacity 40ms ease-in, transform 40ms ease-in, filter 40ms ease-in;
}
/* Click/press hissi */
#emoji-btn:active .emoji-btn-face {
    transform: scale(0.96);
}
@media (prefers-reduced-motion: reduce) {
    #emoji-btn .emoji-btn-face { transition-duration: 1ms !important; }
}

/* ─── Members Sidebar ────────────────── */
.members-sidebar {
    width: 240px; min-width: 240px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    overflow-y: auto; padding: 16px 8px;
    transition: width 0.2s, min-width 0.2s, padding 0.2s;
}
.members-sidebar.collapsed { width: 0; min-width: 0; padding: 0; overflow: hidden; border: none; }

.members-section { margin-bottom: 16px; }
.members-section .section-header { padding: 6px 8px; gap: 4px; }
.member-list { display: flex; flex-direction: column; }

.member-item {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 8px; border-radius: var(--radius-sm);
    cursor: pointer; transition: background var(--transition);
}
/* .pc-anchor-open: profil kartı bu satırdan açıkken hover görünümü korunur */
.member-item:hover, .member-item.pc-anchor-open { background: var(--bg-hover); }

.member-avatar {
    width: 32px; height: 32px; border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; color: white;
    flex-shrink: 0; position: relative;
}
.member-avatar .status-indicator {
    position: absolute; bottom: -1px; right: -1px;
    width: 10px; height: 10px; border-radius: 50%;
    border: 2.5px solid var(--bg-secondary);
}
.member-typing-indicator {
    position: absolute; right: -3px; bottom: -3px;
    width: 22px; height: 14px; border-radius: 999px;
    background: var(--bg-secondary);
    border: 2px solid var(--bg-primary, #080a10);
    display: inline-flex; align-items: center; justify-content: center;
    gap: 2px; z-index: 3; pointer-events: none;
    --typing-dot-color: var(--accent, #06b6d4);
}
.member-typing-indicator.typing-online  { --typing-dot-color: #23a55a; }
.member-typing-indicator.typing-idle    { --typing-dot-color: #f0b232; }
.member-typing-indicator.typing-dnd     { --typing-dot-color: #f23f43; }
.member-typing-indicator.typing-offline { --typing-dot-color: #80848e; }
.member-typing-indicator span {
    width: 3px; height: 3px; border-radius: 50%;
    background: var(--typing-dot-color);
    opacity: 0.5;
    animation: memberTypingPulse 1.2s infinite ease-in-out;
}
.member-typing-indicator span:nth-child(2) { animation-delay: 0.15s; }
.member-typing-indicator span:nth-child(3) { animation-delay: 0.3s; }
@keyframes memberTypingPulse {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
    40%           { transform: translateY(-2px); opacity: 1; }
}
/* Batch 4: uye adi, en guclu NORMAL rolun renginde. Renk INLINE `color` olarak
   DEGIL, `--member-role-color` OZEL DEGISKENI olarak yazilir; boylece asagidaki
   hover/secili kurallari `color`'i dogrudan ezmeye devam eder (inline `color`
   olsaydi sinif secicileri KAZANAMAZDI). Degisken yoksa -> eski varsayilan. */
.member-name {
    font-size: 14px; font-weight: 500;
    color: var(--member-role-color, var(--text-secondary));
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Ad + sunucu-sahibi tacı satırı: ad daralıp ellipsis olur, taç ASLA kırpılmaz */
.member-name-row { display: flex; align-items: center; gap: 5px; min-width: 0; }
.member-name-row .member-name { min-width: 0; }
.member-owner-crown { display: inline-flex; flex-shrink: 0; color: var(--tint-amber, #f0b232); }
.member-owner-crown svg { display: block; }
/* Taç YALNIZ üye listesinde gösterilir — profil kartı/popup rozeti kaldırıldı (Karar #36) */
.member-item:hover .member-name, .member-item.pc-anchor-open .member-name { color: var(--text-primary); }
.member-item.offline-member { opacity: var(--offline-member-opacity); }

/* ═══════════════ PROFILE CARD (Small Popup) ═══════════════ */
.profile-card {
    position: fixed; z-index: 300;
    width: 324px;
    background: var(--surface-card, var(--ui-secondary-alt));
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 2px 8px rgba(0,0,0,0.25);
    overflow: visible;
    animation: cardIn 0.15s ease;
    user-select: none; -webkit-user-select: none;
    max-height: calc(100vh - 16px);
    overflow-y: auto;
}
@keyframes cardIn { from { opacity: 0; transform: scale(0.95) translateY(4px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.profile-card-banner { height: 100px; opacity: 0.88; border-radius: 16px 16px 0 0; overflow: hidden; position: relative; }
.profile-card-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255,255,255,0.08) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.38) 100%); pointer-events: none; }
.profile-card-body { padding: 0 14px 14px; position: relative; }
.pc-avatar-wrapper { position: relative; width: 92px; height: 92px; margin-top: -40px; cursor: pointer; }
.profile-card-avatar {
    width: 92px; height: 92px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 32px; color: white;
    border: 5px solid var(--surface-card, var(--ui-secondary-alt));
    overflow: hidden; position: relative; z-index: 1;
}
.profile-card-avatar::after {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    background: rgba(0,0,0,0); transition: background 0.2s ease; pointer-events: none;
}
.pc-avatar-wrapper:hover .profile-card-avatar::after { background: rgba(0,0,0,0.3); }
.profile-card-avatar .avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.pc-status-dot {
    position: absolute; bottom: 3px; right: 3px; z-index: 2;
    width: 15px; height: 15px; border-radius: 50%;
    border: 2px solid var(--surface-card, var(--ui-secondary-alt));
    background: var(--offline);
}
.pc-status-dot.online { background: var(--online); }
.pc-status-dot.idle { background: var(--idle); }
.pc-status-dot.dnd { background: var(--dnd); }
.pc-status-dot.offline { background: var(--offline); }
.profile-card-info { margin-top: 4px; }
.profile-card-name { font-size: 17px; font-weight: 700; color: var(--ui-text-strong); cursor: pointer; width: fit-content; }
.profile-card-name:hover { text-decoration: underline; }
/* İsim, kullanıcı adı, hitap ve hakkında metinleri fare ile seçilebilir (profil kartı / popup / kullanıcı paneli) */
.profile-card-name, #pc-tag, #pc-pronouns, #pc-about-text,
.pp-name, #pp-tag, #pp-pronouns, #pp-about,
.upp-display-name, #upp-username, #upp-pronouns, #upp-about-text {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}
.profile-card-tag { font-size: 12px; color: var(--ui-text-secondary); margin-top: 0; cursor: pointer; width: fit-content; }
.profile-card-tag:hover { text-decoration: underline; }
/* Tag (@kullaniciadi) ile hitap ayni satirda: "@admin111 · hitap" */
/* SATIR İÇİ akış: uzun hitap @kullanıcı'nın yanından devam edip taşarsa alt
   satıra kırılır (tüm hitap bütün olarak alta düşmez). */
.pc-tag-row, .pp-tag-row { display: block; min-width: 0; line-height: 1.4; }
.pc-tag-row > *, .pp-tag-row > * { display: inline; vertical-align: baseline; }
.pc-pronouns, .pp-pronouns {
    font-size: 13px;
    color: var(--text-secondary, #94A3B8);
    line-height: 1.35;
    word-break: break-word;
    overflow-wrap: anywhere;
    min-width: 0;
}
.pc-pronouns::before, .pp-pronouns::before { content: "·"; margin: 0 4px; font-size: 26px; line-height: 0; position: relative; top: 3px; }
/* Profile card action buttons */
.pc-info-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pc-info-text { flex: 1; min-width: 0; }
.pc-action-buttons { display: flex; gap: 6px; align-items: center; position: absolute; top: 52px; right: 8px; }
.pc-action-btn {
    width: 32px; height: 32px; border-radius: 50%; border: none;
    background: var(--ui-secondary); color: var(--ui-text-secondary); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.pc-action-btn:hover { background: var(--ui-hover); color: var(--ui-text-strong); }
/* PC More menu */
.pc-more-wrapper { position: relative; }
.pc-more-menu {
    position: fixed; z-index: 1002;
    background: var(--surface-menu, var(--ui-secondary-alt)); border: 1px solid var(--border); /* kullanıcı kartıyla (.profile-card) aynı ton */
    border-radius: 8px; padding: 6px;
    min-width: 212px; box-shadow: 0 10px 28px rgba(0,0,0,0.5);
    animation: ctxIn 0.12s ease;
}
.pc-more-item {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px;
    font-size: 13px; color: var(--text-secondary); background: none; border: none;
    border-radius: 5px; cursor: pointer; transition: background 0.1s, color 0.1s; text-align: left;
}
.pc-more-item:hover { background: var(--accent); color: #fff; }
.pc-more-item.pc-more-danger { color: var(--dnd); }
.pc-more-item.pc-more-danger:hover { background: var(--dnd); color: #fff; }
.pc-more-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.85; }
.pc-more-item:hover .pc-more-icon { opacity: 1; }
.pc-more-label { white-space: nowrap; }
.pc-more-arrow { margin-left: auto; opacity: 0.55; font-size: 16px; line-height: 1; }
.pc-more-item:hover .pc-more-arrow { opacity: 1; }
.pc-more-item.pc-more-has-sub { position: relative; }
.pc-more-submenu {
    position: fixed; z-index: 99999;
    background: var(--surface-menu, var(--ui-secondary-alt)); border: 1px solid var(--border); /* ana "..." menüsüyle (.pc-more-menu) ve kullanıcı kartıyla aynı ton */
    border-radius: 8px; padding: 6px;
    min-width: 200px; box-shadow: 0 10px 28px rgba(0,0,0,0.5);
    overscroll-behavior: contain;
}
.pc-more-submenu::-webkit-scrollbar { width: 6px; }
.pc-more-submenu::-webkit-scrollbar-thumb { background: rgb(var(--overlay-rgb) / 0.16); border-radius: 999px; }
.pc-more-submenu .pc-more-item { font-size: 13px; }
.pc-more-sep { height: 1px; background: var(--border); margin: 4px 6px; }
.pc-more-badge {
    display: inline-flex; align-items: center; justify-content: center;
    margin-left: auto; padding: 1px 6px; border-radius: 4px;
    font-size: 10px; font-weight: 700; background: var(--accent); color: #fff;
}
.pc-more-item:hover .pc-more-badge { background: rgba(255,255,255,0.2); }
.profile-card-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--ui-text-secondary); margin-bottom: 4px; }
/* Küçük profil kartı — TÜM kartı kaplayan engelli overlay (tema uyumlu, sakin) */
.pc-blocked-overlay {
    position: absolute; inset: 0; z-index: 10;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 9px; padding: 24px 22px;
    border-radius: 16px;
    background: var(--surface-card, var(--ui-secondary-alt)); /* .profile-card arka planıyla aynı → arka içerik tamamen gizlenir */
    text-align: center;
}
.profile-card.pc-blocked { min-height: 220px; overflow: hidden; clip-path: inset(0 round 16px); }
.profile-card.pc-blocked .profile-card-banner { background: var(--surface-card, var(--ui-secondary-alt)) !important; }
.pc-blocked-avatar-wrap { position: relative; width: 68px; height: 68px; margin-bottom: 2px; }
.pc-blocked-avatar {
    width: 68px; height: 68px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 24px; color: white;
    overflow: hidden;
    filter: grayscale(0.3) brightness(0.75);
}
.pc-blocked-avatar .avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.pc-blocked-badge {
    position: absolute; bottom: -2px; right: -2px;
    width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--ui-secondary);
    box-shadow: 0 0 0 2px var(--surface-card, var(--ui-secondary-alt));
    color: var(--text-muted);
}
.pc-blocked-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.pc-blocked-sub { font-size: 12.5px; color: var(--text-muted); line-height: 1.45; max-width: 230px; }
.pc-blocked-reveal {
    margin-top: 8px;
    font-size: 13px; font-weight: 600;
    padding: 8px 18px; border-radius: 6px;
    background: rgb(var(--overlay-rgb) / 0.06); color: var(--text-secondary);
    border: 1px solid rgb(var(--overlay-rgb) / 0.1);
    cursor: pointer; transition: background 0.15s, color 0.15s;
}
.pc-blocked-reveal:hover { background: rgb(var(--overlay-rgb) / 0.1); color: var(--text-primary); }
/* Profile popup "blocked" status card (calm, muted — not an alert) */
/* Profile popup blocked-status pill (in action row, replaces Mesaj Gönder) */
.pp-blocked-status {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    flex: 1; height: 36px; padding: 0 14px;
    border-radius: 6px;
    background: rgb(var(--overlay-rgb) / 0.055);
    border: 1px solid rgb(var(--overlay-rgb) / 0.07);
    color: var(--text-secondary);
    font-size: 13px; font-weight: 600;
    user-select: none;
}
.pp-blocked-status svg { flex-shrink: 0; opacity: 0.65; }
/* Small profile card — blocked status label (Mesaj/Arama yerine gösterilir, reveal sonrası) */
.pc-blocked-status-label {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%; height: 34px; padding: 0 12px;
    border-radius: 6px;
    background: rgb(var(--overlay-rgb) / 0.055);
    border: 1px solid rgb(var(--overlay-rgb) / 0.08);
    color: var(--text-secondary);
    font-size: 12.5px; font-weight: 600;
    user-select: none;
}
.pc-blocked-status-label svg { flex-shrink: 0; opacity: 0.65; }
/* Mutuals row */
.pc-mutuals-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ui-text-secondary); padding: 2px 0; min-height: 18px; flex-wrap: wrap; }
.pc-mutual-item { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; border-radius: 4px; padding: 2px 4px; transition: background 0.15s, color 0.15s; }
.pc-mutual-item:hover { background: rgb(var(--overlay-rgb) / 0.08); color: var(--ui-text-strong); }
.pc-mutual-item svg { opacity: 0.7; flex-shrink: 0; }
.pc-mutual-item:hover svg { opacity: 1; }
.pc-mutual-sep { color: var(--ui-text-ghost); font-size: 10px; user-select: none; }
.pc-separator { height: 1px; background: rgb(var(--overlay-rgb) / 0.06); margin: 8px 0; }
/* About section */
.pc-about-section { margin-bottom: 6px; }
.pc-about-text { font-size: 13px; color: var(--ui-text-normal); line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
/* Roles in card */
.pc-roles-section { margin-bottom: 4px; }
.pc-roles-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pc-roles-list { display: flex; flex-wrap: wrap; gap: 4px; }
.pc-role-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 4px;
    font-size: 12px; font-weight: 500;
    background: var(--ui-secondary); color: var(--ui-text-normal);
    border: none;
}
.pc-role-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.pc-role-remove { cursor: pointer; opacity: 0.4; font-size: 13px; margin-left: 2px; border: none; background: none; color: inherit; padding: 0; line-height: 1; }
.pc-role-remove:hover { opacity: 1; color: var(--dnd); }
.pc-role-add-btn {
    width: 24px; height: 24px; border-radius: 4px;
    background: var(--ui-secondary); border: none; color: var(--ui-text-secondary);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background 0.15s, color 0.15s;
}
.pc-role-add-btn:hover { background: var(--ui-hover); color: var(--ui-text-strong); }
.pc-role-add-btn.active { background: var(--brand); color: #fff; }
/* Rol ekleme — Discord tarzı YÜZER popup (artık inline değil; + butonuna göre fixed konumlanır,
   _positionRolePopup). Kartı/popup'ı büyütmez, içeriği itmez; üstte yüzer. */
.pc-role-dropdown {
    position: fixed; z-index: 1050;
    width: 246px;
    background: var(--surface-menu, var(--ui-floating)); border-radius: 8px; padding: 7px;
    border: 1px solid rgb(var(--overlay-rgb) / 0.08);
    box-shadow: 0 12px 32px rgba(0,0,0,0.55);
    animation: cardIn 0.12s ease;
}
.pc-role-search {
    width: 100%; padding: 8px 10px; background: var(--ui-tertiary); border: 1px solid rgba(79,84,92,0.6);
    border-radius: 6px; color: var(--ui-text-normal); font-size: 13.5px; outline: none; box-sizing: border-box;
}
.pc-role-search:focus { border-color: var(--brand); }
.pc-role-dropdown-list { max-height: 222px; overflow-y: auto; margin-top: 6px; }
.pc-role-dropdown-list::-webkit-scrollbar { width: 8px; }
.pc-role-dropdown-list::-webkit-scrollbar-button { display: none; height: 0; width: 0; }
.pc-role-dropdown-list::-webkit-scrollbar-track { background: transparent; margin: 2px 0; }
.pc-role-dropdown-list::-webkit-scrollbar-thumb {
    background: rgb(var(--overlay-rgb) / 0.18); border-radius: 999px;
    border: 2px solid transparent; background-clip: padding-box;
}
.pc-role-dropdown-list::-webkit-scrollbar-thumb:hover { background: rgb(var(--overlay-rgb) / 0.3); background-clip: padding-box; }
.pc-role-dropdown-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 5px; cursor: pointer;
    font-size: 14px; color: var(--ui-text-normal); transition: background 0.1s;
}
.pc-role-dropdown-item:hover { background: rgb(var(--overlay-rgb) / 0.06); }
.pc-role-dropdown-item .pc-role-dot { width: 12px; height: 12px; }
.pc-role-dropdown-empty { color: var(--ui-text-secondary); padding: 10px 8px; font-size: 12.5px; text-align: center; }
/* Message box at bottom */
.pc-message-box {
    display: flex; align-items: center; gap: 5px;
    background: var(--ui-hover-alt); border-radius: 9px;
    padding: 3px 7px 3px 9px; margin-top: 8px;
    min-height: 34px;
}
.pc-message-input {
    flex: 1; background: none; border: none; color: var(--ui-text-normal);
    font-size: 13.5px; padding: 4px 3px; outline: none;
    line-height: 1.45; min-height: 20px; max-height: 72px;
    overflow-y: auto; white-space: pre-wrap; word-break: break-word;
    cursor: text; position: relative;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Segoe UI', system-ui, sans-serif;
}
.pc-message-input:empty::before {
    content: attr(data-placeholder);
    color: #6d6f78;
    pointer-events: none;
    user-select: none;
}
/* Blurple selection colour for profile card mini composer */
.pc-message-input::selection,
.pc-message-input *::selection {
    background: rgba(88, 101, 242, 0.75);
    color: #fff;
}
.pc-message-emoji {
    background: none; border: none; cursor: pointer;
    padding: 4px; display: flex; align-items: center; justify-content: center;
    border-radius: 7px; transition: background 0.15s;
    min-width: 30px; min-height: 30px; flex-shrink: 0;
}
.pc-message-emoji:hover { background: var(--bg-hover); }
/* ─── Profile card emoji btn — same animated face as chat bar ─── */
#pc-message-emoji.emoji-btn-default .emoji-btn-face {
    opacity: 0.55;
    filter: grayscale(1) saturate(0.15) brightness(0.85);
    transform: scale(1) rotate(0deg);
}
#pc-message-emoji.emoji-btn-has-random:not(.emoji-btn-hovered) .emoji-btn-face {
    opacity: 0.55;
    filter: grayscale(1) saturate(0.2) brightness(0.85);
    transform: scale(1) rotate(0deg);
}
#pc-message-emoji.emoji-btn-has-random.emoji-btn-hovered .emoji-btn-face {
    opacity: 1;
    filter: none;
    transform: scale(1.1) rotate(0deg);
}
#pc-message-emoji.picker-open .emoji-btn-face {
    opacity: 1 !important;
    filter: none !important;
    transform: scale(1.08) rotate(5deg);
}
#pc-message-emoji.emoji-btn-swap .emoji-btn-face {
    opacity: 0;
    filter: grayscale(1) saturate(0.1) brightness(0.8);
    transform: scale(0.55) rotate(12deg);
    transition: opacity 40ms ease-in, transform 40ms ease-in, filter 40ms ease-in;
}
#pc-message-emoji:active .emoji-btn-face {
    transform: scale(0.96);
}

/* Profile card: large action buttons area */
.pc-large-actions {
    display: flex; flex-direction: column; gap: 4px;
    margin: 6px 0 2px;
}
.pc-large-btns-row {
    display: flex; gap: 6px;
}
.pc-large-btn {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 7px 10px; border-radius: 8px;
    font-size: 13px; font-weight: 600; line-height: 1;
    cursor: pointer; border: none; transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.pc-large-btn-primary { background: var(--brand); color: #fff; }
.pc-large-btn-primary:hover { background: var(--brand-deep); }
.pc-large-btn-secondary { background: var(--ui-secondary); color: var(--ui-text-secondary); }
.pc-large-btn-secondary:hover { background: var(--ui-hover); color: var(--ui-text-normal); }

/* Edit Profile dropdown wrapper — now full-width in large-actions */
.pc-edit-profile-wrapper { position: relative; display: flex; width: 100%; }
.pc-edit-profile-trigger { width: 100%; }
/* Butonun SAĞINA (flyout) açılır; position:fixed + JS konumlama (_positionEditProfileMenu) → kartın
   overflow-y:auto'su menüyü scrollHeight'e katmaz, KAYDIRMA ÇUBUĞU çıkmaz ve menü kesilmeden görünür. */
.pc-edit-profile-menu {
    position: fixed; z-index: 1002;
    min-width: 210px;
    background: var(--surface-menu, var(--ui-menu-alt)); border-radius: 9px; padding: 5px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.5);
    border: 1px solid rgb(var(--overlay-rgb) / 0.06);
}
.pc-edit-profile-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 8px 11px;
    border-radius: 6px;
    font-size: 13px; color: var(--ui-text-soft-alt);
    white-space: nowrap;
    background: none; border: none; cursor: pointer;
    text-align: left;
    transition: background 0.12s, color 0.12s;
}
.pc-edit-profile-item svg { opacity: 0.8; flex: 0 0 auto; }
.pc-edit-profile-item:hover { background: rgb(var(--overlay-rgb) / 0.07); color: var(--ui-text-strong); }
.pc-edit-profile-item:hover svg { opacity: 1; }

/* ═══════════════ SERVER PROFILE MODAL ═══════════════ */
.spm-backdrop {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(0,0,0,0.75);
    display: flex; align-items: center; justify-content: center;
}
.spm-backdrop.hidden { display: none; }
.spm-dialog {
    background: var(--surface-dialog, var(--ui-tertiary)); border-radius: 12px;
    width: 760px; max-width: 95vw; max-height: 90vh;
    display: flex; flex-direction: column;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}
.spm-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgb(var(--overlay-rgb) / 0.07);
}
.spm-title { font-size: 16px; font-weight: 700; color: var(--ui-text-strong); }
.spm-close-btn {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: none; border: none; color: var(--ui-text-secondary); cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.spm-close-btn:hover { background: var(--ui-hover); color: var(--ui-text-strong); }
.spm-body {
    display: flex; gap: 24px;
    padding: 20px; flex: 1; overflow-y: auto;
}
.spm-form-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.spm-preview-col {
    width: 240px; flex-shrink: 0;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.spm-section-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.8px; color: var(--ui-text-secondary); margin-bottom: 4px;
}
.spm-field { display: flex; flex-direction: column; gap: 4px; }
.spm-input, .spm-textarea {
    width: 100%; padding: 9px 12px;
    background: var(--ui-floating); border: 1px solid rgba(79,84,92,0.6);
    border-radius: 6px; color: var(--ui-text-normal); font-size: 13px; outline: none;
    box-sizing: border-box; transition: border-color 0.12s;
}
.spm-input:focus, .spm-textarea:focus { border-color: var(--brand); }
.spm-textarea { resize: vertical; min-height: 72px; }
.spm-hint { font-size: 11px; color: var(--ui-text-dim); }
.spm-char-count { font-size: 11px; color: var(--ui-text-dim); text-align: right; }
.spm-preview-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.8px; color: var(--ui-text-secondary); align-self: flex-start;
}
.spm-preview-card {
    width: 220px; background: var(--surface-card, var(--ui-secondary-alt)); border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.spm-preview-banner {
    height: 56px;
    background: var(--brand);
    background-size: cover; background-position: center;
}
.spm-preview-body { padding: 0 12px 12px; }
.spm-preview-avatar-wrap { margin-top: -28px; margin-bottom: 6px; }
.spm-preview-avatar {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--brand);
    border: 4px solid var(--surface-card, var(--ui-secondary-alt));
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 22px; color: #fff;
    overflow: hidden;
}
.spm-preview-name { font-size: 16px; font-weight: 800; color: var(--ui-text-strong); margin-top: 4px; word-break: break-word; }
.spm-preview-tag  { font-size: 12px; color: var(--ui-text-secondary); margin-top: 1px; }
.spm-preview-bio  { font-size: 12px; color: var(--ui-text-normal); margin-top: 8px; line-height: 1.4; word-break: break-word; }
.spm-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px;
    border-top: 1px solid rgb(var(--overlay-rgb) / 0.07);
    background: var(--ui-secondary-alt);
}
.spm-footer-right { display: flex; gap: 8px; }
.spm-btn-reset {
    background: none; border: none; color: #f23f42;
    font-size: 13px; font-weight: 600; cursor: pointer;
    padding: 4px 8px; border-radius: 4px;
    transition: background 0.12s;
}
.spm-btn-reset:hover { background: rgba(242,63,66,0.12); }
.spm-btn-cancel {
    padding: 8px 18px; background: none; border: 1px solid rgb(var(--overlay-rgb) / 0.1);
    color: var(--ui-text-secondary); border-radius: 4px; cursor: pointer; font-size: 13px; font-weight: 600;
    transition: background 0.12s, color 0.12s;
}
.spm-btn-cancel:hover { background: var(--ui-hover); color: var(--ui-text-strong); }
.spm-btn-save {
    padding: 8px 18px; background: var(--brand); border: none;
    color: #fff; border-radius: 4px; cursor: pointer; font-size: 13px; font-weight: 700;
    transition: background 0.12s;
}
.spm-btn-save:hover { background: var(--brand-deep); }
.spm-btn-save:disabled { opacity: 0.6; cursor: not-allowed; }

/* ═══════════════ FULL PROFILE POPUP ═══════════════ */
.profile-popup {
    position: fixed; inset: 0; z-index: 400;
    display: flex; align-items: center; justify-content: center;
    animation: ppFadeIn 0.2s ease;
}
@keyframes ppFadeIn { from { opacity: 0; } to { opacity: 1; } }
.profile-popup.hidden { display: none; }
.profile-popup-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.7); }
.profile-popup-content {
    position: relative; display: flex;
    width: 880px; max-width: 90vw; height: 600px; max-height: 85vh;
    background: var(--surface-card, var(--ui-secondary-alt)); border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.65), 0 0 0 1px rgb(var(--overlay-rgb) / 0.06);
    overflow: hidden; z-index: 1;
}
.upp-blocked-overlay {
    position: absolute; inset: 0; z-index: 20;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; padding: 32px 28px; text-align: center;
    background: var(--surface-card, var(--ui-secondary-alt)); border-radius: inherit;
}
.upp-blocked-overlay.hidden { display: none; }
.upp-bo-username { font-size: 13px; color: var(--text-muted); margin-top: -6px; }
.upp-bo-info-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 10px; width: 100%; max-width: 300px; margin: 6px 0;
}
.upp-bo-info-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 12px; padding: 14px 10px;
    display: flex; flex-direction: column;
    align-items: center; gap: 8px;
    text-align: center;
    font-size: 12px; font-weight: 500;
    color: var(--text-secondary);
}
.upp-bo-info-icon {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--ico-clr);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.profile-popup-close {
    /* "Aktivite" sekme çubuğuyla dikey ortalı (sekme ~43px, buton 32px → top ~6px) +
       sağ kenardan biraz daha ferah dursun. */
    position: absolute; top: 6px; right: 18px; z-index: 5;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(0,0,0,0.45); border: none;
    color: var(--ui-text-secondary); font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s, transform 0.15s; line-height: 1;
}
.profile-popup-close:hover { background: rgba(220,30,30,0.75); color: #fff; transform: scale(1.08); }
/* Left panel */
.pp-left { width: 360px; min-width: 320px; display: flex; flex-direction: column; overflow-y: auto; border-right: 1px solid rgb(var(--overlay-rgb) / 0.05); }
.pp-banner { height: 130px; flex-shrink: 0; position: relative; transition: background 0.4s ease; background: linear-gradient(180deg, #5865F2 0%, #2b2d31 70%, #1f2023 100%); }
.pp-banner::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 50px; background: linear-gradient(to bottom, transparent, var(--surface-card, var(--ui-secondary-alt))); pointer-events: none; }
.pp-left-body { padding: 0 20px 20px; flex: 1; }
.pp-avatar-wrapper { position: relative; width: 88px; height: 88px; margin-top: -44px; }
.pp-avatar {
    width: 88px; height: 88px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 32px; color: #fff;
    overflow: hidden;
    border: 5px solid var(--surface-card, var(--ui-secondary-alt));
}
.pp-avatar .avatar-img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.pp-status-dot {
    position: absolute; bottom: 4px; right: 4px; z-index: 2;
    width: 16px; height: 16px; border-radius: 50%;
    border: 3px solid var(--surface-card, var(--ui-secondary-alt));
    background: var(--offline);
}
.pp-status-dot.online { background: var(--online); }
.pp-status-dot.idle { background: var(--idle); }
.pp-status-dot.dnd { background: var(--dnd); }
.pp-status-dot.offline { background: var(--offline); }
.pp-name { font-size: 22px; font-weight: 800; color: var(--ui-text-strong); margin-top: 10px; word-break: break-word; line-height: 1.2; }
.pp-tag { font-size: 13px; color: var(--ui-text-faint-alt); margin-top: 3px; }
/* Actions */
.pp-actions { display: flex; gap: 8px; margin-top: 16px; align-items: center; }
.pp-action-btn { display: flex; align-items: center; gap: 6px; padding: 8px 16px; font-size: 13px; border-radius: 6px; font-weight: 600; transition: filter 0.15s, opacity 0.15s; }
.pp-action-btn:hover { filter: brightness(1.12); }
.pp-icon-btn { padding: 8px 10px !important; aspect-ratio: 1; justify-content: center; }
.pp-separator { height: 1px; background: rgb(var(--overlay-rgb) / 0.07); margin: 16px 0; }
/* More menu dropdown */
.pp-more-wrapper { position: relative; }
.pp-more-menu {
    position: fixed; top: 0; left: 0; z-index: 410;
    background: var(--surface-menu, var(--ui-floating-alt)); border-radius: 10px; padding: 5px;
    min-width: 220px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.7), 0 0 0 1px rgb(var(--overlay-rgb) / 0.08);
    animation: ctxIn 0.12s ease;
}
.pp-more-menu.hidden { display: none; }
.pp-more-item {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    width: 100%; padding: 9px 12px; font-size: 13px; border-radius: 6px;
    cursor: pointer; color: var(--ui-text-soft); background: none; border: none;
    text-align: left; transition: background 0.1s, color 0.1s;
}
.pp-more-item:hover { background: rgb(var(--overlay-rgb) / 0.07); color: var(--ui-text-strong); }
.pp-more-item.is-pinned { background: rgb(var(--overlay-rgb) / 0.08); color: var(--ui-text-strong); }
.pp-more-danger { color: #f23f42; }
.pp-more-danger:hover { background: rgba(242,63,66,0.18); color: #f23f42; }
.pp-more-sep { height: 1px; background: rgb(var(--overlay-rgb) / 0.07); margin: 4px 8px; }
.pp-more-has-sub { position: relative; }
.pp-more-has-sub svg { flex-shrink: 0; opacity: 0.6; }
.pp-more-badge {
    display: inline-flex; align-items: center; justify-content: center;
    background: rgb(var(--overlay-rgb) / 0.1); border-radius: 4px;
    padding: 2px 6px; font-size: 10px; font-weight: 700; color: var(--ui-text-faint-alt);
    letter-spacing: 0.5px;
}
.pp-more-submenu {
    position: fixed; z-index: 99999;
    background: var(--surface-menu, var(--ui-floating-alt)); border-radius: 10px; padding: 5px;
    min-width: 200px;
    max-height: min(320px, calc(100vh - 96px));
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.7), 0 0 0 1px rgb(var(--overlay-rgb) / 0.08);
    animation: ctxIn 0.1s ease;
    scrollbar-width: thin;
    scrollbar-color: rgb(var(--overlay-rgb) / 0.15) transparent;
}
.pp-more-submenu::-webkit-scrollbar { width: 4px; }
.pp-more-submenu::-webkit-scrollbar-thumb { background: rgb(var(--overlay-rgb) / 0.15); border-radius: 2px; }
.pp-more-submenu::-webkit-scrollbar-track { background: transparent; }
.pp-more-submenu.hidden { display: none; }
.pp-more-sub-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 9px 12px; font-size: 13px; border-radius: 6px;
    cursor: pointer; color: var(--ui-text-soft); background: none; border: none;
    text-align: left; transition: background 0.1s, color 0.1s;
}
.pp-more-sub-item:hover { background: rgb(var(--overlay-rgb) / 0.07); color: var(--ui-text-strong); }
.pp-more-sub-icon {
    width: 26px; height: 26px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 11px; color: #fff; flex-shrink: 0; overflow: hidden;
}
.pp-more-sub-icon .avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.pp-info-section { margin-bottom: 10px; background: rgb(0 0 0 / calc(0.18 * var(--shade-k))); border-radius: 8px; padding: 10px 12px; }
.pp-info-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ui-text-faint-alt); margin-bottom: 5px; }
.pp-info-value { font-size: 13px; color: var(--ui-text-normal); line-height: 1.45; }
.pp-roles-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
/* Right panel */
.pp-right { flex: 1; display: flex; flex-direction: column; background: var(--ui-tertiary); }
.pp-tabs { display: flex; border-bottom: 1px solid rgb(var(--overlay-rgb) / 0.06); flex-shrink: 0; padding: 0 4px; }
.pp-tab {
    padding: 14px 14px 12px; font-size: 13px; font-weight: 600;
    color: var(--ui-text-faint-alt); background: none; border: none;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    cursor: pointer; transition: color 0.15s, border-color 0.15s; white-space: nowrap;
}
.pp-tab:hover { color: var(--ui-text-normal); }
.pp-tab.active { color: var(--ui-text-strong); border-bottom-color: var(--brand); }
.pp-tab-content { flex: 1; overflow-y: auto; padding: 20px 16px; }
.pp-tab-pane { display: none; }
.pp-tab-pane.active { display: block; }
.pp-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; text-align: center; }
.pp-empty-text { font-size: 15px; color: var(--ui-text-secondary); line-height: 1.5; }
/* Mutual lists */
.pp-mutual-list { display: flex; flex-direction: column; gap: 4px; }
.pp-mutual-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 6px; cursor: pointer;
    transition: background 0.1s;
}
.pp-mutual-item:hover { background: rgb(var(--overlay-rgb) / 0.04); }
.pp-mutual-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; color: #fff; flex-shrink: 0;
    overflow: hidden;
}
.pp-mutual-avatar .avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.pp-mutual-name { font-size: 14px; font-weight: 600; color: var(--ui-text-normal); }
.pp-mutual-sub { font-size: 12px; color: var(--ui-text-secondary); }

.profile-empty-state {
    min-height: 200px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center;
    padding: 40px 24px;
}
.profile-empty-title {
    font-size: 16px; font-weight: 700;
    color: var(--text-primary, #f2f3f5);
    margin-bottom: 8px;
}
.profile-empty-text {
    max-width: 240px;
    font-size: 13px; line-height: 1.5;
    color: var(--text-muted, #87898f);
}

/* ═══════════════ CONTEXT MENU ═══════════════ */
/* Kanal/Kategori Ayarları içindeki bağlam menüleri: ayarlar modalı z-index
   2000'dir; taban `.context-menu` z-index'i (310) menüyü modalın ALTINDA
   bırakıyor ve sağ-tık menüsü AÇILDIĞI HALDE görünmüyordu (ölçüldü:
   elementFromPoint menü yerine alttaki satırı döndürüyordu). */
#access-ctx-menu,
#cp-target-ctx-menu { z-index: 10002; }

.context-menu {
    position: fixed; z-index: 310;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 6px; min-width: 190px;
    box-shadow: var(--shadow-lg);
    animation: ctxIn 0.12s ease;
}
@keyframes ctxIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

/* Pasif menü öğesi (ör. okunmamış yokken "Okunmuş Olarak İşaretle") */
.ctx-item.disabled {
    opacity: 0.45;
    pointer-events: none;
    cursor: default;
}
.ctx-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 8px 10px;
    font-size: 13px; border-radius: 6px;
    cursor: pointer; color: var(--text-secondary);
    transition: all var(--transition);
}
.ctx-item:hover { background: var(--accent); color: white; }
/* Bağlam menüsündeki yıkıcı öğe KENDİ BAŞINA da kırmızıdır (5100): eylem
   yalnız hover'da değil, açılış anında da yıkıcı olduğunu bildirir. Kapsam
   kapsam AÇIKÇA sayilan BES menudur (Izinler/Erisim + kanal/kategori/
   sunucu menüsü); global `.ctx-delete` kurali KULLANILMAZ -> kalan
   menülerin görünümü DEĞİŞMEZ. */
#cp-target-ctx-menu .ctx-delete,
#access-ctx-menu .ctx-delete,
#channel-ctx-menu .ctx-delete,
#category-notif-menu .ctx-delete,
#server-ctx-menu .ctx-delete { color: var(--dnd); }
/* Hover metni BEYAZ kalmali: yukaridaki id'li kural (1,1,0) global
   `.ctx-delete:hover` (0,2,0) kuralini EZER; kapsanmis hover kurali
   olmadan metin kirmizi zemin uzerinde KIRMIZI kaliyordu (olculdu:
   5100 hover = beyaz, kapsamli surum = kirmizi). */
#cp-target-ctx-menu .ctx-delete:hover,
#access-ctx-menu .ctx-delete:hover,
#channel-ctx-menu .ctx-delete:hover,
#category-notif-menu .ctx-delete:hover,
#server-ctx-menu .ctx-delete:hover { color: #fff; }
.ctx-delete:hover { background: var(--dnd); color: white; }
.ctx-muted { color: var(--text-muted); }
.ctx-muted:hover { background: var(--bg-hover); color: var(--text-secondary); }
.ctx-success:hover { background: #2d7a3e; color: white; }
.ctx-separator { height: 1px; background: var(--border); margin: 4px 6px; }
/* Context-menu label / shortcut / toggle (composer menu) */
.ctx-item .ctx-label { flex: 1; text-align: left; }
.ctx-item .ctx-shortcut { margin-left: auto; font-size: 11px; color: var(--text-muted); }
.ctx-item:hover .ctx-shortcut { color: rgba(255,255,255,0.75); }
/* Composer menu uses the neutral gray hover (same as the server dropdown), not accent blue */
#composer-ctx-menu .ctx-item:hover { background: rgb(var(--overlay-rgb) / 0.06); color: var(--text-primary); }
#composer-ctx-menu .ctx-item:hover .ctx-shortcut { color: var(--text-secondary); }
.ctx-toggle .ctx-check-box {
    flex-shrink: 0; width: 18px; height: 18px; border-radius: 5px;
    border: 2px solid var(--text-muted); position: relative;
    transition: background var(--transition), border-color var(--transition);
}
.ctx-toggle:hover .ctx-check-box { border-color: #fff; }
.ctx-toggle.ctx-on .ctx-check-box { background: var(--accent); border-color: var(--accent); }
.ctx-toggle.ctx-on .ctx-check-box::after {
    content: ''; position: absolute; left: 4px; top: 0; width: 5px; height: 10px;
    border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* 5100 paritesi: bildirim/susturma menulerinde onay kutusu INCELTILIR —
   16x16, 4px yaricap, 1.5px kenar ve `--cctx-check` maskesiyle CIZILMIS tik
   (kenarlik hilesiyle olusturulan "L" kucuk kutuda optik olarak merkezden
   kayiyordu). PAYLASILAN `.ctx-toggle .ctx-check-box` tabani DEGISMEZ →
   composer menusu, sunucu dropdown'i ve sunucu sag-tik menusu TABANDA kalir
   (5100 ile ayni kapsam). Yeni bir durum sistemi YOK: durum yine `.ctx-on`. */
#category-notif-menu .ctx-toggle .ctx-check-box,
#channel-ctx-menu .ctx-toggle .ctx-check-box,
#sidebar-ctx-menu .ctx-toggle .ctx-check-box {
    width: 16px; height: 16px; border-radius: 4px;
    border: 1.5px solid var(--text-muted);
    background: transparent;
    transition: background var(--transition), border-color var(--transition);
}
#category-notif-menu .ctx-toggle:hover .ctx-check-box,
#channel-ctx-menu .ctx-toggle:hover .ctx-check-box,
#sidebar-ctx-menu .ctx-toggle:hover .ctx-check-box { border-color: rgba(255,255,255,.75); }
#category-notif-menu .ctx-toggle.ctx-on .ctx-check-box,
#channel-ctx-menu .ctx-toggle.ctx-on .ctx-check-box,
#sidebar-ctx-menu .ctx-toggle.ctx-on .ctx-check-box {
    background: var(--accent); border-color: var(--accent);
}
#category-notif-menu .ctx-toggle.ctx-on .ctx-check-box::after,
#channel-ctx-menu .ctx-toggle.ctx-on .ctx-check-box::after,
#sidebar-ctx-menu .ctx-toggle.ctx-on .ctx-check-box::after {
    content: ''; position: absolute; inset: 0;
    left: 0; top: 0; width: auto; height: auto;
    border: 0; transform: none;
    background: #fff;
    -webkit-mask: var(--cctx-check) center / 11px 11px no-repeat;
    mask: var(--cctx-check) center / 11px 11px no-repeat;
}
/* Satir hover'inda zemin ACCENT olur (`.ctx-item:hover`); kutu da accent
   kalirsa kutu ZEMINDE KAYBOLUR. Kutu KOYU zemine doner, tik BEYAZ kalir →
   kutu accent satirdan ayrisir, tik okunur kalir. Renkler mevcut temadan
   (`--bg-primary`); yeni palet URETILMEZ. */
#category-notif-menu .ctx-toggle.ctx-on:hover .ctx-check-box,
#channel-ctx-menu .ctx-toggle.ctx-on:hover .ctx-check-box,
#sidebar-ctx-menu .ctx-toggle.ctx-on:hover .ctx-check-box {
    background: var(--bg-primary); border-color: var(--bg-primary);
}
#category-notif-menu .ctx-toggle.ctx-on:hover .ctx-check-box::after,
#channel-ctx-menu .ctx-toggle.ctx-on:hover .ctx-check-box::after,
#sidebar-ctx-menu .ctx-toggle.ctx-on:hover .ctx-check-box::after {
    background: #fff;
}
/* Composer send button (shown when "Mesaj Gönder Butonu" is enabled) — accent arrow, no circle */
.composer-send-btn.hidden { display: none; }
.composer-send-btn {
    position: relative; margin-left: 6px;
    color: var(--text-muted); background: transparent;
    transition: color 0.15s ease, background 0.15s ease, transform 0.08s ease;
}
.composer-send-btn .composer-send-icon { transition: transform 0.12s ease; }
/* Empty / disabled: passive, muted, not clickable */
.composer-send-btn:not(.active) {
    pointer-events: none; cursor: default; background: transparent; color: var(--text-muted); opacity: 0.55;
}
/* Active: accent (blue) arrow on the standard square button shape */
.composer-send-btn.active { color: var(--accent); background: transparent; }
.composer-send-btn.active:hover { color: var(--accent); background: var(--bg-hover); }
.composer-send-btn.active:hover .composer-send-icon { transform: translateX(1px) scale(1.06); }
.composer-send-btn.active:focus-visible {
    outline: none; box-shadow: 0 0 0 3px var(--accent-soft);
}
.composer-send-btn.active:active { transform: scale(0.9); }
/* Small divider separating the send button from the emoji/sticker/GIF buttons */
.composer-send-btn::before {
    content: ''; position: absolute; left: -6px; top: 50%; transform: translateY(-50%);
    width: 1px; height: 24px; background: var(--border);
}
/* Context menu open: lock cursor to default outside the open menu */
body.ctx-menu-open * { cursor: default !important; }
/* 5100 paritesi: yukaridaki `*` kurali menu ogesinin COCUKLARINI da (etiket
   <span>'i, ikon <svg>'si) `default`a cektiginden ogenin GERCEK METNI uzerinde
   ok imleci cikiyordu — yalniz dolgu alaninda pointer goruluyordu. Tiklanabilir
   her yuzey (ve cocuklari) pointer; devre disi olan `not-allowed`; salt-okunur /
   ayrac / etiket ise ACIKCA `default`. */
body.ctx-menu-open .context-menu .ctx-item,
body.ctx-menu-open .context-menu .ctx-item *,
body.ctx-menu-open .context-menu .ctx-submenu-trigger,
body.ctx-menu-open .context-menu .ctx-submenu-trigger *,
body.ctx-menu-open .context-menu .ctx-submenu-item-clickable,
body.ctx-menu-open .context-menu .ctx-submenu-item-clickable *,
body.ctx-menu-open .context-menu .ctx-server-item,
body.ctx-menu-open .context-menu .ctx-server-item *,
body.ctx-menu-open .context-menu .uctx-volume-slider,
body.ctx-menu-open .context-menu .ctx-react-btn { cursor: pointer !important; }
body.ctx-menu-open .context-menu .ctx-disabled,
body.ctx-menu-open .context-menu .ctx-disabled * { cursor: not-allowed !important; }
body.ctx-menu-open .context-menu .ctx-submenu-item-readonly,
body.ctx-menu-open .context-menu .ctx-submenu-item-readonly *,
body.ctx-menu-open .context-menu .ctx-submenu-loading,
body.ctx-menu-open .context-menu .ctx-separator,
body.ctx-menu-open .context-menu .uctx-volume-label,
body.ctx-menu-open .context-menu .uctx-volume-label *,
body.ctx-menu-open .context-menu .uctx-volume-value { cursor: default !important; }

/* ═══════════════ MODALS ═══════════════ */
.modal { position: fixed; inset: 0; z-index: 600; display: flex; align-items: center; justify-content: center; overscroll-behavior: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(6px); }
.modal-content {
    position: relative;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 32px; width: 90%; max-width: 440px;
    box-shadow: var(--shadow-lg), var(--glow);
    border: 1px solid var(--border);
    animation: modalIn 0.2s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.modal-content.modal-sm { max-width: 380px; }
.modal-content h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.modal-content p { color: var(--text-secondary); font-size: 14px; margin-bottom: 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.modal-actions .btn-primary, .modal-actions .btn-danger { width: auto; padding: 10px 24px; }

/* C4: onay diyalogundaki "Bir daha sorma" kutusu. Kapsam YALNIZ
   `#generic-confirm-modal` — global `.modal-actions` ve buton kurallari
   DEGISMEZ. Kutu varsayilan gizlidir (`.hidden`, global `display:none`). */
#generic-confirm-modal .cd-dontask {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}
#generic-confirm-modal .cd-dontask:hover { color: var(--text-primary); }
#generic-confirm-modal .cd-dontask input {
    width: 15px;
    height: 15px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--accent);
}

/* ─── Sunucuya Katıl — örnek format ipucu + canlı önizleme kartı ─── */
.join-invite-examples { margin-top: 6px; font-size: 11px; color: var(--text-muted, #949ba4); }
.join-invite-examples code {
    background: var(--bg-surface, #2b2d31); padding: 1px 5px; border-radius: 4px;
    font-size: 11px; color: var(--text-secondary, #b5bac1);
}
.join-preview {
    display: flex; align-items: center; gap: 12px;
    margin: 12px 0 4px; padding: 10px 12px;
    background: var(--bg-surface, #2b2d31); border: 1px solid var(--border, #1e1f22);
    border-radius: 10px;
}
.join-preview-icon {
    width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 18px; color: #fff; overflow: hidden;
}
.join-preview-icon img { width: 100%; height: 100%; object-fit: cover; }
.join-preview-info { min-width: 0; }
.join-preview-name { font-size: 15px; font-weight: 700; color: var(--text-primary, #f2f3f5); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.join-preview-meta { font-size: 12px; color: var(--text-secondary, #b5bac1); margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.join-preview-meta .jp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--online, #10B981); display: inline-block; }
.join-preview-meta .jp-sep { opacity: 0.5; }
#confirm-join-btn.loading { opacity: 0.7; cursor: default; }

/* ─── Sunucu Oluştur sihirbazı (wizard) ─── */
.cw-choices { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; max-height: 340px; overflow-y: auto; padding: 4px 4px 4px 0; }
.cw-section-label { margin: 14px 2px 0; font-size: 11px; font-weight: 800; letter-spacing: 0.5px; color: var(--text-muted, #949ba4); }
/* Özelleştir adımı — "oluşturulacak kanallar" önizlemesi */
.cw-preview {
    margin-top: 14px; padding: 12px 14px; border-radius: 10px;
    background: rgb(var(--overlay-rgb) / 0.03); border: 1px solid var(--border, #1e1f22);
    max-height: 160px; overflow-y: auto;
}
.cw-preview-title { font-size: 11px; font-weight: 800; letter-spacing: 0.5px; color: var(--text-muted, #949ba4); margin-bottom: 8px; }
.cw-preview-cat { font-size: 10px; font-weight: 700; letter-spacing: 0.4px; color: var(--text-muted, #949ba4); margin: 10px 0 4px; }
.cw-preview-cat:first-of-type { margin-top: 0; }
.cw-preview-chans { display: flex; flex-wrap: wrap; gap: 6px; }
.cw-preview-chan { font-size: 12px; color: var(--text-secondary, #b5bac1); background: var(--bg-input, #1e1f22); padding: 3px 9px; border-radius: 6px; }
.cw-choice {
    display: flex; align-items: center; gap: 14px; width: 100%;
    padding: 12px 14px; border-radius: 10px;
    background: var(--bg-surface, #2b2d31); border: 1px solid var(--border, #1e1f22);
    color: var(--text-primary, #f2f3f5); cursor: pointer; text-align: left;
    transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.cw-choice:hover {
    background: var(--bg-secondary, #232428);
    border-color: var(--accent, #06B6D4);
    transform: translateY(-1px);
}
.cw-choice-badge {
    width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(168, 85, 247, 0.14));
    border: 1px solid rgb(var(--overlay-rgb) / 0.07);
    transition: transform var(--transition), border-color var(--transition), background var(--transition);
}
.cw-choice-badge svg { width: 23px; height: 23px; display: block; }
.cw-svg-defs { position: absolute; width: 0; height: 0; pointer-events: none; }
.cw-choice:hover .cw-choice-badge {
    transform: scale(1.06);
    border-color: rgba(34, 211, 238, 0.45);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(168, 85, 247, 0.22));
}
.cw-choice-label { flex: 1; font-size: 15px; font-weight: 600; }
.cw-choice-arrow { font-size: 22px; color: var(--text-muted, #949ba4); }
.cw-join-hint {
    margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border, #1e1f22);
    text-align: center; font-size: 13px; font-weight: 700; color: var(--text-secondary, #b5bac1);
}
.cw-link {
    background: none; border: none; cursor: pointer; padding: 0;
    color: var(--accent, #06B6D4); font-size: 13px; font-weight: 700;
}
.cw-link:hover { text-decoration: underline; }
/* Özelleştir adımı — ikon yükleyici (mevcut kırpma akışını kullanır) */
.cw-icon-picker { display: flex; justify-content: center; margin: 14px 0 18px; }
.cw-icon-upload {
    position: relative; width: 80px; height: 80px; border-radius: 50%;
    background: var(--bg-surface, #2b2d31) center/cover no-repeat;
    border: 2px dashed var(--text-muted, #949ba4); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary, #b5bac1);
}
.cw-icon-upload .cw-icon-placeholder {
    font-size: 10px; font-weight: 700; line-height: 1.5; text-align: center; letter-spacing: 0.5px;
}
.cw-icon-upload.has-image { border-style: solid; border-color: transparent; }
.cw-icon-upload.has-image .cw-icon-placeholder { display: none; }
.cw-icon-plus {
    position: absolute; top: -2px; right: -2px; width: 24px; height: 24px;
    border-radius: 50%; background: var(--accent, #06B6D4); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 700; border: 3px solid var(--bg-primary, #080A10);
}
#confirm-create-btn:disabled { opacity: 0.7; cursor: default; }

/* ─── Sihirbaz Aşama 4: intent / ilerleme / geçiş / kutlama ─── */
.cw-progress { display: flex; gap: 6px; justify-content: center; margin-bottom: 14px; }
.cw-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border, #1e1f22); transition: all var(--transition); }
.cw-dot.active { width: 22px; border-radius: 4px; background: linear-gradient(135deg, var(--accent, #06B6D4), var(--accent2, #8B5CF6)); }
@keyframes cwStepIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }
.cw-step:not(.hidden) { animation: cwStepIn 0.22s ease; }
@keyframes cwCelebrate {
    0% { box-shadow: 0 0 0 0 rgba(6,182,212,0); }
    30% { box-shadow: 0 0 0 4px rgba(6,182,212,0.55), 0 0 18px rgba(139,92,246,0.6); }
    100% { box-shadow: 0 0 0 0 rgba(6,182,212,0); }
}
.server-icon.cw-celebrate { animation: cwCelebrate 1.6s ease; }

.modal-close {
    position: absolute; top: 12px; right: 16px; font-size: 24px;
    color: var(--text-muted); cursor: pointer; background: none;
    line-height: 1; transition: color var(--transition);
}
.modal-close:hover { color: var(--text-primary); }

.delete-preview {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-left: 2px solid rgba(237, 66, 69, 0.4);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 13px; color: var(--text-secondary);
    max-height: 220px; overflow-y: auto;  /* uzun mesaj: kısmen göster + kaydır (kesme/"..." yok) */
}
/* Kaydırma çubuğu thumb'ı en üst/en altta yuvarlak köşelere taşmasın → track'i içeri çek */
.delete-preview::-webkit-scrollbar-track { margin: 9px 0; background: transparent; }
.delete-preview.has-media-preview {
    max-height: min(360px, 55vh);
    overflow-y: auto;
}
/* Davet kartı: kaydırma barı olmadan tamamını göster (kapak yok) */
.delete-preview.has-invite-card {
    max-height: none;
    overflow-y: visible;
}
.dp-label {
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--text-muted); margin-bottom: 6px;
}
.dp-warning {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
}
#delete-confirm-modal .btn-danger:active { transform: translateY(1px); }
#delete-confirm-modal .btn-danger:disabled {
    opacity: 0.55; cursor: not-allowed; transform: none;
}
.dp-author {
    font-size: 14px; font-weight: 700;
    margin-bottom: 2px; line-height: 1.3;
}
/* Mesajı Sil / Mesajı Sabitle — geniş modal + mesaj-tarzı önizleme (avatar + ad + saat) + TÜYO ipucu.
   İki onay penceresi AYNI boyutta olmalı (aynı desen, aynı önizleme). */
#delete-confirm-modal .modal-content,
#pin-confirm-modal .modal-content { max-width: 460px; }
/* Aksiyon satırı flex + stretch: .btn-primary'nin taban `margin-top: 4px`'i (tam genişlikli auth
   butonu içindir) onu satırdaki diğer butondan 4px KISA bırakıyordu → onay butonları eşit yükseklikte. */
#pin-confirm-modal .modal-actions .btn-primary { margin-top: 0; }
.dp-msg { display: flex; gap: 12px; align-items: flex-start; }
.dp-msg-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; font-size: 16px; overflow: hidden; }
.dp-msg-avatar .avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.dp-msg-body { flex: 1; min-width: 0; }
.dp-msg-header { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.dp-time { font-size: 11px; color: var(--text-muted); font-weight: 400; white-space: nowrap; }
.dp-reactions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }  /* silinecek mesajın tepkileri */
.dp-reactions .reaction-badge { cursor: default; }  /* önizleme: statik (mine vurgusu sohbetteki gibi mavi, tıklanmaz) */
.dp-tip { font-size: 12px; color: var(--text-secondary); margin-top: 12px; padding: 9px 11px; background: rgb(var(--overlay-rgb) / 0.035); border-radius: 7px; line-height: 1.5; }
.dp-tip strong { color: var(--online, #10B981); }
.dp-tip kbd { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; font-size: 11px; font-family: inherit; color: var(--text-primary); }
.delete-preview-text {
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.45;
    /* Çok satırlı mesaj (Shift+Enter) önizlemede de sohbetteki gibi ALT ALTA görünsün —
       içerik esc'li düz metin olduğundan \n'ler aksi halde tek satıra yapışıyordu. */
    white-space: pre-wrap;
}
.delete-preview-attach { margin-top: 6px; }
.delete-preview-invite { margin-top: 10px; max-width: 100%; }  /* davet kartı modale sığsın */
.delete-preview-invite .invite-embed-desc.clamped { cursor: default; }  /* önizlemede açıklama kısmen gösterilir, tıklanmaz */
.delete-preview-attach img, .delete-preview-attach video { display: block; }
.delete-preview-file { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); }
#delete-confirm-modal .delete-preview-attach img,
#pin-confirm-modal .delete-preview-attach img {
    max-width: 100%;
    max-height: min(280px, 42vh);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
    display: block;
}
#delete-confirm-modal .delete-preview-attach video,
#pin-confirm-modal .delete-preview-attach video {
    max-width: 100%;
    max-height: min(280px, 42vh);
    object-fit: contain;
    border-radius: var(--radius-sm);
    display: block;
}
/* Silme önizlemesinde fmt ile gelen GIF/çıkartma figürlerini kompakt tut */
#delete-confirm-modal .delete-preview-attach .msg-gif,
#pin-confirm-modal .delete-preview-attach .msg-gif { margin: 0; max-width: 100%; }
#delete-confirm-modal .delete-preview-attach .msg-gif-img,
#pin-confirm-modal .delete-preview-attach .msg-gif-img { max-height: 160px; }
#delete-confirm-modal .delete-preview-attach .msg-sticker,
#pin-confirm-modal .delete-preview-attach .msg-sticker { margin: 0; }
#delete-confirm-modal .delete-preview-attach .msg-sticker-img,
#pin-confirm-modal .delete-preview-attach .msg-sticker-img { width: 110px; height: 110px; max-height: none; }

/* ─── Modal Tabs ─────────────────────── */
.modal-tabs {
    display: flex; gap: 2px; margin-bottom: 24px;
    background: var(--bg-input); border-radius: var(--radius-sm);
    padding: 3px;
}
.modal-tab {
    flex: 1; padding: 9px; text-align: center; font-weight: 700; font-size: 13px;
    border-radius: 6px; cursor: pointer; color: var(--text-muted);
    transition: all var(--transition);
}
.modal-tab:hover { color: var(--text-secondary); }
.modal-tab.active { background: var(--accent-grad); color: white; }

.modal-tab-content { display: none; }
.modal-tab-content.active { display: block; }

/* Sunucu modalı sekme geçişi: içerik fade + modal yükseklik animasyonu (Oluştur/Katıl boyut farkını yumuşatır) */
#server-modal .modal-content { transition: height 0.28s cubic-bezier(0.4, 0, 0.2, 1); }
#server-modal .modal-tab-content.active { animation: modalTabFade 0.24s ease; }
@keyframes modalTabFade { from { opacity: 0; } to { opacity: 1; } }

/* ─── Invite Modal ────────────────────── */
.invite-modal-inner {
    text-align: left;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(148,163,184,0.28) transparent;
}
.invite-modal-inner::-webkit-scrollbar { width: 6px; }
.invite-modal-inner::-webkit-scrollbar-track { background: transparent; }
.invite-modal-inner::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.28); border-radius: 999px; }
.invite-modal-inner::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,0.44); }
.invite-modal-inner h2 {
    text-align: left;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}
.invite-result {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 16px;
    animation: fadeSlideIn 0.2s ease;
}
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.invite-result-code-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.invite-result-code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.5px;
    user-select: all;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
}
.invite-result-copy {
    flex-shrink: 0;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
}
.invite-result-copy:hover { opacity: 0.85; }
.invite-result-meta {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Invite field (dropdown rows) */
.invite-field {
    margin-bottom: 16px;
}
.invite-field-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    margin-bottom: 8px;
    text-transform: uppercase;
}
/* Custom select dropdown */
.custom-select {
    position: relative;
    width: 100%;
}
.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 4px;
    background: var(--ui-tertiary);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: background 0.15s;
}
.custom-select-trigger:hover {
    background: var(--ui-secondary-alt);
}
.custom-select.open .custom-select-trigger {
    background: var(--ui-secondary-alt);
}
/* İstek: davet modalındaki KAPALI dropdown tetikleyicilerinin ("7 gün" / "Limit yok") ARKA PLANI
   daha temiz/güzel — hafif elevated yüzey + yumuşak kenarlık; hover/açıkken accent kenarlık.
   Yalnızca #invite-modal kapsamında; açılan liste (.custom-select-option) ETKİLENMEZ. */
#invite-modal .custom-select-trigger {
    background: rgb(var(--overlay-rgb) / 0.045);
    border: 1px solid rgba(148, 163, 184, 0.14);
}
#invite-modal .custom-select-trigger:hover,
#invite-modal .custom-select.open .custom-select-trigger {
    background: rgb(var(--overlay-rgb) / 0.08);
    border-color: rgba(6, 182, 212, 0.45);
}
.custom-select-arrow {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}
.custom-select.open .custom-select-arrow {
    transform: rotate(180deg);
}
.custom-select-options {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--surface-menu, var(--ui-floating));
    border-radius: 4px;
    padding: 4px;
    z-index: 100;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    animation: customSelectFadeIn 0.15s ease;
}
@keyframes customSelectFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.custom-select.open .custom-select-options {
    display: block;
}
.custom-select-option {
    padding: 10px 10px;
    font-size: 14px;
    color: var(--text-secondary);
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
}
.custom-select-option:hover {
    background: rgba(79, 84, 92, 0.4);
    color: var(--text-primary);
}
.custom-select-option.selected {
    background: var(--accent);
    color: #fff;
}
.custom-select-option.selected:hover {
    background: #4752c4;
    color: #fff;
}

/* Scrollbar for custom select options — Firefox/Gecko: scrollbar-width yoksa native GENİŞ bar çıkıyordu */
.custom-select-options { scrollbar-width: thin; scrollbar-color: rgb(var(--overlay-rgb) / 0.16) transparent; }
.custom-select-options::-webkit-scrollbar {
    width: 6px;
}
.custom-select-options::-webkit-scrollbar-track {
    background: transparent;
}
.custom-select-options::-webkit-scrollbar-thumb {
    background: rgb(var(--overlay-rgb) / 0.1);
    border-radius: 3px;
}
.custom-select-options::-webkit-scrollbar-thumb:hover {
    background: rgb(var(--overlay-rgb) / 0.2);
}

/* Invite toggle row */
.invite-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding: 8px 0;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}
.invite-toggle-text {
    flex: 1;
    min-width: 0;
}
.invite-toggle-title {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.invite-toggle-desc {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #72767d;
    border-radius: 12px;
    transition: background 0.2s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-slider {
    background: #3ba55d;
}
.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}
/* KEYBOARD-FOCUS-VISIBILITY-1: girdi gizli (opacity 0, 0x0) → klavye odagi gorunen kaydiriciya yansir. */
.toggle-switch input:focus-visible + .toggle-slider { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* Invite bottom actions */
.invite-bottom-actions {
    position: sticky;
    bottom: 0;
    background: var(--bg-surface);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 8px 0 24px;
    flex-shrink: 0;
}
.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: color 0.15s;
}
.btn-text:hover {
    color: var(--text-primary);
}
#generate-invite-btn {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
}
#invite-modal .modal-content {
    max-width: 480px;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 0;
}

/* Invite friend list */
.invite-friends-section {
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-top: 4px;
    margin-bottom: 12px;
}
.invite-friend-search-box {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-input); border-radius: var(--radius-sm);
    padding: 6px 10px; margin: 8px 0;
    border: 1px solid var(--border);
    transition: border-color var(--transition);
}
.invite-friend-search-box:focus-within { border-color: var(--accent); }
.invite-friend-search-box input {
    flex: 1; font-size: 13px; color: var(--text-primary); background: none; border: none; outline: none;
}
.invite-friend-search-box input::placeholder { color: var(--text-muted); }
.invite-friend-list {
    /* SABİT yükseklik: arama/filtre yapınca liste küçülüp modal boyutu DEĞİŞMESİN (pencere sabitken sabit kalır). */
    height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px;
    /* İnce kaydırma barı (Firefox: scrollbar-width; Chromium global ::-webkit-scrollbar zaten ince). */
    scrollbar-width: thin; scrollbar-color: rgba(148,163,184,0.3) transparent;
}
.invite-friend-item {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 8px; border-radius: var(--radius-sm);
    transition: background var(--transition);
}
.invite-friend-item:hover { background: var(--bg-hover); }
.invite-friend-avatar {
    width: 32px; height: 32px; min-width: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; color: #fff; overflow: hidden;
}
.invite-friend-avatar .avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.invite-friend-info { flex: 1; min-width: 0; }
.invite-friend-name {
    font-size: 13px; font-weight: 600; color: var(--text-primary);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    display: flex; align-items: center; gap: 6px;
}
.invite-source-tag {
    font-size: 10px; font-weight: 500; color: var(--text-muted);
    background: rgb(var(--overlay-rgb) / 0.06); border-radius: 3px;
    padding: 1px 5px; flex-shrink: 0;
}
.invite-friend-tag { font-size: 11px; color: var(--text-muted); }
.invite-friend-status {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.invite-friend-status.online { background: var(--online); }
.invite-friend-status.idle { background: var(--idle); }
.invite-friend-status.dnd { background: var(--dnd); }
.invite-friend-status.offline { background: var(--offline); }
.invite-send-note {
    display: flex; align-items: flex-start; gap: 8px;
    margin: 6px 0 8px; padding: 7px 10px;
    border-radius: var(--radius-sm);
    background: rgb(15 23 42 / calc(0.35 * var(--shade-k)));
    border: 1px solid rgba(148, 163, 184, 0.12);
    color: var(--text-muted); font-size: 11.5px; line-height: 1.4;
}
.invite-send-note-icon {
    width: 15px; height: 15px; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 auto; margin-top: 1px;
    color: var(--accent); background: var(--accent-soft);
    font-size: 10px; font-weight: 700; font-style: normal;
}
.invite-friend-btn {
    padding: 4px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: transparent; color: var(--text-primary); font-size: 12px; font-weight: 600;
    cursor: pointer; transition: background 0.15s, border-color 0.15s; flex-shrink: 0;
}
.invite-friend-btn:hover { background: var(--bg-hover); border-color: var(--text-muted); }
.invite-friend-btn.sent {
    background: var(--online); color: #fff; border-color: var(--online);
    cursor: default; opacity: 0.8;
}
.invite-friend-btn.member {
    background: transparent; color: var(--text-muted); border-color: transparent;
    cursor: default; opacity: 0.6; font-weight: 500;
}
.invite-friends-empty {
    /* Sabit yükseklikli listede dikeyde ortalanır (flex:1 ile tüm boşluğu doldurur). */
    flex: 1 1 auto; min-height: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; text-align: center; color: var(--text-muted); padding: 16px;
}
.invite-empty-icon {
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(6,182,212,0.12), rgba(139,92,246,0.12));
    color: var(--accent); margin-bottom: 2px;
}
.invite-empty-icon svg { width: 22px; height: 22px; }
.invite-empty-title { font-size: 13.5px; font-weight: 700; color: var(--text-primary); }
.invite-empty-text { font-size: 12px; color: var(--text-muted); line-height: 1.4; max-width: 220px; }
.spin-icon {
    animation: spinAnim 0.8s linear infinite;
}
@keyframes spinAnim {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ─── Forward Modal ─────────────────────────────────────────────────────────── */
#forward-modal .modal-backdrop { backdrop-filter: blur(2px); }
.forward-modal-content {
    max-width: 460px;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}
.forward-modal-header {
    padding: 20px 24px 14px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.forward-modal-header h2 { font-size: 18px; font-weight: 700; margin-bottom: 3px; }
.forward-modal-sub { color: var(--text-secondary); font-size: 13px; margin: 0; }
#forward-modal .modal-close { top: 14px; right: 16px; }
.forward-search-wrap {
    display: flex; align-items: center; gap: 8px;
    margin: 10px 16px 6px;
    padding: 7px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.forward-search-wrap:hover { border-color: rgba(6,182,212,0.22); }
.forward-search-wrap:focus-within {
    border-color: rgba(6,182,212,0.6);
    box-shadow: 0 0 0 3px rgba(6,182,212,0.09), 0 0 0 5px rgba(139,92,246,0.06);
}
.forward-search-icon { color: var(--text-muted); flex-shrink: 0; }
.forward-search-input {
    flex: 1; background: none; border: none; outline: none;
    font-size: 13px; color: var(--text-primary);
}
.forward-search-input::placeholder { color: var(--text-muted); }
.forward-target-list {
    flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
    padding: 4px 8px;
    display: flex; flex-direction: column; gap: 2px;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(148,163,184,0.25) transparent;
}
.forward-target-list::-webkit-scrollbar { width: 5px; }
.forward-target-list::-webkit-scrollbar-track { background: transparent; }
.forward-target-list::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.25); border-radius: 999px; }
.forward-target-list::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,0.4); }
.fwd-empty { text-align: center; color: var(--text-muted); font-size: 13px; padding: 32px 0; }
.forward-target-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: var(--radius-sm);
    cursor: pointer; border: 1px solid transparent;
    transition: background var(--transition), border-color var(--transition);
    user-select: none;
}
.forward-target-item:hover { background: var(--bg-hover); }
.forward-target-item.selected {
    background: rgba(6,182,212,0.08);
    border-color: rgba(6,182,212,0.35);
}
.fwd-avatar-wrap { position: relative; flex-shrink: 0; width: 36px; height: 36px; }
.fwd-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; color: white; flex-shrink: 0;
}
.fwd-ch-icon {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}
.fwd-srv-icon {
    width: 36px; height: 36px;
    border-radius: 12px;
    background: var(--bg-tertiary);
    box-shadow: inset 0 0 0 1px rgb(var(--overlay-rgb) / 0.07);
    overflow: visible;
    position: relative;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 700; color: var(--text-primary);
}
.fwd-srv-img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}
.fwd-srv-fallback {
    background: linear-gradient(135deg, rgba(99,102,241,0.28) 0%, rgba(6,182,212,0.18) 100%);
    color: var(--text-secondary);
}
.fwd-ch-badge {
    position: absolute;
    right: -5px; bottom: -5px;
    width: 17px; height: 17px;
    border-radius: 6px;
    font-size: 11px; font-weight: 800;
    color: var(--text-primary);
    background: var(--bg-secondary, var(--bg-surface));
    border: 2px solid var(--bg-primary, var(--bg-surface));
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
    pointer-events: none;
}
.fwd-status-dot {
    position: absolute; bottom: 0; right: 0;
    width: 10px; height: 10px; border-radius: 50%;
    border: 2px solid var(--bg-surface);
}
.fwd-status-online { background: var(--online); }
.fwd-status-idle { background: var(--idle); }
.fwd-status-dnd { background: var(--dnd); }
.fwd-status-offline { background: var(--offline); }
.fwd-info { flex: 1; min-width: 0; }
.fwd-name {
    font-size: 14px; font-weight: 600; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fwd-sub {
    font-size: 11px; color: var(--text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fwd-checkbox {
    width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
    border: 2px solid var(--border); background: transparent;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition), border-color var(--transition);
}
.fwd-checkbox.checked { background: var(--accent); border-color: var(--accent); }
.forward-footer {
    flex-shrink: 0;
    border-top: 1px solid var(--border);
    padding: 12px 16px 16px;
}
.forward-optional-msg-wrap { margin-bottom: 10px; position: relative; }
.forward-optional-msg {
    width: 100%; background: var(--bg-input);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 8px 40px 8px 12px; font-size: 13px; color: var(--text-primary);   /* sağda emoji butonu için boşluk */
    outline: none; box-sizing: border-box;
    transition: border-color var(--transition), box-shadow var(--transition);
    /* textarea: Shift+Enter ile çok satır (composer gibi); auto-grow JS ile, max 120px sonra kaydırma */
    resize: none; display: block; font-family: inherit; line-height: 1.4;
    min-height: 38px; max-height: 120px; overflow-y: auto;
}
/* "İsteğe bağlı mesaj" barındaki emoji ekleme butonu (input'un sağında, dikeyde ortalı) */
.forward-emoji-btn {
    position: absolute; right: 6px; bottom: 5px;   /* alt-sağ — textarea büyüyünce de altta kalsın (tek satırda ~ortalı) */
    width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
    background: none; border: none; border-radius: 6px; cursor: pointer;
    transition: background var(--transition);
}
.forward-emoji-btn:hover { background: rgb(var(--overlay-rgb) / 0.06); }
/* Emoji yüzü composer'daki #emoji-btn gibi: boşta soluk gri 😊, hover/açıkken renkli/canlı */
.forward-emoji-btn.emoji-btn-default .emoji-btn-face { opacity: 0.55; filter: grayscale(1) saturate(0.15) brightness(0.85); transform: scale(1) rotate(0deg); }
/* Rastgele emoji boştayken (hover değil) soluk gri — composer #emoji-btn ile aynı */
.forward-emoji-btn.emoji-btn-has-random:not(.emoji-btn-hovered) .emoji-btn-face { opacity: 0.55; filter: grayscale(1) saturate(0.2) brightness(0.85); transform: scale(1) rotate(0deg); }
.forward-emoji-btn:hover .emoji-btn-face { opacity: 1; filter: none; transform: scale(1.1) rotate(0deg); }
.forward-emoji-btn.picker-open .emoji-btn-face { opacity: 1 !important; filter: none !important; transform: scale(1.08) rotate(5deg); }
/* Swap geçiş anı: kısa fade-out/scale (composer ile aynı) */
.forward-emoji-btn.emoji-btn-swap .emoji-btn-face { opacity: 0; filter: grayscale(1) saturate(0.1) brightness(0.8); transform: scale(0.55) rotate(12deg); transition: opacity 40ms ease-in, transform 40ms ease-in, filter 40ms ease-in; }
.forward-optional-msg::placeholder { color: var(--text-muted); }
.forward-optional-msg:hover { border-color: rgba(6,182,212,0.22); }
.forward-optional-msg:focus {
    border-color: rgba(6,182,212,0.6);
    box-shadow: 0 0 0 3px rgba(6,182,212,0.09), 0 0 0 5px rgba(139,92,246,0.06);
}
.forward-footer-row {
    display: flex; align-items: center;
    justify-content: space-between; gap: 12px;
}
.forward-selected-info { font-size: 13px; color: var(--text-muted); flex-shrink: 0; }
.forward-footer-btns { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
#forward-send-btn.is-disabled,
#forward-send-btn.is-disabled:hover,
#forward-send-btn.is-disabled:focus,
#forward-send-btn.is-disabled:active { opacity: 0.42; cursor: default; transform: none; filter: none; box-shadow: none; }
#forward-send-btn.is-loading { opacity: 0.75; cursor: wait; }

/* ═══════════════ TOAST ═══════════════ */
.toast {
    /* Composer'ın CANLI yüksekliğini izler (--composer-height, ResizeObserver ile güncellenir):
       toast görünürken bar büyür/küçülürse konum da onunla birlikte kayar. Fallback 68+12=80px. */
    position: fixed; bottom: calc(var(--composer-height, 68px) + 12px); left: 50%; transform: translateX(-50%);
    background: var(--bg-surface); color: var(--text-primary);
    padding: 12px 28px; border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg); border: 1px solid var(--border);
    /* Toast TÜM tam-ekran katmanların üstünde kalmalı: kanal/kategori ayarları
       overlay'i (.chs-overlay, z 2000), onay modali (2200), lightbox (9500)…
       eski 1200 değerinde "Davet bağlantısı kopyalandı" gibi bildirimler kanal
       ayarları açıkken ARKADA kalıyordu. #app-tooltip (9999) hemen üstte kalır. */
    font-size: 14px; font-weight: 500; z-index: 9998;
    animation: toastIn 0.3s ease;
}
.toast.toast-error {
    background: #ed4245; color: #fff; border-color: #c93b3e;
}
/* Uyarı toast'ı — düz turuncu yerine şık yumuşak ton (success/info/blocked ile aynı tasarım dili):
   koyu amber zemin + amber sol vurgu + hafif glow. */
.toast.toast-warning {
    background: var(--toast-warning-bg); color: var(--toast-warning-fg);
    border-color: rgba(250,166,26,0.28); border-left: 3px solid #faa61a;
    box-shadow: 0 8px 28px rgba(0,0,0,0.55), 0 0 12px rgba(250,166,26,0.12);
}
.toast.toast-success {
    background: var(--toast-success-bg); color: var(--toast-success-fg);
    border-color: rgba(87,242,135,0.18); border-left: 3px solid #57f287;
    box-shadow: 0 8px 28px rgba(0,0,0,0.55), 0 0 12px rgba(87,242,135,0.1);
}
.toast.toast-success::before { content: '\2713\00A0\00A0'; font-weight: 700; }
.toast.toast-info {
    background: var(--toast-info-bg); color: var(--text-primary);
    border-color: rgba(6,182,212,0.25); border-left: 3px solid var(--accent);
    box-shadow: 0 8px 28px rgba(0,0,0,0.55), 0 0 10px rgba(6,182,212,0.08);
}
/* Engel/kısıt uyarısı — sert dolu kırmızı yerine şık yumuşak ton (success/info ile aynı
   tasarım dili): koyu kırmızı zemin + kırmızı sol vurgu + hafif glow. */
.toast.toast-blocked {
    background: var(--toast-blocked-bg); color: var(--toast-blocked-fg);
    border-color: rgba(237,66,69,0.28); border-left: 3px solid #ed4245;
    box-shadow: 0 8px 28px rgba(0,0,0,0.55), 0 0 12px rgba(237,66,69,0.12);
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(12px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ═══════════════ SERVER SETTINGS ═══════════════ */

/* ─── Server Dropdown ────────────────── */
.server-header-clickable {
    padding: 12px 16px;
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; min-height: 49px;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
    user-select: none;
}
.server-header-clickable:hover { background: var(--bg-hover); }
.server-header-clickable.open { background: var(--bg-active); }
.server-header-clickable h3 {
    font-size: 15px; font-weight: 700;
    flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.server-header-clickable .chevron-icon {
    transition: transform 0.2s ease; opacity: 0.6; flex-shrink: 0;
}
.server-header-clickable.open .chevron-icon {
    transform: rotate(180deg); opacity: 1;
}

.server-dropdown {
    position: absolute; top: 49px; left: 8px; right: 8px;
    z-index: 200; background: var(--bg-primary);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    animation: dropdownIn 0.12s ease;
}
@keyframes dropdownIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

.server-dropdown-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 8px 10px;
    font-size: 13px; font-weight: 500;
    color: var(--text-secondary);
    border-radius: 4px; cursor: pointer;
    transition: all var(--transition);
    background: none; border: none; text-align: left;
}
.server-dropdown-item:hover {
    background: var(--accent); color: var(--ui-text-strong);
}
.server-dropdown-item.danger { color: var(--dnd); }
.server-dropdown-item.danger:hover { background: var(--dnd); color: var(--ui-text-strong); }
/* 5100 paritesi: dropdown'daki toggle girisinin onay kutusu SAGA yaslanir.
   Kutunun GORUNUMU mevcut `.ctx-toggle .ctx-check-box` kurallarindan gelir —
   ikinci bir toggle stili YAZILMAZ.
   `flex: 0 0 auto` ZORUNLU: `.server-dropdown-item span { flex: 1 }` kurali
   onay kutusunu da (o da bir `<span>`) ESNETIYOR ve kutu ~100px genisliginde
   bir accent serit haline gelip etiketi kisaltiyordu (tarayicida olculdu:
   18px yerine 100.5px). Taban kural yalnizca `flex-shrink` verir. */
.server-dropdown-item.ctx-toggle .ctx-check-box { flex: 0 0 auto; margin-left: 4px; }
/* 5100 paritesi: bu satirda ikon BASTA durur. Paylasilan
   `.server-dropdown-item svg { margin-left: auto }` kurali (diger satirlarda
   ikon SONDA oldugu icin var) onu saga iterdi -> yalniz toggle satirinda
   sifirlanir. Diger dropdown satirlari ETKILENMEZ. */
.server-dropdown-item.ctx-toggle svg { margin-left: 0; }
.server-dropdown-sep {
    height: 1px; background: var(--border);
    margin: 4px 0;
}

/* ─── Full-Screen Settings ───────────── */
.settings-fullscreen {
    position: fixed; inset: 0; z-index: 500;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(3px);
    animation: settingsIn 0.2s ease;
    padding: 20px;
    overscroll-behavior: none;
}
@keyframes settingsIn {
    from { opacity: 0; } to { opacity: 1; }
}
.settings-popup {
    display: flex;
    width: 90vw;
    max-width: 1100px;
    height: 85vh;
    max-height: 800px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    position: relative;
    animation: settingsPopupIn 0.2s ease;
}
@keyframes settingsPopupIn {
    from { transform: scale(0.96); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.settings-sidebar {
    width: 220px; min-width: 220px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    padding: 60px 8px 20px 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.settings-sidebar-header {
    font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0 10px 12px;
    margin-bottom: 4px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    /* Kenar çubuğu dikey flex + kaydırmalı; `overflow:hidden` min-height'ı 0 yaptığından uzun
       menüde küçülen TEK öğe başlıktı → alt padding'e ezilip kırpılıyordu (Kullanıcı + Sunucu Ayarları). */
    flex-shrink: 0;
}
.settings-nav {
    display: flex; flex-direction: column; gap: 1px;
}
.settings-nav-label {
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 16px 10px 4px;
}
/* ─── Ayarlar kenar çubuğu — güzelleştirme ─── */
/* Panel başlığı (aramanın üstündeki "Kullanıcı Ayarları") — gerçek başlık görünümü */
#user-settings-modal .settings-sidebar-header {
    font-size: 15px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    padding: 0 10px 12px;
    margin-bottom: 0;
}
/* Arama kutusu — nav'ın en üstünde */
.settings-nav-search { position: relative; display: flex; align-items: center; margin: 0 0 12px; }
.settings-nav-search-icon { position: absolute; left: 11px; color: var(--text-muted); pointer-events: none; transition: color 0.15s; }
.settings-nav-search:focus-within .settings-nav-search-icon { color: var(--accent); }
#us-settings-search {
    width: 100%;
    padding: 9px 32px 9px 34px;
    background: var(--bg-input);
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
#us-settings-search:hover { background: var(--bg-hover); }
#us-settings-search:focus { outline: none; background: var(--bg-input); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#us-settings-search::placeholder { color: var(--text-muted); }
.settings-nav-search-clear {
    position: absolute; right: 7px;
    display: flex; align-items: center; justify-content: center;
    background: none; border: none; padding: 3px;
    color: var(--text-muted); cursor: pointer;
    border-radius: 50%;
    transition: color 0.15s, background 0.15s;
}
.settings-nav-search-clear:hover { color: var(--text-primary); background: var(--bg-hover); }
.settings-nav-search-clear.hidden { display: none; }
/* "Sonuç yok" durumu */
.settings-nav-noresults { padding: 28px 14px 20px; text-align: center; animation: usNoResIn 0.22s ease; }
.settings-nav-noresults.hidden { display: none; }
.settings-nav-noresults-icon {
    width: 54px; height: 54px; margin: 0 auto 13px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--bg-input);
    color: var(--text-muted);
}
.settings-nav-noresults-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.settings-nav-noresults-sub { font-size: 12px; color: var(--text-muted); margin-top: 6px; line-height: 1.45; word-break: break-word; }
.settings-nav-noresults-sub b { color: var(--text-secondary); font-weight: 600; }
.settings-nav-noresults-clear {
    margin-top: 15px;
    padding: 6px 15px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: 8px; color: var(--text-secondary);
    font-size: 12px; font-weight: 600; cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.settings-nav-noresults-clear:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--accent); }
@keyframes usNoResIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
/* Aramada eşleşmeyen bölüm kartlarını gizle */
.us-search-hide { display: none !important; }
/* Aranan bölüme gidince kısa vurgu */
.us-search-flash { animation: usSearchFlash 1.6s ease; border-radius: 6px; }
@keyframes usSearchFlash {
    0%, 18% { background: var(--accent-soft); box-shadow: 0 0 0 6px var(--accent-soft); }
    100% { background: transparent; box-shadow: 0 0 0 6px transparent; }
}
.settings-nav-item {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 10px;
    font-size: 14px; font-weight: 500;
    color: var(--text-secondary);
    border-radius: 4px; cursor: pointer;
    transition: all var(--transition);
    background: none; border: none; text-align: left; width: 100%;
}
.settings-nav-item:hover {
    background: var(--bg-hover); color: var(--text-primary);
}
.settings-nav-item.active {
    background: var(--bg-active); color: var(--text-primary);
}
.settings-nav-danger {
    color: var(--dnd) !important;
}
.settings-nav-danger:hover {
    background: rgba(239, 68, 68, 0.12) !important;
}
.settings-nav-sep {
    height: 1px; background: var(--border);
    margin: 6px 10px;
}

.settings-main {
    flex: 1; display: flex; flex-direction: column;
    position: relative; background: var(--bg-tertiary);
    overflow: hidden;
}
.settings-main-scroll {
    flex: 1; overflow-y: auto;
    padding: 30px 40px 40px 40px;
    max-width: 740px;
    overscroll-behavior: contain;
}
.settings-tab {
    display: none;
}
.settings-tab.active {
    display: block;
}
.settings-tab-header {
    margin-bottom: 24px;
}
.settings-tab-header h2 {
    font-size: 20px; font-weight: 700;
    margin-bottom: 4px;
}
.settings-tab-header p {
    color: var(--text-muted); font-size: 14px;
}
.settings-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
}
.settings-card-row {
    display: flex; align-items: center; gap: 16px;
}
.settings-card-actions {
    display: flex; justify-content: flex-end;
    margin-top: 16px; gap: 12px;
}
.settings-close-btn {
    position: absolute; top: 20px; right: 28px;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    background: var(--bg-hover); border: 2px solid var(--border);
    width: 36px; height: 36px;
    border-radius: 50%;
    color: var(--text-muted); cursor: pointer;
    transition: all var(--transition);
    display: flex; align-items: center; justify-content: center;
    z-index: 10;
}
.settings-close-btn span {
    display: none;
}
.settings-close-btn:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* ─── Server Settings Overview ───────── */
.ss-server-preview {
    display: flex; align-items: center; gap: 16px;
}
.ss-server-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    background: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 700; color: white;
    flex-shrink: 0;
    position: relative; overflow: hidden; cursor: pointer;
}
.ss-icon-img {
    width: 100%; height: 100%; object-fit: cover;
}
.ss-icon-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.15s;
    color: #fff; font-size: 10px; font-weight: 600;
    text-transform: uppercase; gap: 2px;
}
.ss-server-icon:hover .ss-icon-overlay { opacity: 1; }
.ss-server-info { flex: 1; }
.ss-server-preview-name {
    font-size: 18px; font-weight: 700;
}
.ss-server-preview-meta {
    font-size: 13px; color: var(--text-muted); margin-top: 2px;
}
.ss-meta-dot { margin: 0 6px; }

/* Invite tip */
.invite-tip {
    display: flex; align-items: center; gap: 8px;
    margin-top: 12px; font-size: 13px;
    color: var(--text-muted);
}

/* ─── User Settings Account ─────────── */
.us-account-card {
    padding: 0 !important; overflow: hidden;
}
.us-account-banner {
    height: 80px;
    background: var(--accent-grad);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.us-account-body {
    display: flex; align-items: flex-end; gap: 14px;
    padding: 0 20px;
    margin-top: -32px;
}
.us-account-avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 700; color: white;
    border: 5px solid var(--bg-surface);
    flex-shrink: 0;
}
.us-account-info { padding-bottom: 10px; }
.us-account-name {
    font-size: 18px; font-weight: 700;
}
.us-account-tag {
    font-size: 13px; color: var(--text-muted);
}
.us-account-fields {
    padding: 16px 20px 20px;
    display: flex; flex-direction: column; gap: 12px;
    background: var(--bg-tertiary);
    margin: 16px 16px 16px;
    border-radius: var(--radius-sm);
}
.us-field-row {
    display: flex; flex-direction: column; gap: 4px;
}
.us-field-label {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--text-muted);
}
.us-field-value {
    font-size: 14px; color: var(--text-primary);
}

/* ─── User Settings Profile ─────────── */
.us-profile-layout {
    display: flex; gap: 24px;
}
.us-profile-form { flex: 1.2; }
.us-profile-preview { flex: 1; }

/* Profile sub-tab selector */
.us-profile-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}
.us-ptab {
    padding: 8px 18px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color var(--transition);
}
.us-ptab:hover { color: var(--text-primary); }
.us-ptab.active { color: var(--text-primary); border-bottom-color: var(--accent); }

/* Server Profile tab panel */
.us-server-profile-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}
.us-sp-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.us-sp-form { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.us-sp-preview { width: 300px; flex-shrink: 0; }

/* Individual setting cards inside server profile */
.us-sp-server-card { margin-bottom: 0; }
.us-sp-fields-card { margin-bottom: 0; }
.us-sp-field-group { margin-bottom: 14px; }
.us-sp-field-group:last-child { margin-bottom: 0; }
.us-sp-field-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
    line-height: 1.4;
}
.us-sp-fields-divider {
    height: 1px;
    background: var(--border);
    margin: 14px 0;
}

/* ── Custom server dropdown ─────────────────────────────── */
.us-sp-dd {
    position: relative;
    user-select: none;
}
.us-sp-dd-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 6px 12px 6px 10px;
    background: var(--bg-primary);
    border: 1px solid rgb(var(--overlay-rgb) / 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.us-sp-dd-trigger:hover { border-color: rgb(var(--overlay-rgb) / 0.18); }
.us-sp-dd[aria-expanded="true"] .us-sp-dd-trigger {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(6,182,212,0.18);
    border-radius: 10px 10px 0 0;
}
.us-sp-dd-trigger:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.us-sp-dd-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.us-sp-dd-arrow {
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: transform var(--transition);
}
.us-sp-dd[aria-expanded="true"] .us-sp-dd-arrow { transform: rotate(180deg); }

/* Dropdown icon — letter avatar or img */
.us-sp-dd-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--bg-surface);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--ui-text-strong);
    overflow: hidden;
    text-transform: uppercase;
}
.us-sp-dd-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Dropdown panel */
.us-sp-dd-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--accent);
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    max-height: 220px;
    overflow-y: auto;
    z-index: 200;
}
.us-sp-dd[aria-expanded="true"] .us-sp-dd-panel { display: block; }

/* Individual option */
.us-sp-dd-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    transition: background var(--transition);
    border-radius: 0;
}
.us-sp-dd-option:hover { background: var(--bg-hover); }
.us-sp-dd-option.selected { background: var(--bg-active); color: var(--accent); }
.us-sp-dd-option:last-child { border-radius: 0 0 10px 10px; }

/* Empty / loading state message inside trigger (no icon) */
.us-sp-dd-trigger.us-sp-dd-state { color: var(--text-muted); font-weight: 500; }

/* ── Name plate ──────────────────────────────────────────── */
.us-sp-nameplate-wrap { margin-bottom: 0; }
.us-sp-nameplate {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-top: 6px;
}
.us-sp-nameplate-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
}
.us-sp-nameplate-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.us-sp-nameplate-name { font-size: 14px; font-weight: 600; color: var(--text-primary); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.us-sp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 16px 12px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    line-height: 1.5;
}

/* Dirty changes bar */
.us-sp-dirty-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    padding: 12px 16px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    flex-wrap: wrap;
}
.us-sp-dirty-msg {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
}
.us-sp-dirty-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.us-about-counter {
    font-size: 11px; color: var(--text-muted);
    margin-top: 4px; text-align: right;
}
#us-about {
    width: 100%; padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary); font-size: 14px;
    resize: vertical; font-family: inherit;
}

.us-preview-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.us-preview-banner {
    height: 60px;
    background: var(--accent-grad);
}
.us-preview-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 700; color: white;
    border: 4px solid var(--bg-surface);
    margin: -28px 0 0 16px;
}
.us-preview-body {
    padding: 8px 16px 16px;
}
.us-preview-name {
    font-size: 16px; font-weight: 700;
    margin-top: 4px;
}
.us-preview-tag {
    font-size: 12px; color: var(--text-muted);
}
.us-preview-divider {
    height: 1px; background: var(--border);
    margin: 12px 0;
}
.us-preview-section-label {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--text-muted); margin-bottom: 4px;
}
.us-preview-about {
    font-size: 13px; color: var(--text-secondary);
    white-space: pre-wrap; word-break: break-word;
    min-height: 18px;
}

/* Appearance placeholder */
.us-appearance-placeholder {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 12px; padding: 40px 20px;
    color: var(--text-muted); font-size: 14px;
}

/* Keep existing styles below */
.modal-settings { max-width: 480px; }
.settings-info-bar {
    display: flex; gap: 16px; flex-wrap: wrap;
    padding: 12px 16px; margin: 8px 0 4px;
    background: var(--bg-active); border-radius: var(--radius-md);
    border: 1px solid var(--border);
}
.settings-info-item {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--text-secondary);
}
.settings-info-item svg { opacity: 0.6; flex-shrink: 0; }
.settings-section {
    padding: 16px 0;
}
.settings-section-title {
    font-size: 11px; font-weight: 700; color: var(--text-muted);
    letter-spacing: 0.05em; margin-bottom: 12px;
}
.settings-section-title.danger-title { color: #EF4444; }
.settings-divider {
    height: 1px; background: var(--border); margin: 4px 0;
}
.invite-settings-row {
    display: flex; gap: 8px; align-items: center;
}
.invite-code-readonly {
    flex: 1; background: var(--bg-input); color: var(--text-primary);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 10px 14px; font-size: 14px; font-family: monospace;
    letter-spacing: 0.05em;
}
.settings-danger-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; gap: 12px;
}
.settings-danger-row + .settings-danger-row {
    border-top: 1px solid var(--border);
    padding-top: 12px;
}
.settings-danger-info { flex: 1; }
.settings-danger-title {
    font-size: 14px; font-weight: 600; color: var(--text-primary);
}
.settings-danger-desc {
    font-size: 12px; color: var(--text-muted); margin-top: 2px;
}
.settings-danger-row .btn-secondary,
.settings-danger-row .btn-danger {
    width: auto; padding: 8px 20px; flex-shrink: 0;
}
#confirm-delete-server-btn:disabled {
    opacity: 0.4; cursor: not-allowed;
}

/* ═══════════════ VOICE CHANNELS & PANEL ═══════════════ */

/* Voice channel items */
.voice-channel-item {
    display: flex; flex-direction: column;
    margin: 1px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer; color: var(--text-secondary);
    transition: color 80ms ease, background 80ms ease; font-size: 14px;
    user-select: none; -webkit-user-select: none;
}
.voice-channel-header {
    display: flex; align-items: center; gap: 8px;
    height: 32px; padding: 7px 14px;   /* metin kanalıyla AYNI sabit yükseklik (hover'da büyümez) */
    border-radius: var(--radius-sm);
    transition: color 80ms ease, background 80ms ease;
    position: relative;
}
.voice-channel-header:hover { background: var(--bg-hover); color: var(--text-primary); }
.voice-channel-item.active .voice-channel-header {
    background: var(--accent-soft); color: var(--accent);
}
/* Ses ikonunu metin kanalı '#' ikonuyla AYNI 20x18 ortalı kutuya al → ikon, isim ve satır yüksekliği aynı hizada/eşit */
.voice-channel-icon { opacity: 0.5; flex-shrink: 0; width: 20px; height: 18px; display: inline-flex; align-items: center; justify-content: center; }
.voice-channel-item.active .voice-channel-icon { opacity: 1; }
.voice-channel-item.voice-has-users .voice-channel-icon { opacity: 1; color: var(--accent); }
.voice-channel-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; line-height: 18px; }

/* Voice channel connected users */
.voice-channel-users {
    display: flex; flex-direction: column; gap: 1px;
    padding: 2px 0 4px 34px;
}
/* Kullanıcı yokken boş liste ALAN KAPLAMASIN (padding ~6px ses kanalı altında fazla boşluk yaratıyordu) → metin kanalıyla eşit */
.voice-channel-users:empty { display: none; padding: 0; }
.voice-channel-user,
.voice-user-entry {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 8px; font-size: 12px;
    color: var(--text-secondary);
    border-radius: 4px; transition: background var(--transition), color var(--transition);
}
.voice-channel-user:hover,
.voice-user-entry:hover { background: var(--bg-hover); }
.voice-user-entry { cursor: pointer; min-height: 26px; padding-right: 16px; }
.voice-user-entry:hover { color: var(--text-primary); }
.voice-user-entry:active { background: var(--bg-active, rgba(0,0,0,0.2)); }
.voice-user-avatar {
    width: 20px; height: 20px; border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 10px; color: white; flex-shrink: 0;
    background: var(--accent); overflow: hidden;
}
.voice-user-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-full); }
.voice-user-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* "YAYINDA" canlı yayın rozeti (ses kanalı kullanıcı satırı) — kompakt kırmızı pill.
   VOICE-LIVE-BADGE-POSITION-1: satırın EN SAĞINDA (durum şeridinden sonra); ad gizliyken de sağa yaslanır,
   şeridin ardından gelince araya boşluk açmaz (şeridin kendi `margin-left: auto`su yeter). */
.voice-user-live {
    flex-shrink: 0; margin-left: auto;
    font-size: 9px; font-weight: 700; letter-spacing: 0.3px; line-height: 1;
    padding: 2px 5px; border-radius: 4px;
    background: var(--dnd); color: #fff; text-transform: uppercase;
}
.voice-user-status-icons + .voice-user-live { margin-left: 0; }
/* Dar kenar çubuğu: ses kanalı kendi genişliğini sorgular (`vcitem`; varsayılan 260px kenar çubuğunda ~243px → normal
   düzen AYNEN). ≤210px'te girinti / boşluklar daralır → avatar, üç durum ikonu ve YAYINDA en dar 180px'te de tam sığar,
   gerekirse ad "…" olur. Kanal öğesindeki konumlu öğeler kendi `position: relative` ebeveynlerinde → kapsama yan etkisiz. */
.voice-channel-item { container: vcitem / inline-size; }
@container vcitem (max-width: 210px) {
    .voice-channel-users { padding-left: 10px; }
    .voice-user-entry { gap: 4px; padding-left: 4px; padding-right: 4px; }
}
.voice-user-icons {
    display: flex; align-items: center; gap: 2px;
    color: var(--text-muted); flex-shrink: 0;
}
.voice-user-icons svg { width: 12px; height: 12px; }

/* ─── Voice user status icon strip ──────────────────────────────────────── */
.voice-user-status-icons {
    display: flex; align-items: center; gap: 2px; flex-shrink: 0; margin-left: auto;
}
/* Karar #112 — 5100 spec: boyut YALNIZ burada (SVG'deki width/height="11" sunum
   öznitelikleri CSS ile ezilir): 14px; satır yüksekliğini 20px avatar belirlediğinden
   satır büyümez. Renk/stroke/glif path'leri değişmez. */
.voice-status-icon {
    display: block; flex-shrink: 0;
    width: 14px; height: 14px;
}
/* Kamera durum ikonu (5100): arka plan yok, nötr ikincil renk; geniş-alçak glif 14px
   kutuda küçük kaldığından 18px (satır yüksekliği değişmez). */
.voice-status-icon.voice-status-camera { color: var(--text-secondary); width: 18px; height: 18px; }
/* Hover'da üç nötr ikon birlikte parlar; sunucu-kırmızı varyant DEĞİŞMEZ (moderasyon sinyali). */
.voice-user-entry:hover .voice-status-icon.voice-status-camera,
.voice-user-entry:hover .voice-status-icon-self,
.voice-user-entry:hover .voice-status-icon-local { color: var(--text-primary); }
/* self: nötr ton — --text-secondary, opacity 1 (5100; eski --text-muted + .8 koyu zeminde soluktu) */
.voice-status-icon-self {
    color: var(--text-secondary);
    opacity: 1;
}
/* local: aynı nötr ton; glif mikrofon + daire-çizgi rozetidir (SVG içinde, Karar #112) */
.voice-status-icon-local {
    color: var(--text-secondary);
    opacity: 1;
}
/* local wrap: relative container that holds the icon + ::after badge */
.voice-status-local-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.voice-status-local-wrap::after {
    content: '';
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-secondary);
    border: 1.5px solid var(--bg-surface, #2b2d31);
}
/* server: red — admin-forced */
.voice-status-icon-server {
    color: var(--dnd, #ed4245);
}

/* Speaking ring (sidebar row) — the shared accent, same as lobby tiles / DM tiles / self panel */
.voice-user-avatar { transition: box-shadow 0.15s ease; }
.voice-user-speaking .voice-user-avatar {
    box-shadow: 0 0 0 2px var(--accent), 0 0 8px rgba(6, 182, 212, 0.4);
}

/* Voice Connected Panel */
.voice-panel {
    padding: 10px 10px 8px;
    margin: 0 8px 0 -64px;
    background: var(--bg-surface);
    border-radius: 14px 14px 0 0;
    border: none;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}
/* Same server-rail underlay as .user-panel — fills the left gap with sidebar bg */
.voice-panel::before {
    content: '';
    position: absolute;
    z-index: -1;
    left: -80px;
    right: 0;
    top: 0;
    bottom: 0;
    background: var(--bg-secondary);
    pointer-events: none;
}
.voice-panel-top {
    display: flex; align-items: center; justify-content: space-between;
}
.voice-panel-left {
    display: flex; align-items: center; gap: 8px;
    min-width: 0;
}
.voice-panel-right {
    display: flex; align-items: center; gap: 4px;
    flex-shrink: 0;
}
.voice-panel-info {
    display: flex; flex-direction: column; gap: 1px;
    min-width: 0;
}
.voice-panel-label {
    font-size: 12px; font-weight: 600; color: var(--online);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.voice-panel-channel {
    font-size: 10px; color: var(--text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Connection quality bars */
.voice-conn-bars {
    display: flex; align-items: flex-end; gap: 2px;
    min-width: 28px; min-height: 28px; cursor: default;
    position: relative;
    justify-content: center;
    padding-bottom: 4px;
    border-radius: 6px;
    transition: background 0.2s;
}
.voice-conn-bars:hover {
    background: rgb(var(--overlay-rgb) / 0.08);
}
.voice-conn-bars .bar {
    width: 4px; border-radius: 1.5px;
    background: var(--online);
    transition: background 0.3s, opacity 0.3s;
}
.voice-conn-bars .bar-1 { height: 5px; }
.voice-conn-bars .bar-2 { height: 11px; }
.voice-conn-bars .bar-3 { height: 18px; }
.voice-conn-bars.poor .bar { background: var(--dnd); }
.voice-conn-bars.poor .bar-3 { opacity: 0.3; }
.voice-conn-bars.poor .bar-2 { opacity: 0.3; }
/* Ping tooltip */
.voice-ping-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%; transform: translateX(-50%);
    font-size: 11px; font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0; transition: opacity 0.15s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 10;
}
.voice-ping-tooltip::after {
    content: '';
    position: absolute;
    top: 100%; left: 50%; transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--border);
}
.voice-conn-bars:hover .voice-ping-tooltip {
    opacity: 1;
}
/* Voice panel buttons — shared by server voice + DM call panels */
.voice-panel-right .voice-ctrl-btn,
.dm-call-panel-controls .voice-ctrl-btn {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    cursor: pointer; color: var(--text-secondary);
    transition: all 0.15s ease;
    background: rgb(var(--overlay-rgb) / 0.06);
    border: none;
}
.voice-panel-right .voice-ctrl-btn:hover,
.dm-call-panel-controls .voice-ctrl-btn:hover {
    background: var(--bg-hover); color: var(--text-primary);
}
.voice-panel-right .voice-ctrl-btn.active,
.dm-call-panel-controls .voice-ctrl-btn.active {
    background: rgba(239, 68, 68, 0.15);
    color: var(--dnd);
}
.voice-panel-right .voice-disconnect-btn,
.dm-call-panel-controls .voice-disconnect-btn {
    background: rgba(239, 68, 68, 0.12) !important;
    color: var(--dnd) !important;
}
.voice-panel-right .voice-disconnect-btn:hover,
.dm-call-panel-controls .voice-disconnect-btn:hover {
    background: rgba(239, 68, 68, 0.35) !important;
    color: var(--ui-text-strong) !important;
}

/* Mic test wrap & tooltip */
.voice-mic-test-wrap {
    position: relative;
}
.voice-mic-test-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    width: 220px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 0.15s, transform 0.15s;
    z-index: 20;
}
.voice-mic-test-wrap:hover .voice-mic-test-tooltip {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.mic-test-tooltip-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.mic-test-tooltip-desc {
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 6px;
}
.mic-test-tooltip-hint {
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
}


/* Voice user list in channel */
.voice-channel-user {
    transition: all 0.2s ease;
}
.voice-channel-user.speaking-active {
    background: rgba(16, 185, 129, 0.08);
    border-radius: var(--radius-sm);
}
.voice-channel-user.speaking-active .voice-user-avatar {
    border: 2px solid var(--online);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

/* Channel Type Selector */
.channel-type-selector {
    display: flex; flex-direction: column; gap: 6px;
    margin-top: 6px;
}
.channel-type-option {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: var(--radius-sm);
    background: var(--bg-input); border: 1px solid var(--border);
    cursor: pointer; transition: all var(--transition);
}
.channel-type-option:hover { border-color: var(--border-hover); background: var(--bg-hover); }
.channel-type-option.active {
    border-color: var(--accent);
    background: var(--accent-soft);
}
/* KEYBOARD-RADIO-CARD-ACCESSIBILITY-1: radyo GORSEL olarak gizli ama odaklanabilir ve anlamsal kalir (display:none
   onu klavye odak zincirinden cikariyordu → Tab / ok tuslari kartlara ulasamiyordu). top/left YOK → statik konumda
   kalir, odaklaninca kaydirma karti hedefler; tiklama etikete gider (pointer-events none). */
.channel-type-option input[type="radio"] { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
/* Klavye odagi kartin KENDISINDE gorunur (KEYBOARD-FOCUS-VISIBILITY-1 dili; fare tiklamasi halka birakmaz). */
.channel-type-option:has(> input[type="radio"]:focus-visible) { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.channel-type-info { display: flex; flex-direction: column; }
.channel-type-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.channel-type-desc { font-size: 11px; color: var(--text-muted); }

/* ── Voice Settings Tab ── */
.vs-device-group {
    margin-bottom: 20px;
}
.vs-device-group:last-child { margin-bottom: 0; }
.vs-device-row {
    margin-bottom: 12px;
}
.vs-label {
    display: block;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 8px;
}
/* Custom Select Dropdown (replaces native <select>) */
.custom-select-wrap {
    position: relative;
    width: 100%;
}
/* `createCustomSelect` native <select>'i GIZLEMEZ; deger tasiyicisi olarak DOM'da
   birakir ve gizlemeyi her tuketici KENDI kuraliyla yapar (`.dob-row .dob-select`,
   `#report-modal #report-reason-select`, `.vs-select`). Denetim Kaydi suzgecleri
   `.settings-select` kullanir ve boyle bir kurallari YOKTU -> ozel select'in ALTINDA
   ikinci bir native select gorunuyordu. KARDES SECICI kullanilir: yalniz SARMALANMIS
   olan gizlenir; ayni sinifi tasiyan ama sarmalanmayan `#ss-security-duration`
   (Guvenlik sekmesi) ETKILENMEZ. */
.custom-select-wrap + select.chs-select,
.custom-select-wrap + select.settings-select { display: none; }
.custom-select-wrap .custom-select-trigger {
    width: 100%;
    padding: 10px 36px 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
}
.custom-select-wrap .custom-select-trigger::after {
    content: '';
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    width: 12px; height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.2s;
}
.custom-select-wrap .custom-select-trigger.open::after {
    transform: translateY(-50%) rotate(180deg);
}
.custom-select-wrap .custom-select-trigger:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
}
.custom-select-wrap .custom-select-trigger:focus,
.custom-select-wrap .custom-select-trigger.open {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.15);
    outline: none;
}
.custom-select-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    max-height: 220px;
    overflow-y: auto;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.45);
    padding: 4px;
    z-index: 600;
    animation: csMenuIn 0.15s ease;
    /* Acik listede wheel alttaki ayar sayfasini kaydirmasin (scroll chaining). */
    overscroll-behavior: contain;
}
.custom-select-menu.cs-up {
    top: auto;
    bottom: calc(100% + 4px);
    animation: csMenuUpIn 0.15s ease;
}
/* Inside profile card, open upward */
.profile-card .custom-select-menu {
    top: auto;
    bottom: calc(100% + 4px);
    animation: csMenuUpIn 0.15s ease;
}
@keyframes csMenuUpIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes csMenuIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.custom-select-menu::-webkit-scrollbar { width: 6px; }
.custom-select-menu::-webkit-scrollbar-thumb { background: var(--bg-active); border-radius: 3px; }
.custom-select-group {
    padding: 8px 10px 4px;
    font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    color: var(--text-muted); pointer-events: none;
}
.custom-select-menu > .custom-select-group:first-child { padding-top: 4px; }
.custom-select-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.1s;
    border: none;
    background: none;
    width: 100%;
    font-family: inherit;
    text-align: left;
}
.custom-select-option:hover {
    background: var(--accent-soft);
    color: var(--text-primary);
}
.custom-select-option.selected {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}
.custom-select-option .cs-check {
    width: 16px; height: 16px;
    margin-left: auto;
    opacity: 0;
}
.custom-select-option.selected .cs-check {
    opacity: 1;
}
/* ── OWNERSHIP-TRANSFER-UI-1: Sahipliği Devret › "Yeni sahibi seç" ─────────────────────────────
   Native açılır liste işletim sistemi stilinde çizilir (temaya uymaz, avatar gösteremez) → ortak
   createCustomSelect (a11y + renderOption). Native select DEĞER TAŞIYICISI olarak kalır ve YALNIZ
   sarmalandığında gizlenir. Satır içeriği üye seçicisinin MEVCUT parçaları (.ccm-pick-*). Kurallar
   #transfer-ownership-modal kapsamındadır → diğer özel seçiciler ETKİLENMEZ; renkler token'lardan. */
#transfer-ownership-modal .custom-select-wrap + select#transfer-ownership-target { display: none; }
#transfer-ownership-modal .custom-select-trigger {
    min-height: 44px; padding: 7px 36px 7px 10px;
    border-radius: var(--radius-sm); font-size: 14px; font-weight: 500;
}
#transfer-ownership-modal .custom-select-trigger:hover { border-color: var(--border-hover); background: var(--bg-hover); }
#transfer-ownership-modal .custom-select-trigger:focus,
#transfer-ownership-modal .custom-select-trigger.open {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
/* Ok: maske + token rengi (sabit gri yerine); açıkken / klavye odağında accent */
#transfer-ownership-modal .custom-select-trigger::after {
    background: var(--text-secondary);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
    transition: transform 0.2s, background-color var(--transition);
}
#transfer-ownership-modal .custom-select-trigger.open::after,
#transfer-ownership-modal .custom-select-trigger:focus-visible::after { background: var(--accent); }
/* Seçim yokken (yer tutucu) soluk metin; aday yokken liste açılmaz → ok ve hover vurgusu da yok */
#transfer-ownership-modal .custom-select-wrap.ot-empty .custom-select-value { color: var(--text-muted); }
#transfer-ownership-modal .custom-select-trigger[aria-disabled="true"] { cursor: default; color: var(--text-muted); }
#transfer-ownership-modal .custom-select-trigger[aria-disabled="true"]::after { display: none; }
#transfer-ownership-modal .custom-select-trigger[aria-disabled="true"]:hover { border-color: var(--border); background: var(--bg-input); }
/* Açık liste: modal yüzeyinden YÜKSELTİLMİŞ menü (ortak menü --bg-surface'te modalla aynı renkti) */
#transfer-ownership-modal .custom-select-menu {
    background: var(--bg-floating);
    border-color: var(--border-hover);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    padding: 6px; max-height: 248px;
}
#transfer-ownership-modal .custom-select-option {
    gap: 10px; min-height: 40px; padding: 6px 10px; border-radius: 6px;
    font-size: 14px; font-weight: 500; color: var(--text-secondary);
}
#transfer-ownership-modal .custom-select-option + .custom-select-option { margin-top: 2px; }
#transfer-ownership-modal .custom-select-option > span { flex: 1; min-width: 0; overflow: hidden; }
#transfer-ownership-modal .custom-select-option .cs-check { flex-shrink: 0; }
#transfer-ownership-modal .custom-select-option:hover,
#transfer-ownership-modal .custom-select-option:focus-visible {
    background: var(--bg-modifier-hover); color: var(--text-primary);
}
#transfer-ownership-modal .custom-select-option:focus-visible {
    outline: none; box-shadow: inset 0 0 0 1px var(--accent);
}
/* Seçili: accent tonu + tik, etiket tema metninde; hover/odakta da seçili kalır (SONRA gelir) */
#transfer-ownership-modal .custom-select-option.selected {
    background: var(--accent-soft); color: var(--text-primary); font-weight: 600;
}
/* Satır + kapalı kutu içeriği: avatar + ad (+ @kullanıcı adı); uzun adlar tek satır ellipsis */
#transfer-ownership-modal .ot-pick { display: flex; align-items: center; gap: 10px; min-width: 0; }
#transfer-ownership-modal .ot-pick .ccm-pick-avatar { flex: 0 0 24px; width: 24px; height: 24px; font-size: 11px; }
#transfer-ownership-modal .ot-pick .ccm-pick-name { font-size: 14px; }
/* @kullanıcı adı aynı adlı üyeleri AYIRT EDER → önce ad kısalır; ad etiketi en fazla %45 */
#transfer-ownership-modal .ot-pick .ccm-pick-sub { font-size: 12px; flex-shrink: 0; max-width: 45%; }
/* Buton hedef + ad + şifre dolana dek kapalı → kapalı olduğu GÖRÜNSÜN (#delete-confirm-modal deseni) */
#transfer-ownership-modal .btn-danger:disabled { opacity: 0.55; cursor: not-allowed; }
#transfer-ownership-modal .btn-danger:disabled:hover { background: var(--dnd); }
/* Kısa pencere (kabuğun en küçüğü 800×500): şifre alanıyla uzayan modal görünür alana SIĞAR —
   yalnız boşluklar sıkışır; açılır liste kırpılmasın diye kaydırma kabı KULLANILMAZ. */
@media (max-height: 560px) {
    #transfer-ownership-modal .modal-content { padding-top: 20px; padding-bottom: 20px; }
    #transfer-ownership-modal #transfer-ownership-desc { margin-bottom: 10px; }
    /* gruplar satır içi margin-top taşır (birleşen kenar boşlukları) → yalnız burada geçersiz kılınır */
    #transfer-ownership-modal .input-group { margin-top: 6px !important; margin-bottom: 6px; }
    #transfer-ownership-modal .modal-actions { margin-top: 14px; }
}
.vs-select {
    display: none;
}
.vs-volume-row {
    margin-bottom: 6px;
}
.vs-slider-wrap {
    display: flex; align-items: center; gap: 10px;
    color: var(--text-muted);
}
.vs-slider {
    flex: 1; height: 6px;
    -webkit-appearance: none; appearance: none;
    background: var(--bg-input); border-radius: 3px;
    outline: none; cursor: pointer;
}
.vs-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 14px; height: 14px;
    /* 6px track kutusunda thumb ustten hizalanir -> (6-14)/2 = -4px marj
       thumb merkezini track merkezine oturtur (.uctx-volume-slider ile ayni). */
    margin-top: -4px;
    border-radius: 50%; background: white;
    cursor: pointer; border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.vs-slider::-webkit-slider-runnable-track {
    height: 6px; border-radius: 3px;
}
.vs-volume-val {
    font-size: 12px; font-weight: 600;
    color: var(--text-secondary);
    min-width: 36px; text-align: right;
    font-variant-numeric: tabular-nums;
}
.vs-desc {
    font-size: 13px; color: var(--text-muted);
    margin-bottom: 16px; line-height: 1.5;
}
.vs-mic-test-area {
    display: flex; flex-direction: column; align-items: center;
    gap: 16px; padding: 10px 0;
}
.vs-mic-test-visualizer {
    display: flex; align-items: center; gap: 16px;
    width: 100%; padding: 16px;
    background: var(--bg-input); border-radius: 8px;
    border: 1px solid var(--border);
}
.vs-mic-icon {
    width: 56px; height: 56px; border-radius: var(--radius-full);
    background: var(--bg-surface); border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); flex-shrink: 0;
    transition: all 0.3s;
}
.vs-mic-icon.active {
    border-color: var(--accent); color: var(--accent);
    box-shadow: 0 0 16px rgba(6, 182, 212, 0.2);
}
.vs-mic-icon.speaking {
    border-color: var(--online); color: var(--online);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.3);
}
.vs-mic-bars {
    display: flex; align-items: flex-end; gap: 2px;
    height: 40px; flex: 1;
}
.vs-mic-bars span {
    flex: 1; border-radius: 2px;
    background: var(--border); min-height: 3px;
    transition: height 0.08s ease, background 0.15s;
}
.vs-mic-bars span.active {
    background: var(--accent);
}
.vs-mic-bars span.high {
    background: var(--online);
}
.vs-mic-info {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; padding: 0 4px;
}
.vs-mic-status {
    font-size: 13px; color: var(--text-muted);
}
.vs-mic-stats {
    display: flex; gap: 12px;
    font-size: 12px; color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}
.vs-mic-test-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 24px; width: auto;
    font-size: 14px;
}
/* ── CAMERA-SETTINGS-1: Ses ve Video › KAMERA — yerel test ön izlemesi ──
   Boşta düğme ortada; açılırken / canlıyken ALTTA ("Testi Durdur") ve video sahneyi kaplar (contain →
   kırpılmaz; self-önizleme aynalı, ön izleme penceresiyle aynı); hatada metin + düğme ortada. Sahne
   tema token'larından; video yüzeyi her temada siyah (medya katmanı). */
.vs-cam-stage {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 12px;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 240px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}
.vs-cam-video {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    background: #000;
    transform: scaleX(-1);
}
.vs-cam-stage:not([data-state="live"]) .vs-cam-video { display: none; }
.vs-cam-status {
    position: relative;
    max-width: 100%;
    padding: 0 20px;
    font-size: 13px; line-height: 1.5;
    color: var(--text-secondary);
    text-align: center;
}
.vs-cam-test-btn {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: auto; margin-top: 0;
    padding: 10px 24px;
    font-size: 14px;
}
/* Sola/sağa 0 + otomatik kenar boşluğu ile ortalanır: .btn-primary:active `transform` kullanır. */
.vs-cam-stage[data-state="starting"] .vs-cam-test-btn,
.vs-cam-stage[data-state="live"] .vs-cam-test-btn {
    position: absolute; left: 0; right: 0; bottom: 12px;
    width: max-content; margin: 0 auto;
}
/* Anahtar satırının içeriği sahne / seçiciyle aynı hizada; hover zemini kart boşluğuna taşar. */
.vs-cam-always { margin: 0 -12px 12px; }

/* Mic Test Modal */
.mic-test-area {
    display: flex; flex-direction: column; align-items: center;
    gap: 16px; padding: 20px 0;
}
.mic-test-visualizer {
    display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.mic-test-icon {
    width: 72px; height: 72px; border-radius: var(--radius-full);
    background: var(--bg-input); border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s;
}
.mic-test-icon.active {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 24px rgba(6, 182, 212, 0.2);
}
.mic-test-icon.speaking {
    border-color: var(--online);
    color: var(--online);
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.3);
}

.mic-volume-bars {
    display: flex; align-items: flex-end; gap: 3px;
    height: 48px;
}
.mic-volume-bars span {
    width: 5px; border-radius: 3px;
    background: var(--border); min-height: 4px;
    transition: height 0.08s ease, background 0.15s;
}
.mic-volume-bars span.active {
    background: var(--accent-grad);
}
.mic-volume-bars span.high {
    background: linear-gradient(135deg, var(--online), #06B6D4);
}

.mic-test-info {
    display: flex; flex-direction: column; gap: 8px;
    width: 100%; max-width: 280px;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.mic-test-info-row {
    display: flex; justify-content: space-between;
    font-size: 12px;
}
.mic-test-info-label {
    color: var(--text-muted);
    font-weight: 500;
}
.mic-test-info-value {
    color: var(--text-primary);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.mic-test-status {
    font-size: 13px; color: var(--text-muted);
    text-align: center; margin-top: 4px;
}

/* Shake animation for validation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}
.shake { animation: shake 0.35s ease; }
/* Inline form error (e.g. delete-server name confirmation) */
.form-error-msg { color: var(--dnd); font-size: 12.5px; font-weight: 500; margin-top: 7px; }
.input-group input.input-error { border-color: var(--dnd); box-shadow: 0 0 0 3px rgba(239,68,68,0.12); }

/* ── Keybind Settings ── */
.keybind-list {
    display: flex; flex-direction: column; gap: 0;
}
.keybind-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.keybind-row:last-child { border-bottom: none; }
.keybind-action {
    font-size: 14px; color: var(--text-primary);
}
.keybind-keys {
    display: flex; align-items: center; gap: 4px;
    font-size: 12px; color: var(--text-secondary);
}
.keybind-keys kbd {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 24px; height: 24px;
    padding: 0 6px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 11px; font-weight: 600;
    font-family: inherit;
    color: var(--text-primary);
    box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}
/* KEYBINDS-1: değiştirilebilir kısayol satırı — tuşlar + Değiştir / Varsayılan / Kaldır; uyarı satırın altında tam genişlikte */
.keybind-row.keybind-editable { flex-wrap: wrap; gap: 8px 10px; }
.keybind-editable .keybind-action { flex: 1 1 140px; min-width: 0; }
.keybind-buttons { display: flex; gap: 6px; flex-shrink: 0; }
.keybind-btn {
    padding: 5px 10px;
    font-size: 12px; font-weight: 600;
    background: var(--bg-surface); color: var(--text-primary);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    cursor: pointer; transition: background var(--transition);
}
.keybind-btn:hover:not(:disabled) { background: var(--bg-hover); }
.keybind-btn:disabled { opacity: 0.45; cursor: default; }
.keybind-row.kb-recording .keybind-keys kbd { border-color: var(--accent); }
.keybind-warn {
    flex-basis: 100%;
    font-size: 12.5px; line-height: 1.45;
    color: var(--text-secondary);
    border-left: 3px solid var(--idle);
    padding: 2px 0 2px 8px;
}
.keybind-warn.kb-info { border-left-color: var(--border); color: var(--text-muted); }
.keybind-warn.hidden { display: none; }
.keybind-warn-actions { display: flex; gap: 6px; margin-top: 6px; }
#vs-ptt-warn { margin-top: 10px; }
/* PTT-RELEASE-SLIDER-UI-1: Bas Konuş › Bırakma gecikmesi — düz renkler (degrade / parlama / büyüme YOK).
   Dolu kısım başparmağın MERKEZİNDE biter: oran `--ptt-oran` (0–1, app.js `_pttRenderUi`); başparmak 16 px →
   merkez = 8px + (genişlik − 16px) × oran. Ölçek etiketleri aynı formülle hizalanır. Klavye odağı genel
   `:where(... range):focus-visible` halkasıyla (#206) — burada geçersiz kılınmaz; PTT-RELEASE-FOCUS-RING-1:
   girdinin `border-radius: 999px`'i halkayı (outline köşeleri yuvarlaklığı izler) dikdörtgen yerine HAP biçimine sokar. */
.vs-ptt-release-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin-bottom: 10px;
}
.vs-ptt-release-head .vs-label { margin-bottom: 0; }
.vs-ptt-release-val {
    min-width: 64px; padding: 2px 8px;
    border-radius: 6px; background: var(--bg-active);
    font-size: 12px; font-weight: 600; text-align: center;
    color: var(--text-primary); font-variant-numeric: tabular-nums;
}
.vs-ptt-release-slider {
    --ptt-iz: var(--bg-input);
    --ptt-dolu: calc(8px + (100% - 16px) * var(--ptt-oran, 0.1));
    display: block; width: 100%; height: 16px; margin: 0;
    -webkit-appearance: none; appearance: none;
    background: transparent; cursor: pointer;
    border-radius: 999px;
}
[data-theme="light"] .vs-ptt-release-slider,
[data-theme="amoled"] .vs-ptt-release-slider { --ptt-iz: var(--bg-active); }
.vs-ptt-release-slider::-webkit-slider-runnable-track {
    height: 6px; border-radius: 999px;
    background: linear-gradient(to right, var(--accent) 0 var(--ptt-dolu), var(--ptt-iz) var(--ptt-dolu) 100%);
}
.vs-ptt-release-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 16px; height: 16px; margin-top: -5px;   /* (6 − 16) / 2 → iz merkezine oturur */
    border: none; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    cursor: grab;
}
.vs-ptt-release-slider:active::-webkit-slider-thumb { cursor: grabbing; }
.vs-ptt-release-slider::-moz-range-track { height: 6px; border-radius: 999px; background: var(--ptt-iz); }
.vs-ptt-release-slider::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--accent); }
.vs-ptt-release-slider::-moz-range-thumb {
    width: 16px; height: 16px; border: none; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); cursor: grab;
}
.vs-ptt-release-scale {
    position: relative; height: 14px; margin-top: 6px;
    font-size: 11px; line-height: 14px; color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.vs-ptt-release-scale > span { position: absolute; top: 0; white-space: nowrap; transform: translateX(-50%); }
.vs-ptt-release-scale > span:nth-child(1) { left: 0; transform: none; }
.vs-ptt-release-scale > span:nth-child(2) { left: calc(8px + (100% - 16px) * 0.25); }
.vs-ptt-release-scale > span:nth-child(3) { left: calc(8px + (100% - 16px) * 0.5); }
.vs-ptt-release-scale > span:nth-child(4) { left: calc(8px + (100% - 16px) * 0.75); }
.vs-ptt-release-scale > span:nth-child(5) { left: auto; right: 0; transform: none; }
.vs-ptt-release-desc {
    margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--text-muted);
}

/* ═══════════════ RESPONSIVE ═══════════════ */

/* ── Native OS frame mode ─────────────────────────────────────────────────── */
/* The native Windows titlebar is active; hide duplicate HTML controls and     */
/* remove visual seam between the OS titlebar and the in-page app-toolbar.     */
.native-frame .window-controls { display: none !important; }
.native-frame .auth-titlebar    { display: none !important; }
/* Show auth-titlebar only in frameless desktop (is-desktop without native OS frame) */
body.is-desktop:not(.native-frame) .auth-titlebar { display: flex; }
/* app-toolbar: no padding reserved for custom buttons; blend with OS bar */
.native-frame .app-toolbar {
    padding-right: 12px;
    /* No top border — the OS titlebar already provides a visual boundary */
    border-top: none;
}

@media (max-width: 1200px) { .active-now-sidebar { display: none; } }
@media (max-width: 1100px) { .members-sidebar { display: none; } }
@media (max-width: 900px) {
    .friends-header-tabs .filter-btn { padding: 4px 7px; font-size: 12px; }
    .channel-sidebar { width: 220px; min-width: 220px; }
}
@media (max-width: 768px) {
    .channel-sidebar { width: 200px; min-width: 200px; }
    .settings-sidebar { width: 180px; min-width: 180px; padding: 40px 6px 20px 12px; }
    .settings-main-scroll { padding: 40px 20px; }
    .us-profile-layout { flex-direction: column; }
}
@media (max-width: 600px) {
    .server-bar { width: 56px; min-width: 56px; }
    .server-icon { width: 40px; height: 40px; font-size: 16px; }
    .channel-sidebar { width: 180px; min-width: 180px; }
    .user-panel { margin-left: -48px; }
    .voice-panel { margin-left: -48px; }
    .dm-call-panel { margin-left: -48px; }
    .settings-sidebar { width: 160px; min-width: 160px; padding: 30px 4px 20px 8px; }
    .settings-main-scroll { padding: 30px 14px; }
    .app-toolbar { padding-right: 120px; }
}

/* ─── ONBOARDING-TOUR-1: başlangıç rehberi (kök bir .modal; konumlar app.js::_obTourPosition) ─── */
/* Modalların (600) ve gelen aramanın (700) ALTINDA, uygulama arayüzünün üstünde; arka plan tıklamaları engellenir. */
.modal.ob-tour { z-index: 590; animation: obTourIn 160ms ease-out both; }
/* Vurgu: hedefin üstünde boş çerçeve + geniş gölge ile karartma (hedef dışı her yer); hedef yoksa yalnız karartma. */
.ob-tour-spot {
    position: fixed; top: 0; left: 0; width: 0; height: 0;
    border-radius: var(--radius-md);
    box-shadow: 0 0 0 2px var(--accent), 0 0 0 200vmax rgba(0, 0, 0, 0.6);
    pointer-events: none;
    transition: transform 240ms cubic-bezier(0.4, 0, 0.2, 1), width 240ms cubic-bezier(0.4, 0, 0.2, 1),
        height 240ms cubic-bezier(0.4, 0, 0.2, 1);
}
.ob-tour-spot.is-off { box-shadow: 0 0 0 200vmax rgba(0, 0, 0, 0.6); }
.ob-tour-card {
    position: fixed; top: 0; left: 0;
    width: min(320px, calc(100vw - 24px)); box-sizing: border-box;
    padding: 16px 18px 14px;
    background: var(--surface-card, var(--ui-secondary-alt));
    color: var(--text-primary);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}
.ob-tour-card.is-entering { animation: obTourCardIn 180ms ease-out both; }
.ob-tour-progress { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.ob-tour-title { margin: 6px 0 4px; font-size: 16px; font-weight: 700; color: var(--text-primary); }
.ob-tour-text { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-secondary); }
.ob-tour-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.ob-tour-skip, .ob-tour-next {
    padding: 7px 14px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.ob-tour-skip { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-hover); }
.ob-tour-skip:hover { background: rgb(var(--overlay-rgb) / 0.06); color: var(--text-primary); }
.ob-tour-next { background: var(--accent); color: white; border: 1px solid transparent; }
.ob-tour-next:hover { background: var(--accent-hover); }
@keyframes obTourIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes obTourCardIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .modal.ob-tour, .ob-tour-card.is-entering { animation: none; }
    .ob-tour-spot { transition: none; }
}

/* ─── Friends Empty (main area) ──────── */
.friends-empty-main {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 12px;
    color: var(--text-muted); padding: 40px;
}
.friends-empty-main svg { opacity: 0.3; }
.friends-empty-main p { font-size: 14px; }

/* ═══════════════ DM VOICE CALL ═══════════════ */

/* Call button in chat header */
.dm-call-btn {
    color: var(--text-secondary);
    transition: all var(--transition);
}
/* Hover'da yeşil vurgu YOK (kullanıcı isteği) ve zemin YOK — arama butonları
   diğer başlık ikonlarıyla aynı davranır: yalnız ikon rengi aydınlanır.
   Kural `.chat-header-right .icon-btn:hover` içinde tanımlı. */

/* Incoming Call Overlay */
.incoming-call-overlay {
    /* Tam ekran karartma DEĞİL — taşınabilir popup (Karar #26): konum JS ile
       left/top verilir, arkadaki uygulama kullanılabilir kalır. */
    position: fixed; z-index: 700;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.incoming-call-card {
    display: flex; flex-direction: column; align-items: center;
    /* Daha derli toplu kart: küçük ama sıkışık değil (avatar 64, buton 50, tek başlık ölçeği). */
    padding: 28px 32px 26px; gap: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    animation: modalIn 0.25s ease;
    position: relative; min-width: 236px;
    /* Sürüklenebilir popup: kart tutamaç (butonlar hariç — JS'te dışlanır) */
    cursor: grab;
    user-select: none;
}
.incoming-call-card.dragging { cursor: grabbing; }
.incoming-call-card .call-action-btn { cursor: pointer; }

.incoming-call-pulse {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -70%);
    width: 80px; height: 80px; border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    animation: callPulse 2s ease-in-out infinite;
}
@keyframes callPulse {
    0% { transform: translate(-50%, -70%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -70%) scale(1.5); opacity: 0; }
    100% { transform: translate(-50%, -70%) scale(1); opacity: 0.6; }
}

.incoming-call-avatar {
    width: 64px; height: 64px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 24px; color: white;
    position: relative; z-index: 1; overflow: hidden;
    box-shadow: 0 0 0 3px var(--bg-surface), 0 0 20px rgba(16, 185, 129, 0.3);
}

.incoming-call-info { text-align: center; }
.incoming-call-info h3 {
    font-size: 17px; font-weight: 700; margin-bottom: 3px; letter-spacing: -0.01em;
}
.incoming-call-status {
    font-size: 12.5px; color: var(--online);
    font-weight: 500; animation: statusPulse 2s ease-in-out infinite;
}
@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.incoming-call-actions {
    display: flex; gap: 20px; margin-top: 6px;
}
.call-action-btn {
    width: 50px; height: 50px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: white;
    transition: all 0.2s; border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.call-accept {
    background: var(--online);
}
.call-accept:hover {
    background: #059669; transform: scale(1.1);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}
.call-reject {
    background: var(--dnd);
}
.call-reject:hover {
    background: #DC2626; transform: scale(1.1);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

/* ─── Görüntülü arama çaldırma ekranı (Karar #28) ─── */
/* Kamerayla-katıl grubu: tek yeşil hap — solda kamera, sağda cihaz-seçim oku */
.call-video-accept-wrap {
    display: flex; align-items: stretch;
    background: var(--online);
    border-radius: 25px; overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}
.call-video-accept-wrap:hover {
    background: #059669;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}
.call-video-accept-wrap .call-accept-video {
    width: 46px; height: 50px;
    border-radius: 0;
    background: transparent; box-shadow: none;
    padding-left: 6px;
}
.call-video-accept-wrap .call-accept-video:hover { background: rgba(0,0,0,0.12); transform: none; box-shadow: none; }
.call-video-arrow-btn {
    width: 28px; border: none; cursor: pointer;
    background: transparent; color: white;
    display: flex; align-items: center; justify-content: center;
    padding-right: 8px;
    transition: background 0.15s;
}
.call-video-arrow-btn:hover { background: rgba(0,0,0,0.12); }

/* "Kamera önizlemesi" butonu (kartın altında) */
.incoming-call-preview-btn {
    padding: 7px 14px;
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12.5px; font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
}
.incoming-call-preview-btn:hover { background: rgb(var(--overlay-rgb) / 0.08); }

/* Kamera seçim menüsü — çaldırma popup'ının (z 700) ÜSTÜNDE açılmalı */
#camera-select-menu { z-index: 760; min-width: 230px; }
.camera-menu-label {
    padding: 6px 10px 4px;
    font-size: 11px; font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.04em;
}
.camera-menu-divider { height: 1px; background: var(--border); margin: 6px 4px; }
.camera-menu-item { justify-content: space-between; }
.camera-menu-name {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 220px;
}
.camera-menu-radio {
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid var(--text-muted);
    flex-shrink: 0; position: relative;
}
.camera-menu-radio.checked { border-color: var(--accent2); }
.camera-menu-radio.checked::after {
    content: ''; position: absolute; inset: 3px;
    border-radius: 50%; background: var(--accent2);
}
.camera-menu-empty { padding: 8px 10px; font-size: 13px; color: var(--text-muted); }

/* Kamera ön izleme modalı — çaldırma popup'ının üstünde */
#camera-preview-modal { z-index: 750; }
.camera-preview-content { max-width: 480px; }
.cam-preview-stage {
    position: relative; width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 16px 0 14px;
}
.cam-preview-stage video {
    width: 100%; height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* self-önizleme aynalı; karşıya giden görüntü aynalanmaz */
}
.cam-preview-status {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); font-size: 13px;
    text-align: center; padding: 0 20px;
    pointer-events: none;
}
.cam-preview-select {
    width: 100%; padding: 10px 12px;
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px; cursor: pointer;
}
/* ── CAMERA-PREVIEW-UI-1: kamera seçici ─────────────────────────────────────────
   Native açılır liste işletim sistemi stilinde çizilir (beyaz kenar, sistem mavisi) ve CSS
   ile değiştirilemez → ortak createCustomSelect (a11y kipi). Native select DEĞER TAŞIYICISI
   olarak kalır; YALNIZ sarmalandığında gizlenir (kardeş seçici, .settings-select deseni). */
#camera-preview-modal .custom-select-wrap + select.cam-preview-select { display: none; }
#camera-preview-modal .custom-select-trigger {
    min-height: 44px; padding-left: 42px;
    font-size: 14px; font-weight: 500;
}
/* Kamera ikonu: maske + token rengi (temaya uyar) */
#camera-preview-modal .custom-select-trigger::before {
    content: ''; position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    background: var(--text-muted);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='23 7 16 12 23 17 23 7'/%3E%3Crect x='1' y='5' width='15' height='14' rx='2' ry='2'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='23 7 16 12 23 17 23 7'/%3E%3Crect x='1' y='5' width='15' height='14' rx='2' ry='2'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
    transition: background var(--transition);
}
#camera-preview-modal .custom-select-trigger:hover::before,
#camera-preview-modal .custom-select-trigger.open::before,
#camera-preview-modal .custom-select-trigger:focus-visible::before { background: var(--accent); }
/* a11y kipinde etiket ayrı span'dedir → uzun cihaz adı tek satır + ellipsis (tam ad title'da) */
.custom-select-trigger .custom-select-value {
    flex: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Kamera yok: liste açılmaz → ok ve hover vurgusu da yok */
#camera-preview-modal .custom-select-trigger[aria-disabled="true"] { cursor: default; color: var(--text-muted); }
#camera-preview-modal .custom-select-trigger[aria-disabled="true"]::after { display: none; }
#camera-preview-modal .custom-select-trigger[aria-disabled="true"]:hover { border-color: var(--border); background: var(--bg-input); }
#camera-preview-modal .custom-select-trigger[aria-disabled="true"]:hover::before { background: var(--text-muted); }
/* Açık liste: modal yüzeyinden YÜKSELTİLMİŞ menü (ortak menü --bg-surface'te modalla aynı renkti) */
#camera-preview-modal .custom-select-menu {
    background: var(--bg-floating);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
    padding: 6px; max-height: 232px;
}
#camera-preview-modal .custom-select-option {
    gap: 10px; padding: 9px 10px; border-radius: 6px;
    font-size: 14px; color: var(--text-secondary);
}
#camera-preview-modal .custom-select-option > span {
    flex: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#camera-preview-modal .custom-select-option .cs-check { flex-shrink: 0; }
#camera-preview-modal .custom-select-option:hover,
#camera-preview-modal .custom-select-option:focus-visible {
    background: var(--bg-modifier-hover); color: var(--text-primary);
}
#camera-preview-modal .custom-select-option:focus-visible {
    outline: none; box-shadow: inset 0 0 0 1px var(--accent);
}
/* Seçili satır hover/odakta da accent kalır (aynı özgüllük, SONRA gelir) */
#camera-preview-modal .custom-select-option.selected {
    background: var(--accent-soft); color: var(--accent); font-weight: 600;
}
.cam-preview-footer {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-top: 18px;
}
.cam-preview-always {
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; color: var(--text-secondary);
    cursor: pointer; user-select: none;
    padding: 6px 0;   /* etiketin tamamı tıklanabilir; dikey tıklama alanı büyür */
    transition: color var(--transition);
}
.cam-preview-always:hover { color: var(--text-primary); }
/* Projenin özel onay kutusu dili (Karar #112 — .chs-toggle-row / .ctx-role-checkbox): native kutu
   appearance:none ile çizilir; ELEMAN, label tıklaması, Tab/Space ve kayıt mantığı AYNI kalır. */
.cam-preview-always input[type="checkbox"] {
    appearance: none; -webkit-appearance: none;
    width: 18px; height: 18px; flex-shrink: 0; box-sizing: border-box;
    margin: 0; cursor: pointer; position: relative;
    border: 1px solid var(--text-muted);
    border-radius: 4px;
    background: transparent;
    transition: background var(--transition), border-color var(--transition);
}
.cam-preview-always:hover input[type="checkbox"]:not(:checked) { border-color: rgb(var(--overlay-rgb) / 0.85); }
.cam-preview-always input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cam-preview-always input[type="checkbox"]:checked { background: var(--brand); border-color: var(--brand); }
/* Tik: CSS ile çizilir (ek SVG/ikon sistemi YOK) */
.cam-preview-always input[type="checkbox"]::after {
    content: ''; position: absolute;
    left: 5px; top: 1px; width: 5px; height: 10px;
    border: solid #fff; border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform var(--transition);
}
.cam-preview-always input[type="checkbox"]:checked::after { transform: rotate(45deg) scale(1); }
/* .btn-primary global %100 genişliktir — footer'da checkbox'ın yanına sığdır */
.cam-preview-footer .btn-primary { width: auto; margin-top: 0; padding: 10px 18px; flex-shrink: 0; }

/* Ringing animation on call button */
.call-btn-ringing {
    animation: ringShake 0.5s ease-in-out infinite;
}
@keyframes ringShake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    75% { transform: rotate(-15deg); }
}

/* DM Call Panel (voice connected bar in sidebar) */
.dm-call-panel {
    display: flex;
    flex-direction: column;
    padding: 10px 10px 8px;
    margin: 0 8px 0 -64px;
    background: var(--bg-surface);
    border-radius: 14px 14px 0 0;
    border: none;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}
/* Same server-rail underlay as .user-panel — fills the left gap with sidebar bg */
.dm-call-panel::before {
    content: '';
    position: absolute;
    z-index: -1;
    left: -80px;
    right: 0;
    top: 0;
    bottom: 0;
    background: var(--bg-secondary);
    pointer-events: none;
}
.dm-call-panel-top {
    display: flex; align-items: center; justify-content: space-between;
}
.dm-call-panel-info {
    display: flex; flex-direction: column; gap: 1px;
    min-width: 0;
}
.dm-call-panel-status {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 600; color: var(--online);
}
.dm-call-panel-label {
    color: var(--online);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Eski 20px girintiler durum satırındaki telefon ikonunun hizası içindi;
   barlar artık bilgi bloğunun DIŞINDA (.voice-panel-left — Karar #32) →
   ad/saat "Arama Bağlantısı" etiketiyle AYNI sol hizada durur (sunucu paneli gibi) */
.dm-call-panel-user {
    font-size: 10px; color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.dm-call-timer-row {
    display: flex; align-items: center; gap: 5px;
    font-size: 10px; color: var(--text-muted);
    margin-top: 1px;
}
/* Inside server voice panel there is no leading icon, so no indent */
.voice-panel-info .dm-call-timer-row {
    padding-left: 0;
}
/* .voice-channel-timer uses margin-left:auto for the sidebar list — reset it here so
   the timer stays next to the green dot instead of floating to the far right */
.voice-panel-info .dm-call-timer-row .voice-channel-timer {
    margin-left: 0;
}
.voice-conn-dot {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--online);
    flex-shrink: 0;
}
.dm-call-panel-controls {
    display: flex; align-items: center; gap: 4px;
    flex-shrink: 0;
}

/* ─── Message Requests ─────────────────────────────────────────── */
.request-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; border-radius: 8px;
    cursor: default; transition: background .15s;
}
.request-item:hover { background: var(--bg-hover); }
.request-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 16px; color: #fff;
    flex-shrink: 0; overflow: hidden;
}
.request-avatar .avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.request-info { flex: 1; min-width: 0; }
.request-name { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.request-preview {
    font-size: 12px; color: var(--text-muted); margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Phone icon inside call-type message request previews */
.req-call-preview-icon {
    display: inline-block;
    vertical-align: middle;
    color: #3ba55c;
    margin-right: 2px;
    position: relative;
    top: -1px;
    flex-shrink: 0;
}
.request-actions { display: flex; gap: 6px; flex-shrink: 0; }

#nav-requests-btn {
    display: flex; align-items: center; gap: 8px;
    width: 100%; padding: 8px 12px; border: none;
    background: transparent; color: var(--text-secondary);
    border-radius: 6px; cursor: pointer; font-size: 14px;
    font-weight: 500; transition: background .15s, color .15s;
    position: relative;
}
#nav-requests-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
#nav-requests-btn.active { background: var(--bg-active); color: var(--ui-text-strong); }
#requests-badge {
    background: var(--danger); color: #fff; font-size: 11px;
    font-weight: 700; border-radius: 10px; padding: 1px 6px;
    min-width: 18px; text-align: center; line-height: 16px;
}
#requests-view { display: none; flex-direction: column; flex: 1; }
#requests-view.active { display: flex; }
#requests-view .friends-header {
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
}
#requests-view .friends-header h3 { margin: 0; font-size: 16px; color: var(--text-primary); }
#requests-list { flex: 1; overflow-y: auto; padding: 8px; }

/* ═══════════════ INVITE MODAL FIX ═══════════════ */
#invite-modal .modal-content { text-align: center; }

/* ═══════════════ RECENT CALLERS ═══════════════ */
.recent-callers-section {
    margin-top: 16px; padding-top: 12px;
    border-top: 1px solid var(--border);
}
.recent-callers-title {
    font-size: 11px; font-weight: 700; color: var(--text-muted);
    letter-spacing: 0.05em; padding: 0 12px 8px;
}
.recent-caller-item .friend-username {
    font-size: 11px; color: var(--text-muted);
}

/* ═══════════════ MSG REQUEST BANNER ═══════════════ */
.msg-request-banner {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 14px 18px; margin: 8px 16px 12px;
}
.msg-request-banner-text {
    font-size: 14px; color: var(--text-secondary);
}
.msg-request-banner-text strong { color: var(--text-primary); }
.msg-request-banner-actions {
    display: flex; gap: 8px;
}
.msg-request-banner-actions .btn-primary,
.msg-request-banner-actions .btn-danger {
    width: auto; margin-top: 0; padding: 6px 16px; font-size: 13px;
}
/* Bekleyen mesaj isteginde banner ile DM baslangic profil alani TEK bir blok gibi
   okunsun: intro'nun ust bosluğu daraltilir (olculen gorsel bosluk 41px -> 23px).
   BITISIK-KARDES secici ZORUNLUDUR: kural yalniz banner'in HEMEN ARDINDAKI intro'yu
   etkiler; normal DM ve kanal intro'sunun 28px ust bosluğu DEGISMEZ (paylasilan
   `.chat-intro` tabanina DOKUNULMAZ). Yalniz bosluk; renk/hiza/icerik ayni kalir. */
.msg-request-banner + .chat-intro { padding-top: 10px; }
.btn-sm { padding: 6px 16px !important; font-size: 13px !important; }

/* ═══════════════ REQUEST ITEM CLICKABLE ═══════════════ */
.request-item .request-info,
.request-item .request-avatar { cursor: pointer; }
.request-item .request-info:hover .request-name { color: var(--accent); }

/* ═══════════════ MESSAGE REPLY PREVIEW ═══════════════ */
.message-reply-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0 4px 0;
    margin-bottom: 2px;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    transition: opacity 0.15s;
}
.message-reply-preview:hover { opacity: 0.8; background: var(--bg-hover); border-radius: 4px; padding-left: 4px; margin-left: -4px; }

/* ── Message Jump Flash (reply scroll) ── */
@keyframes messageJumpFlash {
    0%   { background: rgba(88, 101, 242, 0.45); box-shadow: 0 0 0 1px rgba(88, 101, 242, 0.85); }
    45%  { background: rgba(88, 101, 242, 0.28); box-shadow: 0 0 0 1px rgba(88, 101, 242, 0.6); }
    100% { background: rgba(88, 101, 242, 0);    box-shadow: 0 0 0 1px rgba(88, 101, 242, 0); }
}
.message.message-jump-flash::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 5;
    animation: messageJumpFlash 1500ms ease-out forwards;
}
.reply-bar {
    width: 2px;
    height: 14px;
    border-radius: 1px;
    background: var(--accent);
    flex-shrink: 0;
}
.reply-author {
    font-weight: 600;
    font-size: 12px;
    flex-shrink: 0;
}
.reply-text {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

/* ═══════════════ REPLY BANNER ═══════════════ */
.reply-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    font-size: 13px;
    color: var(--text-secondary);
}
.reply-banner svg {
    flex-shrink: 0;
    opacity: 0.5;
}
#reply-banner-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#reply-banner-text strong {
    font-weight: 600;
}
/* Flatten input-wrapper top corners when reply is active so they read as one unit */
#reply-banner:not(.hidden) ~ .input-wrapper {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* Banner jump-to-message: clickable area feedback */
.reply-banner,
.edit-banner {
    cursor: pointer;
    transition: filter var(--transition), background var(--transition);
}
/* edit-banner: kendi inset kutusu → brightness sorunsuz. reply-banner: .input-wrapper ile bitişik;
   filter YENİ STACKING CONTEXT oluşturup input-wrapper'ın mavi :focus-within glow'unu örterdi
   (hover'da mavi çizgi kaybolurdu) → onun yerine arka planı hafif aç (stacking context oluşmaz). */
.edit-banner:hover {
    filter: brightness(1.06);
}
.reply-banner:hover {
    background: var(--bg-hover);
}

/* ═══════════════ USER SETTINGS MODAL ═══════════════ */
.user-settings-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}
.user-settings-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}
.user-settings-tag {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ═══════════════ AVATAR COLOR PICKER ═══════════════ */
.avatar-color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}
.color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color 0.15s, transform 0.15s;
    position: relative;
}
.color-swatch:hover {
    transform: scale(1.15);
}
.color-swatch.active {
    border-color: white;
    box-shadow: 0 0 0 2px var(--accent);
}
.color-swatch.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* ═══════════════ ROLES SECTION ═══════════════ */
.roles-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}
.role-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}
.role-item:hover {
    background: var(--bg-hover);
}
.role-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.role-name {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}
.role-delete-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.15s;
}
.role-delete-btn:hover {
    color: var(--dnd);
}
.role-edit-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 4px;
    line-height: 1;
    transition: color 0.15s;
    display: flex;
    align-items: center;
}
.role-edit-btn:hover {
    color: var(--accent);
}
.role-item-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
}
/* ─── Roller ana ekranı (Karar #35 — Discord benzeri düzen) ─── */
.roles-default-card {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;                 /* D4: kart artık aktif (Varsayılan İzinler) */
    transition: background var(--transition);
}
.roles-default-card:hover { background: var(--bg-hover); }
/* D4 (Karar #40): varsayılan rol kartı durumları */
.roles-default-card.rdp-disabled {   /* varsayılan rol bulunamadı (eski sunucu) */
    cursor: not-allowed;
    opacity: 0.55;
}
.roles-default-card.rdp-disabled:hover { background: none; }
.roles-default-card.rdp-readonly { cursor: not-allowed; }
/* Varsayılan rol editörü: metadata kilidi + uyarı notu */
.re-default-note { border-left: 2px solid var(--accent); }
/* Sahip olmayan varsayılan rolü görüntüler ama kaydedemez → kaydet çubuğu gizli */
#role-editor.re-default-readonly #re-savebar { display: none; }
.rdp-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--bg-input);
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.rdp-text { flex: 1; min-width: 0; }
.rdp-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.rdp-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.rdp-chevron { color: var(--text-muted); flex-shrink: 0; }
.roles-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0 6px;
}
.roles-search-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 10px;
    color: var(--text-muted);
}
.roles-search-wrap:focus-within { border-color: var(--accent); }
.roles-search-wrap svg { flex-shrink: 0; }
.roles-search-wrap input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    padding: 9px 0;
    font-size: 13px;
    color: var(--text-primary);
}
.roles-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 2px 12px;
}
.roles-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.roles-col-members { margin-right: 64px; }
.role-member-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 600;
    flex-shrink: 0;
    margin-right: 14px;
}
.role-member-badge svg { color: var(--text-muted); }
.role-item { cursor: pointer; }
/* ─── Rol Editörü (sekmeli — Karar #35) ─── */
.re-layout {
    display: flex;
    gap: 18px;
    align-items: stretch;
    min-height: 420px;
}
.re-sidebar {
    width: 200px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    padding-right: 14px;
    display: flex;
    flex-direction: column;
}
.re-sidebar-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}
.re-sidebar-title {
    flex: 1;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: var(--text-muted);
}
.re-icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), color var(--transition);
}
.re-icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.re-role-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.re-role-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: background var(--transition), color var(--transition);
}
.re-role-row:hover { background: var(--bg-hover); }
.re-role-row.active { background: var(--bg-input); color: var(--text-primary); }
.re-role-row-name {
    flex: 1;
    font-size: 13.5px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* D4 (Karar #40): varsayılan rol (@herkes) — listenin EN ALTINDA sabit satır;
   normal rollerden ayrık (üst çizgi), sürüklenemez, "Varsayılan" rozetli. */
.re-role-row.re-role-default {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    cursor: pointer;
}
.re-role-default-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}
/* Faz 0B: yönetilemeyen (eşit/üst) rol — soluk satır + kilit ikonu */
.re-role-row.re-role-locked { opacity: 0.55; }
.re-row-lock { color: var(--text-muted); flex-shrink: 0; }
/* Rol sıralama (sürükle-bırak): tutamaç + sürükleme/bırakma göstergeleri */
.re-row-grip {
    color: var(--text-muted);
    flex-shrink: 0;
    cursor: grab;
    opacity: 0;
    transition: opacity var(--transition);
}
.re-role-row:hover .re-row-grip { opacity: 1; }
.re-role-row[draggable="true"] { cursor: grab; }
.re-role-row.re-dragging { opacity: 0.4; }
.re-role-row.re-drop-above { box-shadow: 0 -2px 0 var(--accent); }
.re-role-row.re-drop-below { box-shadow: 0 2px 0 var(--accent); }
/* İçerik kolonu ayırıcıdan bir miktar İÇERİ alınır: ayırıcı ile "ROLÜ DÜZENLE"
   içeriği arasındaki nefes alanı `.re-layout` gap'i (18px) + bu iç boşluk (14px)
   = 32px olur. `.re-sidebar` genişliği/padding'i ve ayırıcı (sidebar border-right)
   DEĞİŞMEZ — kolon yer değiştirmez, yalnız içerik içeri alınır. Absolute/transform
   hack YOK; mevcut spacing ölçeğinden (14px, sidebar padding-right ile aynı) değer.
   `flex:1 + min-width:0` durduğu için dar ekranda kolon yine küçülebilir. */
.re-main {
    flex: 1;
    min-width: 0;
    padding-left: 14px;
    display: flex;
    flex-direction: column;
}
/* DAR pencerede iç boşluk KAPANIR: içerik kolonu zaten daralıyor ve palet
   ızgarası (7×28 + 6×6 = 232px sabit) bu genişliğe yakın. 14px'i orada da
   uygulamak taşma eşiğini yukarı çekiyordu → ≤900px'te davranış bu değişiklik
   ÖNCESİYLE birebir aynı olur (bu tur bir daralma getirmez). */
@media (max-width: 900px) {
    .re-main { padding-left: 0; }
}
.re-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.re-header-title {
    flex: 1;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.re-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}
.re-tab {
    background: none;
    border: none;
    padding: 8px 12px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color var(--transition), border-color var(--transition);
}
.re-tab:hover { color: var(--text-secondary); }
.re-tab.active { color: var(--text-primary); border-bottom-color: var(--accent); }
/* BATCH E: renk paletindeki hover büyümesi (`scale`) kırpma kutusunun kenarında
   kesilmesin diye 3px pay. Pay `padding-left: 3px` ile verilir ve `margin-left:
   -3px` ile telafi edilir: kırpma kutusu 3px SOLA genişler ama İÇERİK tam eskisi
   olduğu yerde kalır → panel alanları başlık/sekmelerle aynı hizada durur.
   Negatif margin güvenlidir: `.re-main` kırpma kutusu DEĞİL (overflow visible)
   ve iç boşluğu var → taşma o payın içinde kalır.
   Pay, en büyük hover büyümesini karşılar: swatch 28px x 0.12 / 2 = 1.68px < 3px. */
.re-panel { flex: 1; overflow-y: auto; padding-bottom: 8px; padding-left: 3px; margin-left: -3px; }
.re-field { margin-bottom: 16px; }
.re-field .role-name-input { width: 100%; max-width: 340px; display: block; margin-top: 6px; }
.re-field .color-picker-btn { margin-top: 6px; }
.re-switch-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-top: 1px solid var(--border);
}
.re-switch-text { flex: 1; min-width: 0; }
/* Batch D (5100 paritesi): başlık/açıklama bloğu `<label for>` olduğunda tıklanabilirliği
   imleçle belli olur (Güvenlik Eylemleri ekranındaki `label.settings-toggle-info` ile aynı
   davranış). KİLİTLİ izin satırında tıklama zaten etkisizdir → imleç de varsayılan kalır.
   Tek kural iki yüzeyi de kapsar (Görünüm satırı + İzin satırı); Görünüm satırlarının
   markup dönüşümü Batch D kapsamı DIŞINDADIR, o yarı bugün eşleşmez. */
label.re-switch-text { cursor: pointer; }
.re-switch-row:has(input:disabled) label.re-switch-text,
.re-perm-row:has(input:disabled) label.re-switch-text { cursor: default; }
.re-switch-title { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.re-switch-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.re-perm-search { margin-bottom: 12px; }
.re-perm-group { margin-bottom: 14px; }
.re-perm-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.re-sys-note {
    font-size: 12.5px;
    color: var(--idle);
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    margin-bottom: 12px;
}
/* Faz 1C-1: kritik izin (administrator) — normal izinle aynı görsel ağırlıkta
   değil: ayrı kutu + ikonlu kısa uyarı satırı (uyarı yalnız renkle verilmez) */
.re-perm-row.re-perm-critical {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
}
/* Batch D (5100 paritesi): uyarı satırı yalnız METİN — ikon kaldırıldı, bu yüzden
   flex/gap ve svg kuralı da gerekmez. Kırmızı (`--dnd`) vurgu AYNEN korunur. */
.re-switch-warn {
    font-size: 12px; color: var(--dnd); margin-top: 5px;
}
.re-locked { pointer-events: none; opacity: 0.55; }
.re-members-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    position: relative;
}
.re-member-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.re-member-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
}
.re-member-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 700;
    object-fit: cover;
    overflow: hidden;
}
.re-member-name {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.re-member-username { flex: 1; font-size: 12px; color: var(--text-muted); }
.re-member-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 17px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.15s;
}
.re-member-remove:hover { color: var(--dnd); }
.re-add-member-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 240px;
    max-height: 280px;
    overflow-y: auto;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    padding: 6px;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.re-add-member-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    transition: background var(--transition), color var(--transition);
}
.re-add-member-opt:hover { background: var(--accent); color: white; }
/* Rol bağlam menüsü ayarlar modalının üstünde kalsın */
#role-ctx-menu { z-index: 10002; }
.role-edit-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-top: 4px;
    margin-bottom: 6px;
    animation: fadeIn 0.15s;
}
.role-edit-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.role-edit-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    min-width: 60px;
}
.role-edit-name {
    flex: 1;
    max-width: 260px;
}
.role-edit-perms {
    margin-top: 8px;
    margin-bottom: 10px;
}
.role-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.role-edit-actions .btn-primary {
    width: auto;
    padding: 8px 20px;
    font-size: 13px;
}
.role-edit-actions .btn-secondary {
    width: auto;
    padding: 8px 20px;
    font-size: 13px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.role-edit-actions .btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.role-create-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.role-name-input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
}
/* Custom Color Picker Button */
.color-picker-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--bg-tertiary);
    flex-shrink: 0;
    transition: all 0.2s;
    position: relative;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.color-picker-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 0 16px rgba(88, 101, 242, 0.35), 0 2px 8px rgba(0,0,0,0.3);
    border-color: var(--accent);
}
.color-picker-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0,0,0,0.35);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.121 2.121 0 013 3L7 19l-4 1 1-4 12.5-12.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px;
    opacity: 0;
    transition: opacity 0.15s;
}
.color-picker-btn:hover::after {
    opacity: 1;
}
/* Custom Color Picker Panel */
.color-picker-panel {
    position: absolute;
    z-index: 600;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 230px;
    animation: colorPickerIn 0.18s ease;
}
@keyframes colorPickerIn {
    from { opacity: 0; transform: scale(0.92) translateY(6px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.cp-preview-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cp-preview {
    width: 32px; height: 32px;
    border-radius: 8px;
    border: 2px solid var(--border);
    flex-shrink: 0;
}
.cp-hex-input {
    flex: 1;
    padding: 6px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: 'Consolas', monospace;
    text-transform: uppercase;
}
.cp-hex-input:focus {
    border-color: var(--accent);
    outline: none;
}
.cp-swatches {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.cp-swatch {
    width: 26px; height: 26px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s;
}
.cp-swatch:hover {
    transform: scale(1.15);
    border-color: rgba(255,255,255,0.4);
    box-shadow: 0 0 8px rgba(0,0,0,0.3);
}
.cp-swatch.active {
    border-color: white;
    box-shadow: 0 0 0 2px var(--accent);
}
/* Zengin renk seçici: doygunluk/değer alanı + ton çubuğu + damlalık */
.cp-area {
    position: relative;
    width: 100%;
    height: 140px;
    border-radius: 8px;
    cursor: crosshair;
    border: 1px solid var(--border);
    touch-action: none;
    overflow: hidden;
}
.cp-area-handle {
    position: absolute;
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.45);
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.cp-hue {
    position: relative;
    width: 100%;
    height: 14px;
    border-radius: 7px;
    background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
    cursor: pointer;
    touch-action: none;
}
.cp-hue-handle {
    position: absolute;
    top: 50%;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: currentColor;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.45);
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.cp-hex-wrap { position: relative; flex: 1; min-width: 0; }
.cp-hex-wrap .cp-hex-input { width: 100%; }
.cp-hex-wrap.has-ed .cp-hex-input { padding-right: 32px; }
.cp-eyedropper {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    background: transparent;
    border: none;
    border-radius: 5px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}
.cp-eyedropper:hover { color: var(--text-primary); background: var(--bg-hover); }

/* ═══════════════ MEMBERS WITH ROLES ═══════════════ */
.members-roles-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.member-role-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
}
.member-role-user {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.member-role-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}
.member-role-name {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}
.member-role-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.role-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border: 1px solid;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.role-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.role-chip-remove {
    background: none;
    border: none;
    color: inherit;
    font-size: 13px;
    cursor: pointer;
    padding: 0 0 0 2px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.15s;
}
.role-chip-remove:hover {
    opacity: 1;
}
.role-assign-dropdown {
    position: relative;
    display: inline-block;
}
.role-assign-trigger {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.role-assign-trigger:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(88, 101, 242, 0.08);
}
.role-assign-trigger svg {
    width: 14px; height: 14px;
    transition: transform 0.2s;
}
.role-assign-trigger.open svg {
    transform: rotate(45deg);
}
.role-assign-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 160px;
    max-height: 180px;
    overflow-y: auto;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    padding: 4px;
    z-index: 100;
    animation: dropdownIn 0.15s ease;
}
@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.role-assign-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.12s;
    border: none;
    background: none;
    width: 100%;
    font-family: inherit;
}
.role-assign-option:hover {
    background: var(--accent-soft);
    color: var(--text-primary);
}
.role-assign-option .role-opt-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ═══════════════ VOICE VOLUME CONTROLS ═══════════════ */

/* ═══════════════ SERVER DROPDOWN MENU ═══════════════ */
.server-header-bar {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border);
    min-height: 49px;
}
.server-header-clickable {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    flex: 1;
    min-width: 0;
    margin: 6px 4px 6px 8px;
    padding: 5px 9px;
    border-radius: 8px;
    border-bottom: none;
    transition: background var(--transition);
    user-select: none;
}
.server-header-clickable:hover {
    background: var(--srv-hover-tint, var(--bg-hover));
}
.server-header-clickable.open {
    background: var(--srv-hover-active, var(--bg-active));
}
.server-header-clickable h3 {
    font-size: 15px;
    font-weight: 700;
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.server-header-clickable .chevron-icon {
    flex-shrink: 0;
    transition: transform 0.2s ease, color var(--transition);
    color: var(--text-muted);
}
.server-header-clickable:hover .chevron-icon,
.server-header-clickable.open .chevron-icon {
    color: var(--accent);
}
.server-header-clickable.open .chevron-icon {
    transform: rotate(180deg);
}
.server-header-invite {
    flex-shrink: 0;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0 9px 0 2px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), transform var(--transition);
}
.server-header-invite:hover {
    background: rgb(var(--overlay-rgb) / 0.06);
    color: var(--text-primary);
}
.server-header-invite:active {
    transform: scale(0.92);
}
.server-header-invite svg {
    width: 18px;
    height: 18px;
}

.server-dropdown {
    position: absolute;
    top: 52px;
    left: 8px;
    right: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-hover);
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 12px 34px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,0,0,0.25);
    z-index: 200;
    animation: dropdownIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.server-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 11px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: background var(--transition), color var(--transition);
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}
.server-dropdown-item span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.server-dropdown-item svg {
    width: 17px;
    height: 17px;
    margin-left: auto;
    opacity: 0.7;
    flex-shrink: 0;
    transition: opacity var(--transition), color var(--transition);
}
.server-dropdown-item:hover {
    background: rgb(var(--overlay-rgb) / 0.06);
    color: var(--text-primary);
}
.server-dropdown-item:hover svg {
    opacity: 1;
    color: var(--text-primary);
}
.server-dropdown-item.danger {
    color: var(--dnd);
}
.server-dropdown-item.danger:hover {
    background: rgba(239,68,68,0.14);
    color: var(--dnd);
}
.server-dropdown-item.danger:hover svg {
    color: var(--dnd);
}
.server-dropdown-sep {
    height: 1px;
    background: var(--border);
    margin: 5px 6px;
}

/* ═══════════════ FULL-SCREEN SETTINGS (now popup style) ═══════════════ */
.settings-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(3px);
    animation: settingsIn 0.2s ease;
    padding: 20px;
    overscroll-behavior: none;
}
@keyframes settingsIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Standalone standing mode — hide sidebar, center content */
.standing-only-mode .settings-sidebar { display: none; }
.standing-only-mode .settings-main { width: 100%; }
.standing-only-mode .settings-main-scroll {
    max-width: 900px; width: 100%; margin: 0 auto;
    padding: 48px 56px 56px;
}
.standing-only-mode .settings-tab:not(#us-standing) { display: none !important; }
.standing-only-mode .settings-close-btn { right: 12px; }

/* Wider health card in standalone */
.standing-only-mode .standing-health-card { padding: 32px 40px; }
.standing-only-mode .standing-health-ring { width: 96px; height: 96px; }
.standing-only-mode .standing-ring-svg { width: 96px; height: 96px; }
.standing-only-mode .standing-ring-icon { font-size: 34px; }
.standing-only-mode .standing-health-level { font-size: 22px; }
.standing-only-mode .standing-health-desc { font-size: 14px; }

/* Violation cards: 2 columns in standalone when wide enough */
@media (min-width: 768px) {
    .standing-only-mode .standing-violations-list {
        display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    }
    .standing-only-mode .standing-empty { grid-column: 1 / -1; }
}

.settings-sidebar {
    width: 220px;
    min-width: 220px;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    padding: 60px 8px 20px;
    border-right: 1px solid var(--border);
    overflow-y: auto;
    overscroll-behavior: contain;
}
.settings-sidebar-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0 12px 12px;
}
.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.settings-nav-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 12px 12px 4px;
}
.settings-nav-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition);
    background: none;
    border: none;
}
.settings-nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.settings-nav-item.active {
    background: var(--bg-active);
    color: var(--text-primary);
}
.settings-nav-danger {
    color: var(--dnd) !important;
}
.settings-nav-danger:hover {
    background: rgba(239, 68, 68, 0.12) !important;
    color: var(--dnd) !important;
}
.settings-nav-sep {
    height: 1px;
    background: var(--border);
    margin: 6px 12px;
}

.settings-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--bg-tertiary);
}
.settings-main-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 30px 40px 40px;
    max-width: 740px;
    width: 100%;
}

.settings-close-btn {
    position: absolute;
    top: 20px;
    right: clamp(16px, 3vw, 32px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: 2px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    z-index: 10;
}
.settings-close-btn:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}
.settings-close-btn span {
    display: block;
    position: absolute;
    top: 46px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    white-space: nowrap;
    pointer-events: none;
}

/* ── Expand / restore button (to the left of close btn) ── */
.settings-expand-btn {
    position: absolute; top: 20px; right: calc(clamp(16px, 3vw, 32px) + 48px);
    background: none; border: 2px solid var(--border);
    border-radius: 50%; width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); cursor: pointer;
    transition: all var(--transition);
    z-index: 10;
}
.settings-expand-btn:hover { border-color: var(--text-secondary); color: var(--text-primary); }
.settings-expand-btn .restore-icon { display: none; }
.settings-popup.settings-modal-expanded .settings-expand-btn .expand-icon { display: none; }
.settings-popup.settings-modal-expanded .settings-expand-btn .restore-icon { display: flex; }

/* ── Expanded modal size ── */
.settings-popup.settings-modal-expanded {
    width: min(1280px, calc(100vw - 48px));
    max-width: calc(100vw - 48px);
    height: calc(100vh - 48px);
    max-height: calc(100vh - 48px);
}

/* ── Server settings: expanded = real fullscreen layout ── */
#server-settings-modal.server-settings-expanded {
    padding: 0;
    background: var(--bg-secondary);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: block;
    overflow: hidden;
}
#server-settings-modal.server-settings-expanded .settings-popup {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: none;
    height: 100vh;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    display: grid;
    grid-template-columns:
        minmax(260px, 23vw)
        240px
        minmax(0, 740px)
        minmax(80px, 1fr);
    grid-template-rows: 100vh;
    background: var(--bg-secondary);
    overflow: hidden;
    animation: none;
}
#server-settings-modal.server-settings-expanded .settings-sidebar {
    grid-column: 2;
    width: 240px;
    min-width: 240px;
    height: 100vh;
    border-right: none;
    padding-top: 64px;
    padding-bottom: 64px;
    box-sizing: border-box;
    overflow-y: auto;
}
#server-settings-modal.server-settings-expanded .settings-main {
    grid-column: 3 / 5;            /* col3 (içerik) + col4 (boşluk) → kaydırma barı en SAĞ kenarda */
    height: 100vh;
    overflow: hidden;
    box-sizing: border-box;
}
/* Sunucu ayarları HEP tam ekran → küçült/büyüt toggle'ı gizli */
#ss-expand-btn { display: none !important; }
#server-settings-modal.server-settings-expanded .settings-main-scroll {
    max-width: none;
    padding-top: 72px;
    padding-bottom: 96px;
}
#server-settings-modal.server-settings-expanded .settings-close-btn {
    position: fixed;
    top: 24px;
    right: clamp(44px, 3.5vw, 76px);
    z-index: 20;
}
#server-settings-modal.server-settings-expanded .settings-expand-btn {
    position: fixed;
    top: 24px;
    right: calc(clamp(44px, 3.5vw, 76px) + 48px);
    z-index: 20;
}
@media (max-width: 1100px) {
    #server-settings-modal.server-settings-expanded .settings-popup {
        grid-template-columns: 220px minmax(0, 1fr);
    }
    #server-settings-modal.server-settings-expanded .settings-sidebar {
        grid-column: 1;
        width: 220px;
        min-width: 220px;
        padding-left: 16px;
        padding-right: 12px;
    }
    #server-settings-modal.server-settings-expanded .settings-main {
        grid-column: 2;
    }
    #server-settings-modal.server-settings-expanded .settings-main-scroll {
        padding-right: 104px;
    }
}
@media (max-width: 1500px) {
    #server-settings-modal.server-settings-expanded .settings-close-btn {
        right: clamp(8px, 1.5vw, 20px);
    }
    #server-settings-modal.server-settings-expanded .settings-expand-btn {
        right: calc(clamp(8px, 1.5vw, 20px) + 44px);
    }
}

.settings-tab {
    display: none;
}
.settings-tab.active {
    display: block;
}

.settings-tab-header {
    margin-bottom: 24px;
}
.settings-tab-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}
.settings-tab-header p {
    font-size: 13px;
    color: var(--text-muted);
}

.settings-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
}
.settings-card-row {
    display: flex;
    align-items: center;
    gap: 16px;
}
.settings-card-actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
}

/* ─── Server Settings Specific ──────── */
.ss-server-preview {
    display: flex;
    align-items: center;
    gap: 16px;
}
.ss-server-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
}
.ss-server-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ss-server-preview-name {
    font-size: 18px;
    font-weight: 700;
}
.ss-server-preview-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}
.ss-meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-muted);
}

.invite-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
}

/* ─── Invite Management ──────── */

.invites-list { display: flex; flex-direction: column; }

/* shared grid: inviter | code | uses | expires | temporary | actions */
/* Columns use fr units so they compress proportionally on smaller windows */
.invite-table-header,
.invite-row {
    display: grid;
    grid-template-columns: minmax(80px, 2.6fr) minmax(65px, 2fr) minmax(50px, 1.5fr) minmax(70px, 2.4fr) minmax(50px, 1.3fr) 40px;
    align-items: center;
    padding: 8px 12px;
    gap: 4px;
}
/* Satırlar ferah: davet eden hücresi iki satırlı (ad + kanal) olduğundan
   dikey nefes payı artırıldı; başlık satırı hizada kalsın diye ayrı bırakıldı. */
.invite-row {
    padding: 10px 12px;
    min-height: 56px;
}
.invite-table-header { padding-bottom: 10px; }
.invite-table-header {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2px;
}
.invite-row {
    border-radius: var(--radius-sm);
    transition: background 0.12s;
}
.invite-row:hover { background: var(--bg-hover); }

/* Narrow window: card layout — no horizontal scroll */
@media (max-width: 820px) {
    .invite-table-header { display: none; }
    .invite-row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        column-gap: 6px;
        row-gap: 5px;
        padding: 10px 12px;
        border-bottom: 1px solid var(--border);
        border-radius: 0;
    }
    .invite-row:last-child { border-bottom: none; }
    .invites-list { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
    /* Row 1: inviter (grows, truncates) + action buttons (pinned right) */
    .inv-cell-inviter { flex: 1 1 auto; min-width: 0; order: 1; }
    .inv-cell-actions { flex: 0 0 auto; flex-shrink: 0; order: 2; }
    /* Row 2: invite code - full width, indented past avatar+gap (30px + 9px).
       Girinti MARGIN degil PADDING ile verilir: `flex: 0 0 100%` ana eksen
       boyutunu kabin genisligine esitler ve DIS margin bunun USTUNE binip
       satiri tasirirdi (820px altinda 27px yatay tasma olculdu). `box-sizing:
       border-box` global oldugu icin padding kutunun ICINDE kalir; gorsel
       hizalama ayni 39px'tir ve kardes `.inv-cell-uses` zaten padding kullanir. */
    .inv-cell-code { flex: 0 0 100%; order: 3; padding-left: 39px; }
    /* Row 3: meta info — muted, smaller, indented to match code row */
    .inv-cell-uses {
        flex: 0 0 auto; order: 4;
        font-size: 11px; color: var(--text-muted);
        padding-left: 39px;
    }
    .inv-cell-expires {
        flex: 0 0 auto; order: 5;
        font-size: 11px; color: var(--text-muted);
        padding-left: 8px;
        border-left: 1px solid var(--border);
    }
    .invite-row .inv-cell:nth-child(5) {
        flex: 0 0 auto; order: 6;
        font-size: 11px;
        padding-left: 8px;
        border-left: 1px solid var(--border);
    }
}

/* cells */
.inv-cell { font-size: 13px; color: var(--text-secondary); min-width: 0; overflow: hidden; }
.inv-cell-inviter { display: flex; align-items: center; gap: 9px; }
/* Ad + davetin oluşturulduğu kanal alt alta */
.inv-inviter-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.inv-channel {
    display: flex; align-items: center; gap: 3px;
    font-size: 11.5px; color: var(--text-muted); min-width: 0;
}
.inv-channel svg { width: 11px; height: 11px; flex-shrink: 0; opacity: 0.85; }
.inv-channel-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: #fff;
    flex-shrink: 0; overflow: hidden;
}
.inv-avatar img { width: 100%; height: 100%; object-fit: cover; }
.inv-name { font-size: 13px; color: var(--text-primary); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Kod hücresi kopyalama yüzeyidir: ayrı "Kopyala" butonu YOK, koda tıklanır. */
.inv-cell-code {
    font-family: monospace; font-size: 12px; color: var(--accent); font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    cursor: pointer; width: fit-content; max-width: 100%;
    transition: opacity 0.12s;
}
.inv-cell-code:hover { opacity: 0.82; text-decoration: underline; }
.inv-cell-uses { white-space: nowrap; }
.inv-cell-expires { font-size: 12px; white-space: nowrap; }
.inv-temp-badge {
    display: inline-block;
    padding: 2px 8px; border-radius: 10px;
    font-size: 11px; font-weight: 700; white-space: nowrap;
}
.inv-temp-badge.on  { background: rgba(87,242,135,0.15); color: var(--tint-green, #57f287); }
.inv-temp-badge.off { background: rgba(148,155,164,0.10); color: var(--text-muted); }
.inv-cell-actions { display: flex; gap: 4px; justify-content: flex-end; }
/* Tek işlem butonu: yuvarlak iptal (×). Satır hover'ında (veya klavye odağında)
   belirir — sakin liste görünümü; dar pencerede daima görünür (hover yok). */
.invite-revoke-btn {
    width: 26px; height: 26px; padding: 0;
    border-radius: 50%;
    border-color: transparent;
    background: var(--bg-surface);
    color: var(--text-secondary);
    opacity: 0;
    transition: opacity 0.12s, background 0.15s, color 0.15s;
}
.invite-row:hover .invite-revoke-btn,
.invite-row:focus-within .invite-revoke-btn { opacity: 1; }
@media (hover: none), (max-width: 820px) {
    .invite-revoke-btn { opacity: 1; }
}
.btn-icon {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text-primary); }
.invite-revoke-btn:hover { background: rgba(237,66,69,0.15); color: var(--dnd) !important; }

/* ─── User Settings Specific ──────── */
.us-account-card {
    padding: 0;
    overflow: hidden;
}
.us-account-banner {
    height: 100px;
    background: var(--accent-grad);
    position: relative;
}
.us-account-body {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    padding: 0 20px;
    margin-top: -38px;
    position: relative;
    z-index: 1;
}
.us-account-avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 800;
    color: white;
    border: 6px solid var(--bg-surface);
    flex-shrink: 0;
    user-select: none;
    -webkit-user-select: none;
}
.us-account-info {
    padding-bottom: 12px;
}
.us-account-name {
    font-size: 20px;
    font-weight: 700;
}
.us-account-tag {
    font-size: 13px;
    color: var(--text-muted);
}
.us-account-fields {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-input);
    margin: 16px 20px 20px;
    border-radius: var(--radius-sm);
}
.us-field-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.us-field-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}
.us-field-value {
    font-size: 14px;
    color: var(--text-primary);
}

.us-profile-layout {
    display: flex;
    gap: 24px;
}
.us-profile-form {
    flex: 1;
    min-width: 0;
}
.us-profile-preview {
    width: 300px;
    flex-shrink: 0;
}
.us-preview-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}
.us-preview-banner {
    height: 90px;
    background: var(--accent-grad);
}
.us-preview-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: white;
    border: 5px solid var(--bg-surface);
    margin: -40px 0 0 16px;
    position: relative;
    z-index: 1;
    user-select: none;
    -webkit-user-select: none;
}
.us-preview-body {
    padding: 10px 16px 16px;
}
.us-preview-name {
    font-size: 18px;
    font-weight: 700;
    margin-top: 4px;
    /* Uzun/boşluksuz isim karttan taşmasın → alt satıra kırılır */
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}
/* Gerçek profil kartlarında da uzun isim taşmasın */
.profile-card-name, .pp-name, .upp-display-name {
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}
.us-preview-tag {
    font-size: 12px;
    color: var(--text-muted);
}
.us-preview-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 0;
}
.us-preview-section-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.us-preview-about {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
}
/* Tag satiri: @kullaniciadi · hitap — SATIR İÇİ akış (flex değil) ki uzun hitap
   @kullanıcı'nın YANINDAN devam etsin, taşan kısım alt satıra kırılsın
   (tüm hitap bütün olarak alta DÜŞMESİN). */
.us-preview-tag-row { display: block; min-width: 0; line-height: 1.4; }
.us-preview-tag-row > .us-preview-tag,
.us-preview-tag-row > .us-preview-pronouns { display: inline; vertical-align: baseline; }
.us-preview-pronouns {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.35;
    word-break: break-word;
    overflow-wrap: anywhere;
    min-width: 0;
}
.us-preview-pronouns::before { content: "·"; margin: 0 4px; font-size: 26px; line-height: 0; position: relative; top: 3px; }
/* Ayarlar kaydırma çubuğu pencerenin EN SAĞINDA dursun: genişlik sınırı
   kaydırma kabından (max-width: 740px) içerik panellerine taşındı — içerik
   konumu/genişliği değişmez (740 − 2×40 padding = 660px). */
.settings-main-scroll { max-width: none; }
.settings-main-scroll > .settings-tab { max-width: 660px; }
/* Tam ekran sunucu ayarlarında içerik 740px'e kapaklı (sola hizalı; kaydırma barı en sağda) — aşırı geniş durmasın */
#server-settings-modal.server-settings-expanded .settings-main-scroll > .settings-tab { max-width: 740px; }
.standing-only-mode .settings-main-scroll > .settings-tab { max-width: none; }

/* Önizleme kolonu kaydırmada yerinde sabit kalır (sticky; scroll kabı .settings-main-scroll) */
.us-profile-preview, .us-sp-preview { position: sticky; top: 10px; align-self: flex-start; }
/* Önizleme kartının altındaki isim plakası */
.us-preview-nameplate-wrap { margin-top: 18px; }

/* ═══ Ana Profil ayar paneli — görsel iyileştirme (yalnızca #us-ptab-main) ═══ */
#us-ptab-main .us-pf-card { padding: 26px 26px 22px; }
#us-ptab-main .input-group { margin-bottom: 24px; }

/* Alan ipucu metni */
#us-ptab-main .us-field-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin: 8px 0 0;
    line-height: 1.45;
}

/* AVATAR bölümü: daha ferah + alt ayraç ile gruplama */
#us-ptab-main .us-pf-avatar-group {
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
#us-ptab-main .avatar-upload-area { gap: 20px; padding: 4px 0 0; }
/* Avatar seçenekleri yan yana: Avatarını Değiştir / Avatarı Kaldır (veya tek başına Avatar Ekle) */
#us-ptab-main .avatar-upload-actions { flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; }
#us-ptab-main .avatar-upload-preview {
    box-shadow: 0 0 0 3px rgb(var(--overlay-rgb) / 0.06), 0 6px 18px rgba(0, 0, 0, 0.4);
}

/* HAKKINDA alt satırı: ipucu + sayaç yan yana */
#us-ptab-main .us-about-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
}
#us-ptab-main .us-about-footer .us-field-hint { margin: 0; }
#us-ptab-main .us-about-footer .us-about-counter { margin-top: 0; }

/* AVATAR RENGİ: zengin renk seçici tetikleyici */
#us-ptab-main .us-color-trigger-row { display: flex; align-items: center; gap: 12px; padding-top: 2px; }
#us-ptab-main .us-color-trigger {
    width: 46px; height: 46px;
    border-radius: 12px;
    border: 2px solid rgb(var(--overlay-rgb) / 0.18);
    cursor: pointer;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
#us-ptab-main .us-color-trigger:hover {
    transform: scale(1.06);
    border-color: var(--accent);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
#us-ptab-main .us-color-trigger-hex {
    font-family: 'Consolas', monospace;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* Kaydet alanı: üstte ayraç */
#us-ptab-main .settings-card-actions {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.us-about-counter {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    text-align: right;
}

.us-appearance-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

#us-about {
    width: 100%;
    padding: 12px 42px 12px 14px; /* sağda emoji butonu için boşluk */
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    resize: none; /* köşeden büyütme kaldırıldı */
    font-family: inherit;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROFİL AYARLARI — MODERN YENİDEN TASARIM (Ana Profil + Sunucu Profili)
   Yalnızca #us-profile sekmesini ve alt panellerini hedefler; diğer ayar
   sekmeleri (Hesabım, Görünüm, vb.) ETKİLENMEZ. Tüm ID/fonksiyon korunur.
   ═══════════════════════════════════════════════════════════════════════════ */
/* Başlık */
#us-profile .settings-tab-header h2 { font-size: 23px; font-weight: 800; letter-spacing: -0.3px; }
#us-profile .settings-tab-header p { color: var(--text-muted); margin-top: 3px; }

/* Alt sekmeler → modern segment (pill) kontrol */
/* Alt sekmeler — referanstaki gibi ALT-ÇİZGİ stili (tam genişlik) */
#us-profile .us-profile-tabs {
    display: flex;
    align-self: stretch;
    gap: 8px;
    padding: 0;
    margin-bottom: 22px;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
}
#us-profile .us-ptab {
    margin: 0 0 -1px 0;
    padding: 10px 16px;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s, border-color 0.15s;
}
#us-profile .us-ptab:hover { color: var(--text-primary); background: none; }
#us-profile .us-ptab.active {
    color: var(--text-primary);
    background: none;
    border-bottom-color: var(--accent);
    box-shadow: none;
}

/* Kartlar — yumuşak üst gradyan + ince kenarlık + iç parıltı + derinlik */
#us-ptab-main .settings-card,
#us-ptab-server .settings-card {
    padding: 26px 26px 24px;
    background:
        linear-gradient(180deg, rgb(var(--overlay-rgb) / 0.035), rgb(var(--overlay-rgb) / 0) 120px),
        var(--bg-surface);
    border: 1px solid rgb(var(--overlay-rgb) / 0.07);
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgb(var(--overlay-rgb) / 0.05), 0 12px 32px rgba(0, 0, 0, 0.24);
}

/* Etiketler / bölüm başlıkları */
#us-ptab-main .input-group label,
#us-ptab-server .input-group label,
#us-ptab-main .settings-section-title,
#us-ptab-server .settings-section-title {
    font-size: 11px; font-weight: 700; letter-spacing: 0.7px;
    text-transform: uppercase; color: var(--text-secondary);
    margin-bottom: 9px;
}

/* Inputlar / textarea — daha yuvarlak, accent odak parıltısı */
#us-ptab-main .input-group input,
#us-ptab-main #us-about,
#us-ptab-server .input-group input {
    background: rgb(0 0 0 / calc(0.22 * var(--shade-k)));
    border: 1px solid rgb(var(--overlay-rgb) / 0.08);
    border-radius: 11px;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
#us-ptab-main .input-group input:focus,
#us-ptab-main #us-about:focus,
#us-ptab-server .input-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
    background: rgb(0 0 0 / calc(0.3 * var(--shade-k)));
}
#us-ptab-main .input-group input::placeholder,
#us-ptab-main #us-about::placeholder,
#us-ptab-server .input-group input::placeholder { color: var(--text-muted); }

/* Avatar yükleme önizlemesi — biraz büyük, yumuşak halka */
#us-ptab-main .avatar-upload-preview {
    width: 84px; height: 84px;
    box-shadow: 0 0 0 4px rgb(var(--overlay-rgb) / 0.05), 0 8px 22px rgba(0, 0, 0, 0.45);
}
/* Renk tetikleyici — biraz büyük, modern */
#us-ptab-main .us-color-trigger { width: 50px; height: 50px; border-radius: 14px; }

/* Önizleme kolonu başlıkları */
.us-profile-preview > .settings-section-title,
.us-sp-preview > .settings-section-title,
.us-preview-nameplate-wrap .settings-section-title {
    font-size: 11px; font-weight: 700; letter-spacing: 0.7px;
    text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px;
}

/* Önizleme kartı — premium gölge + banner gloss */
.us-preview-card {
    border-radius: 16px;
    border: 1px solid rgb(var(--overlay-rgb) / 0.08);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.42);
}
.us-preview-banner { position: relative; }
.us-preview-banner::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 45%, rgba(0, 0, 0, 0.30));
    pointer-events: none;
}

/* İsim plakası kartı — modern yüzey */
.us-sp-nameplate {
    background: linear-gradient(180deg, rgb(var(--overlay-rgb) / 0.035), rgb(var(--overlay-rgb) / 0)), var(--bg-surface);
    border: 1px solid rgb(var(--overlay-rgb) / 0.07);
    border-radius: 12px;
}

/* Sunucu seçici dropdown — modern + accent odak */
#us-ptab-server .us-sp-dd-trigger {
    border-radius: 11px;
    background: rgb(0 0 0 / calc(0.22 * var(--shade-k)));
    border: 1px solid rgb(var(--overlay-rgb) / 0.08);
}
#us-ptab-server .us-sp-dd[aria-expanded="true"] .us-sp-dd-trigger {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
    border-radius: 11px; /* açıkken de tam yuvarlak (panel ayrı/yüzer) */
}
#us-ptab-server .us-server-profile-desc { color: var(--text-muted); }

/* "Bir Sunucu Seç" dropdown — KOMPAKT, cilalı görünüm (referans tarzı) */
#us-ptab-server .us-sp-dd-trigger { min-height: 40px; padding: 6px 12px; gap: 9px; font-size: 13.5px; }
#us-ptab-server .us-sp-dd-trigger:hover { border-color: rgb(var(--overlay-rgb) / 0.2); background: rgb(0 0 0 / calc(0.3 * var(--shade-k))); }
/* Yüzer, yuvarlak panel — tetikleyiciden ayrık; çok sunucuda kaydırma çubuğu çıkar */
#us-ptab-server .us-sp-dd-panel {
    top: calc(100% + 6px);
    border: 1px solid rgb(var(--overlay-rgb) / 0.1);
    border-radius: 10px;
    background: var(--bg-surface);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    padding: 5px;
    max-height: 264px;
    overflow-y: auto;
}
/* Yuvarlak, kompakt seçenek satırları */
#us-ptab-server .us-sp-dd-option {
    border-radius: 7px;
    padding: 6px 8px;
    margin: 1px 0;
    gap: 9px;
    font-size: 13.5px;
}
#us-ptab-server .us-sp-dd-option:hover { background: rgb(var(--overlay-rgb) / 0.06); }
#us-ptab-server .us-sp-dd-option.selected { background: var(--accent-soft); color: var(--text-primary); }
#us-ptab-server .us-sp-dd-option:last-child { border-radius: 7px; }
/* Sunucu ikonları kompakt & yuvarlak */
#us-ptab-server .us-sp-dd-icon,
#us-ptab-server .us-sp-dd-option .us-sp-dd-icon { width: 24px; height: 24px; border-radius: 7px; font-size: 11px; }
#us-ptab-server .us-sp-dd-icon img { border-radius: 7px; }
/* Kaydırma çubuğu yuvarlak köşelere TAŞMASIN: track üstte/altta köşe yarıçapı (10px) kadar içeri
   alınır → çubuk en üstteyken/en alttayken köşe kıvrımına girmez; thumb padding-box ile sağ kenardan
   ayrılır → sağ yuvarlak köşeden taşmaz. (Bkz. .delete-preview aynı desen.) */
#us-ptab-server .us-sp-dd-panel { scrollbar-width: thin; scrollbar-color: rgb(var(--overlay-rgb) / 0.18) transparent; }
#us-ptab-server .us-sp-dd-panel::-webkit-scrollbar { width: 10px; }
#us-ptab-server .us-sp-dd-panel::-webkit-scrollbar-track { background: transparent; margin: 10px 0; }
#us-ptab-server .us-sp-dd-panel::-webkit-scrollbar-thumb {
    background: rgb(var(--overlay-rgb) / 0.18); border-radius: 999px;
    border: 3px solid transparent; background-clip: padding-box;
}
#us-ptab-server .us-sp-dd-panel::-webkit-scrollbar-thumb:hover {
    background: rgb(var(--overlay-rgb) / 0.3); background-clip: padding-box;
}

/* ── Discord-esinli DÜZ LİSTE görünümü (Ana Profil formu) ──
   Kart arka planı yok; her bölüm tam genişlik ince ayraçla ayrılır,
   başlıklar Title Case + parlak + orta-kalın. */
#us-ptab-main .us-pf-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 2px 0 0;
}
#us-ptab-main .us-pf-card .input-group {
    margin: 0;
    padding: 20px 0;
    border-top: 1px solid rgb(var(--overlay-rgb) / 0.07);
    border-bottom: none;
}
#us-ptab-main .us-pf-card .input-group:first-child { padding-top: 0; border-top: none; }
#us-ptab-main .us-pf-card .input-group:last-child { padding-bottom: 4px; }
/* Title Case, parlak, orta-kalın başlıklar (referanstaki gibi) */
#us-ptab-main .us-pf-card .input-group label {
    font-size: 15px; font-weight: 600; letter-spacing: 0;
    text-transform: none; color: var(--text-primary);
    margin-bottom: 10px;
}
/* Kısa ipuçları — kontrolün altında, sade */
#us-ptab-main .us-field-hint { font-size: 12.5px; color: var(--text-muted); margin-top: 9px; }
#us-ptab-main .us-about-footer { justify-content: space-between; align-items: center; gap: 12px; margin-top: 9px; }
#us-ptab-main .us-about-footer .us-field-hint { margin: 0; }
/* Avatar ekle/değiştir (birincil) butonu — referanstaki gibi accent dolu */
#us-ptab-main #us-avatar-upload-btn {
    background: var(--accent-grad);
    border: none;
    color: #fff;
    font-weight: 600;
    transition: filter 0.15s;
}
#us-ptab-main #us-avatar-upload-btn:hover { filter: brightness(1.08); }
/* Sunucu Profili alan başlıkları da Title Case + parlak (tipografik tutarlılık) */
#us-ptab-server .us-sp-field-group label,
#us-ptab-server .us-sp-server-card .settings-section-title {
    font-size: 15px; font-weight: 600; letter-spacing: 0;
    text-transform: none; color: var(--text-primary);
    margin-bottom: 10px;
}
/* Sunucu Profili formu da Ana Profil gibi DÜZ LİSTE: kart arka planı yok,
   bölümler tam genişlik ince ayraçlarla ayrılır. */
#us-ptab-server .us-sp-form { gap: 0; }
#us-ptab-server .us-sp-server-card,
#us-ptab-server .us-sp-fields-card {
    background: transparent; border: none; box-shadow: none;
    padding: 0; margin: 0;
}
/* Sunucu seçici TAM GENİŞLİK üstte + altında ayraç çizgisi (referans tarzı) */
#us-ptab-server > .us-sp-server-card {
    padding: 0 0 20px;
    margin: 0 0 20px;
    border-bottom: 1px solid var(--border);
}
#us-ptab-server > .us-sp-server-card .settings-section-title { margin-bottom: 10px; }
#us-ptab-server .us-sp-fields-card { border-top: none; padding-top: 0; }
/* Seçili sunucu: sağda onay işareti (✓) (referans tarzı) */
.us-sp-dd-option.selected { color: var(--text-primary); }
.us-sp-dd-option.selected::after {
    content: '✓'; margin-left: auto; color: var(--accent);
    font-weight: 700; font-size: 14px; flex-shrink: 0;
}
#us-ptab-server .us-sp-field-group { margin: 0; padding: 0; }
#us-ptab-server .us-sp-field-group + .us-sp-field-group {
    margin-top: 22px; padding-top: 22px;
    border-top: 1px solid rgb(var(--overlay-rgb) / 0.07);
}
#us-ptab-server .us-sp-field-hint { font-size: 12.5px; color: var(--text-muted); margin-top: 9px; }
/* ═══════════════ PROFİL DÜZ LİSTE SONU ═══════════════ */
/* HAKKINDA: emoji butonu textarea'nın içinde sağ üstte */
.us-about-input-wrap { position: relative; }
.us-about-emoji-btn {
    position: absolute; top: 8px; right: 8px;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: none; border-radius: 6px;
    color: var(--text-muted); cursor: pointer;
    transition: color 0.15s, background 0.15s;
}
.us-about-emoji-btn:hover { background: var(--bg-hover); }
/* Sohbet barındaki #emoji-btn gibi animasyonlu yüz: boşta soluk gri 😊, hover/açıkken renkli/canlı */
.us-about-emoji-btn.emoji-btn-default .emoji-btn-face { opacity: 0.55; filter: grayscale(1) saturate(0.15) brightness(0.85); transform: scale(1) rotate(0deg); }
.us-about-emoji-btn.emoji-btn-has-random:not(.emoji-btn-hovered) .emoji-btn-face { opacity: 0.55; filter: grayscale(1) saturate(0.2) brightness(0.85); transform: scale(1) rotate(0deg); }
.us-about-emoji-btn.emoji-btn-has-random.emoji-btn-hovered .emoji-btn-face { opacity: 1; filter: none; transform: scale(1.1) rotate(0deg); }
.us-about-emoji-btn.picker-open .emoji-btn-face { opacity: 1 !important; filter: none !important; transform: scale(1.08) rotate(5deg); }
.us-about-emoji-btn.emoji-btn-swap .emoji-btn-face { opacity: 0; filter: grayscale(1) saturate(0.1) brightness(0.8); transform: scale(0.55) rotate(12deg); transition: opacity 40ms ease-in, transform 40ms ease-in, filter 40ms ease-in; }
.us-about-emoji-btn:active .emoji-btn-face { transform: scale(0.96); }
/* Uzun "Hakkında" metni profil kartlarını büyütmesin — sabit tavan + içte kaydırma.
   white-space/word-break: satır sonları korunur ve metin alt alta sarar (yoksa "Profili
   Görüntüle" popup'ında satırlar tek satıra/yan yana iniyor ve dikey taşma olmadığı için
   kaydırma barı çıkmıyordu — kullanıcı kartındaki .upp-about-text/.pc-about-text ile aynı). */
.pc-about-text, .upp-about-text, #pp-about, .us-preview-about {
    max-height: 132px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}
/* Kullanıcı KARTI tarzı yüzeylerde hakkında kesmesi TAM satır sınırında olsun: 132px sabiti,
   karttaki 13px × 1.4 satır kutusunun (18.2px) katı olmadığından bir alt satırın tepesi (~5px)
   dipte görünüyordu. 7 tam satır (em → kendi font-size'ına göre çözülür; line-height 1.4 ile
   birebir hizalı). "Profili Görüntüle" popup'ı (#pp-about) bilinçli olarak DEĞİŞMEDİ. */
.pc-about-text, .upp-about-text { max-height: calc(7 * 1.4em); }
/* Ana Profil — kaydedilmemiş değişiklik çubuğu (Sunucu Profili'ne benzer ama accent kenarlık + ikonlu) */
.us-mp-dirty-bar {
    /* Ayarlar içeriğinin (740px kolon) İÇİNDE yatayda ORTALANIR; sticky ile alta
       sabitlenir, sayfa kaydırılınca aynı konumda (altta) kalır. */
    position: sticky;
    /* 5100: dikey ANCHOR tek degisken — cubugun bulundugu kaydirma kabina gore
       ayarlanir; gorsel olculer TUM yuzeylerde AYNI. */
    --dirty-bar-bottom: -14px;
    bottom: var(--dirty-bar-bottom);
    flex-shrink: 0;              /* flex kolon kabinda ezilmesin */
    z-index: 20;
    width: fit-content;
    max-width: 100%;
    margin: 12px auto 0;
    display: flex; align-items: center; justify-content: center;
    gap: 12px; flex-wrap: nowrap;
    padding: 10px 12px 10px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 11px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
    animation: usMpDirtyIn 0.18s ease;
}
/* Ortak bilesen chs yuzeylerinde `chs-footer-hidden` ile gizlenir. */
.us-mp-dirty-bar.chs-footer-hidden { display: none; }
/* Kanal/kategori ayar icerigi: cubuk gorunur alanin altina tasmasin. */
#chs-content .us-mp-dirty-bar { --dirty-bar-bottom: 12px; }
/* 5100 paritesi — YALNIZ Kanal/Kategori Ayarlari icerigi (`#chs-content`):
   cubuk panelin ALTINA yaslanir (Sunucu Profili'ndeki cozumun aynisi).
   `:has()` ile kapsamlidir -> Kategoriyi Sil, diger sekmeler ve `chs-footer`
   kullanan yuzeyler ETKILENMEZ; ORTAK `.us-mp-dirty-bar` bileseni DEGISMEZ. */
.chs-main-scroll:has(> #chs-content > .us-mp-dirty-bar) { display: flex; flex-direction: column; }
#chs-content:has(> .us-mp-dirty-bar) { display: flex; flex-direction: column; flex: 1 1 auto; }
#chs-content > .us-mp-dirty-bar { margin-top: auto; }
/* YALNIZ ses kanali Genel Gorunum: uc ek bolum (bit hizi / goruntu kalitesi /
   kullanici limiti) icerigi uzattigi icin sticky cubuk son ipucuna YAPISIYOR.
   Icerikten ayrilir ve son bolum TAM gorunur kalir. */
#chs-content:has(#vc-bitrate-input) > .us-mp-dirty-bar { --dirty-bar-bottom: -14px; }
#chs-content:has(#vc-bitrate-input) > .chs-section { padding-bottom: 78px; }
/* Batch C (5100 paritesi): Sunucu Ayarları > Roller ve Güvenlik Eylemleri — çubuk panelin ALTINA yaslanır
   (Sunucu Profili / Ana Profil / Kanal Ayarları'ndaki desen: sekme paneli flex kolon,
   çubuk `margin-top:auto`). `:not(.hidden)` ZORUNLU: id seçicisi `.hidden` kuralını ezerdi. */
.settings-main-scroll > #ss-roles.active,
.settings-main-scroll > #ss-security.active { min-height: 100%; display: flex; flex-direction: column; }
#ss-roles > #roles-overview:not(.hidden),
#ss-roles > #role-editor:not(.hidden) { flex: 1 1 auto; display: flex; flex-direction: column; }
#role-editor > #re-savebar,
#ss-security > #ss-security-dirty-bar { margin-top: auto; }
@keyframes usMpDirtyIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
/* Çıkış engellenince: çubuğu salla + dikkat çekici kırmızı vurgu (toast yerine burada) */
.us-mp-dirty-bar.us-mp-shake {
    animation: usMpShake 0.5s cubic-bezier(.36,.07,.19,.97);
    border-left-color: var(--dnd, #EF4444);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(239, 68, 68, 0.5);
}
.us-mp-dirty-bar.us-mp-shake .us-mp-dirty-msg { color: var(--dnd, #EF4444); }
@keyframes usMpShake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-7px); }
    30% { transform: translateX(6px); }
    45% { transform: translateX(-5px); }
    60% { transform: translateX(4px); }
    75% { transform: translateX(-2px); }
}
/* 5100 olculeri (Karar #140): mesaj 13.5px, ikon 16px, gap 8px, butonlar
   13px + 9/18 & 8/17 padding + nowrap. Bu bilesen TUM kaydedilmemis-
   degisiklik cubuklarinda kullanilir (Ana Profil, Kullanici Sunucu Profili,
   Sunucu Profili, Roller, Guvenlik Eylemleri, Kanal/Kategori Genel Gorunum,
   Kimler erisebilir?, Izinler) -- sayfa basina kopya CSS YAZILMAZ. */
.us-mp-dirty-msg {
    display: flex; align-items: center; gap: 8px;
    font-size: 13.5px; font-weight: 600; color: var(--text-primary);
    flex: 1; min-width: 0;
}
/* NOT: bugun HICBIR cubuk mesaj icine SVG basmaz (iki agacta da) -- kural
   ileride ikon eklenirse dogru olcuyu versin diye 5100 degeriyle tutulur. */
.us-mp-dirty-msg svg { color: var(--accent); flex-shrink: 0; width: 16px; height: 16px; }
.us-mp-dirty-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
/* Çubuk içindeki butonlar: ikisi BİREBİR aynı kutu → aynı yükseklik & hiza
   (genel btn'leri etkilemeden, scope'lu). primary'nin width:100% + margin-top
   + kenarlıksız kutusu, secondary'nin kenarlıklı kutusuyla eşitlenir. */
.us-mp-dirty-bar .btn-secondary, .us-mp-dirty-bar .btn-primary {
    width: auto;
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
}
/* Aynı yükseklik: secondary'nin 1px kenarlığı, primary'de +1px padding ile telafi
   edilir. (Primary'ye şeffaf kenarlık eklemek gradyan arka planı kenarda taşırıp
   "bozuk renk" gösteriyordu — bu yüzden primary KENARLIKSIZ bırakıldı.) */
.us-mp-dirty-bar .btn-primary { padding: 9px 18px; border: none; }
.us-mp-dirty-bar .btn-secondary { padding: 8px 17px; }
/* Profil sekmesi içeriği scroll alanını DOLDURUR → dirty bar HER İKİ alt sekmede de
   AYNI konumda (altta) durur. (Sunucu içeriği kısa olsa bile çubuk aşağı itilir.) */
#us-profile.settings-tab.active { display: flex; flex-direction: column; min-height: 100%; }
#us-ptab-main, #us-ptab-server { flex: 1 1 auto; display: flex; flex-direction: column; }
#us-ptab-main > .us-profile-layout { flex: 1 0 auto; align-items: flex-start; }
#us-ptab-server > .us-sp-layout { flex: 1 0 auto; }

@media (max-width: 800px) {
    .settings-sidebar {
        width: 180px;
        min-width: 180px;
    }
    .us-profile-layout {
        flex-direction: column;
    }
    .us-profile-preview {
        width: 100%;
        position: static; /* alt alta düzende sticky anlamsız */
    }
}

/* ═══════════════ PERMISSION TOGGLES ═══════════════ */
.perm-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.perm-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
    flex-wrap: wrap;
}
.perm-toggle:hover {
    background: var(--bg-hover);
}
/* Yönetici toggle'ı sahip-dışına kilitli (Karar #35) — soluk + tıklanamaz */
.perm-toggle.perm-owner-only {
    opacity: 0.45;
    pointer-events: none;
    cursor: default;
}
.perm-toggle input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 40px;
    height: 22px;
    background: var(--bg-tertiary);
    border-radius: 11px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
    border: 1px solid var(--border);
}
.perm-toggle input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}
.perm-toggle input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}
.perm-toggle input[type="checkbox"]:checked::after {
    transform: translateX(18px);
    background: white;
}
.perm-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 120px;
}
.perm-desc {
    font-size: 12px;
    color: var(--text-muted);
    flex: 1;
}
.role-perms-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
.role-perm-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--bg-hover);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
/* ═══════════════ NEW FEATURES ═══════════════ */

/* ── Composer (contenteditable div) ── */
#message-input {
    flex: 1;
    min-width: 0;
    min-height: 24px;
    max-height: min(240px, 35vh);
    overflow-y: auto;
    line-height: 1.5;
    padding: 9px 0;
    background: transparent;
    color: var(--text-primary);
    font-size: 16px;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Segoe UI', system-ui, sans-serif;
    outline: none;
    cursor: text;
    word-break: break-word;
    white-space: pre-wrap;
    position: relative; /* anchor for ::before placeholder */
}
/* Placeholder shown via ::before when composer is empty */
#message-input.is-empty::before {
    content: attr(data-placeholder);
    position: absolute;
    top: 9px;
    left: 0;
    color: var(--text-muted);
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-size: 16px;
    line-height: 1.5;
}
/* Blurple selection colour for main chat composer — matches profile mini composer */
#message-input::selection,
#message-input *::selection {
    background: rgba(88, 101, 242, 0.75);
    color: #fff;
}
/* Disabled state */
#message-input.composer-disabled {
    cursor: default;          /* Don't show text/not-allowed cursor in request state */
    opacity: 0.6;
    -webkit-user-drag: none;  /* Prevent Chromium drag-source behaviour on contenteditable=false */
    user-select: none;        /* No text selection → no drag initiation */
    overflow-y: hidden;       /* Hide scrollbar track (the thin strip left of GIF button) */
}
/* Vertically centre the placeholder text within the disabled composer div.
   The base ::before rule uses position:absolute + top:9px (matches padding);
   override with transform-based centering so it aligns with the action buttons. */
#message-input.composer-disabled.is-empty::before {
    top: 50%;
    transform: translateY(-50%);
}
/* Suppress the focus-glow and cursor on the wrapper when composer is locked */
.input-wrapper.composer-locked {
    cursor: default;
}
.input-wrapper.composer-locked:focus-within {
    border-color: var(--border);
    box-shadow: none;
}

/* ── Character Counter ── */
.char-counter {
    font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
    padding: 2px 6px; border-radius: 4px; white-space: nowrap;
    align-self: flex-end; margin-bottom: 8px; flex-shrink: 0;
}
.char-counter.hidden { display: none; }
.char-warn { color: var(--tint-amber, #f0b232); }
.char-critical { color: #ed4245; }
.char-over { color: #ed4245; background: rgba(237,66,69,0.15); border-radius: 4px; }

/* ── File Upload Preview ── */
/* Bekleyen dosya rafı — alttaki composer pill'iyle (.input-wrapper) AYNI şekil dili:
   aynı köşe yuvarlaklığı (radius-md), aynı 1px tam çerçeve, aynı iç boşluk ritmi;
   pill'in üstünde küçük bir boşlukla ayrık, eşit genişlikte hizalı kart. (Renkler aynı.) */
.file-preview-area {
    padding: 10px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
}
.file-preview-items { display: flex; flex-wrap: wrap; gap: 8px; }
.file-preview-item {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-hover); border-radius: var(--radius-sm);
    padding: 8px 12px; position: relative;
    border: 1px solid var(--border);
    max-width: 280px;
}
.file-preview-item img {
    width: 60px; height: 60px; object-fit: cover;
    border-radius: 6px;
    cursor: pointer;                    /* tıklayınca lightbox'ta büyük görüntülenir */
    transition: opacity var(--transition);
}
.file-preview-item img:hover { opacity: 0.85; }
.file-preview-icon { font-size: 28px; }
.file-preview-info { display: flex; flex-direction: column; min-width: 0; }
.file-preview-name {
    font-size: 13px; font-weight: 500; color: var(--text-primary);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-preview-size { font-size: 11px; color: var(--text-muted); }
/* Kaldır (×) rozeti — çipin İÇİNE binmek yerine sağ-üst köşenin yarısı DIŞINDA durur
   (Discord tarzı): içerik/isim üstüne binmez; raf zemini renginde halka ile çipten ayrışır.
   Raf padding'i (10px) ve çip gap'i (8px) 7px'lik taşmaya yer bırakır — kırpılma olmaz. */
.file-preview-remove {
    position: absolute; top: -7px; right: -7px;
    width: 20px; height: 20px; padding: 0; border-radius: 50%;
    background: var(--dnd); color: white;
    font-size: 13px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
    border: 2px solid var(--bg-surface);
    box-shadow: 0 1px 4px rgba(0,0,0,0.35);
    transition: transform 0.12s ease;
    z-index: 1;
}
.file-preview-remove:hover { transform: scale(1.12); }

/* ── Chat area drag overlay ── */
.chat-area { position: relative; }
.drag-drop-overlay {
    position: absolute; inset: 0; z-index: 100;
    background: rgba(88, 101, 242, 0.95);
    display: none; align-items: center; justify-content: center;
    flex-direction: column; gap: 12px;
    /* Kabı (chat alanı / ses sohbet paneli) TAM kaplar: eski margin:12px her kenarda arkadaki
       sohbeti gösteren boşluk bırakıyordu. Köşe yarıçapı kaptan miras alınır (panelde yuvarlak,
       ana sohbette düz) → köşelerden taşma olmaz. Kesikli çerçeve ::before ile İÇE çizilir. */
    border-radius: inherit;
    margin: 0;
    pointer-events: none;
}
.drag-drop-overlay::before {
    content: '';
    position: absolute; inset: 10px;
    border: 3px dashed rgba(255,255,255,0.4);
    border-radius: 12px;
    pointer-events: none;
}
.chat-area.drag-over .drag-drop-overlay { display: flex; }
/* Overlay, sesli lobby'nin sağ sohbet paneline TAŞINMIŞKEN (relocation) panel drag-over'ında
   gösterilir — abspos inset:0, containing block'u position:relative olan .voice-chat-sidebar
   olduğundan tüm paneli (header dahil) kaplar; z-index:100 resize handle'ın (5) üstündedir. */
.voice-chat-sidebar.drag-over .drag-drop-overlay { display: flex; }
.drag-drop-overlay-icons {
    display: flex; gap: 8px; margin-bottom: 4px;
}
.drag-drop-overlay-icons svg {
    width: 48px; height: 48px; fill: rgba(255,255,255,0.7);
    transform: rotate(-8deg);
}
.drag-drop-overlay-icons svg:nth-child(2) {
    transform: rotate(4deg) translateY(-6px);
}
.drag-drop-overlay-icons svg:nth-child(3) {
    transform: rotate(12deg);
}
.drag-drop-overlay-title {
    font-size: 22px; font-weight: 700; color: #fff;
}
.drag-drop-overlay-desc {
    font-size: 13px; color: rgba(255,255,255,0.7); text-align: center; line-height: 1.4;
}

/* ── Message Attachments ── */
.msg-attachment { margin-top: 6px; }
.msg-attachment-image img {
    max-width: min(400px, 100%); max-height: 300px;
    /* height:auto — width/height ATTRIBUTE'lu görsellerde (attachments.width/height) tarayıcının
       attr'dan türettiği aspect-ratio, görsel İNMEDEN doğru yüksekliği ayırır; max sınırlar oranı
       koruyarak kırpar → yükleme öncesi/sonrası boyut birebir aynı, boşluk/kayma olmaz.
       Attribute'suz (eski/ölçülemeyen) görselde height zaten auto'ydu → davranış değişmez. */
    height: auto;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: opacity var(--transition);
}
.msg-attachment-image img:hover { opacity: 0.9; }
/* Discord benzeri SABİT boyutlu video kartı: aspect-ratio kutusu yüklemeden ÖNCE yer ayırır → video
   metadata gelince boyut DEĞİŞMEZ (layout kaymaz, jump kaymasının kök nedeni giderilir). object-fit:contain
   → farklı oranlar siyah zeminde ortalanır (kırpma yok), daima tutarlı oynatıcı çerçevesi. */
.msg-attachment-video {
    position: relative; display: inline-block;
    width: 550px; max-width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius-md);
    overflow: visible;   /* tooltip'ler karttan taşıp tam görünebilsin — yuvarlak köşeler video/bar'ın KENDİ radius'uyla korunur */
}
/* Oynatıcı UI metinleri (süre "0:00 / 1:27", progress tooltip'i, buton baloncukları) SEÇİLEMEZ —
   fareyle mesajların üzerinden sürüklenen seçim kopyalanınca panoya rastgele süre parçaları karışmasın.
   Kapsam yalnız oynatıcı wrapper'ı (sohbet + lightbox); mesaj metni/diğer ek türleri etkilenmez. */
.msg-attachment-video, .message-video-lightbox {
    -webkit-user-select: none;
    user-select: none;
}
/* Sohbet yüzeylerindeki GÖRSELLER tarayıcıca SÜRÜKLENEMEZ: Chromium görsel sürüklemesine gerçek
   'Files' verisi eklediğinden mesajdaki resme basılı tutup çekmek mavi yükleme overlay'ini açıyor
   (ve bırakınca görsel dosya olarak ekleniyordu) — _isFileDrag kapısı bunu ayırt edemez. Kapsam:
   mesaj listesi (ek/GIF/çıkartma/avatar), lightbox, composer dosya önizlemesi, emoji/GIF picker,
   pin + arama panelleri. Sunucu/kanal sıralama DnD'si satır elementleri üzerinden çalışır — bu
   kural onların kapsamı dışındadır, etkilenmez. */
#messages img, .image-lightbox img, #message-input-area img, #emoji-picker img, .pins-panel img {
    -webkit-user-drag: none;
}
.msg-attachment-video video {
    width: 100%; height: 100%;
    object-fit: contain; display: block;
    border-radius: var(--radius-md);   /* overflow:visible olduğundan köşeleri videonun kendisi yuvarlar */
}
.msg-attachment-video .message-video-controls { border-radius: 0 0 var(--radius-md) var(--radius-md); }
/* Hide native fullscreen & overflow menu (broken in pywebview) */
video::-webkit-media-controls-fullscreen-button { display: none !important; }
video::-webkit-media-controls-overflow-menu { display: none !important; }
.video-expand-btn {
    position: absolute; top: 8px; right: 8px;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.2);
    color: white; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.2s, background 0.15s;
    z-index: 5;
}
.msg-attachment-video:hover .video-expand-btn,
.video-expand-btn:focus-visible { opacity: 1; }
.video-expand-btn:hover { background: rgba(0,0,0,0.85); transform: scale(1.1); }
.video-expand-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* İndirme butonu — sağ üstte, hover/focus'ta görünür */
.message-video-download {
    position: absolute; top: 8px; right: 8px;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.2);
    color: #fff; cursor: pointer; text-decoration: none;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.2s, background 0.15s, transform 0.12s;
    z-index: 6;
}
.msg-attachment-video:hover .message-video-download,
.message-video-download:focus-visible { opacity: 1; }
.message-video-download:hover { background: rgba(0,0,0,0.85); transform: scale(1.1); }
.message-video-download:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* ── Action butonları (download/fullscreen/exit) için Discord-benzeri custom tooltip (native title YOK) ──
   Sadece bu video butonları için; uygulamanın diğer title/tooltip'lerini etkilemez. Baloncuk butonun
   ÜSTÜNDE ve butona ORTALI (Discord gibi); ok butonu işaret eder. Kart overflow:visible olduğundan ve
   video kartı (550px) geniş sohbette içerikten dar olduğundan ortalı tooltip sağ boşluğa taşar, kırpılmaz. */
.message-video-controls .message-video-action { position: relative; }   /* alt bardaki butonlar (download zaten absolute) */
.message-video-action[data-video-tooltip]::after {
    content: attr(data-video-tooltip);
    position: absolute; left: 50%; right: auto; bottom: calc(100% + 9px);
    transform: translateX(-50%) scale(0.92); transform-origin: bottom center;
    padding: 4px 9px; border-radius: 5px; white-space: nowrap;
    background: rgba(15,17,24,0.97); color: #fff; font-size: 12px; font-weight: 500; line-height: 1.4;
    border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 4px 14px rgba(0,0,0,0.45);
    opacity: 0; pointer-events: none; transition: opacity 0.12s ease, transform 0.12s ease; z-index: 10;
}
.message-video-action[data-video-tooltip]::before {
    content: ''; position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%);
    border: 5px solid transparent; border-top-color: rgba(15,17,24,0.97);
    opacity: 0; pointer-events: none; transition: opacity 0.12s ease; z-index: 10;
}
.message-video-action[data-video-tooltip]:hover::after,
.message-video-action[data-video-tooltip]:focus-visible::after { opacity: 1; transform: translateX(-50%) scale(1); transform-origin: bottom center; }
.message-video-action[data-video-tooltip]:hover::before,
.message-video-action[data-video-tooltip]:focus-visible::before { opacity: 1; }
/* Ortadaki büyük play — yalnızca duraklatılmışken görünür (oynarken .is-playing ile gizlenir) */
.message-video-center-play {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 52px; height: 52px; border-radius: 50%;
    background: rgba(0,0,0,0.5); border: 1.5px solid rgba(255,255,255,0.25); padding: 0;
    color: #fff; cursor: pointer; z-index: 4;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s ease, transform 0.12s ease, opacity 0.15s ease, border-color 0.15s ease;
}
.message-video-center-play svg { margin-left: 3px; }   /* üçgeni optik ortala */
.message-video-center-play:hover { background: rgba(0,0,0,0.72); transform: translate(-50%, -50%) scale(1.05); }
.message-video-center-play:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.msg-attachment-video.is-playing .message-video-center-play { opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(0.85); }
/* Alt custom kontrol barı — başlangıçta gizli; hover / oynarken / focus'ta görünür */
.message-video-controls {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
    display: flex; align-items: center; gap: 9px;
    padding: 20px 12px 9px;
    background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.32) 55%, transparent 100%);
    opacity: 0; transform: translateY(4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: none;
}
.msg-attachment-video:hover .message-video-controls,
.msg-attachment-video.is-playing .message-video-controls,
.msg-attachment-video:focus-within .message-video-controls {
    opacity: 1; transform: translateY(0); pointer-events: auto;
}
.message-video-controls button {
    flex: 0 0 auto; width: 28px; height: 28px; padding: 0;
    border: none; background: transparent; color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px; transition: background 0.12s, transform 0.1s;
}
.message-video-controls button:hover { background: rgba(255,255,255,0.16); }
.message-video-controls button:active { transform: scale(0.9); }
.message-video-controls button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.message-video-time {
    flex: 0 0 auto; font-size: 12px; font-variant-numeric: tabular-nums;
    color: #fff; opacity: 0.92; white-space: nowrap; user-select: none;
}
/* İlerleme çubuğu — ince, tıklanabilir; dolan kısım brand mor→mavi gradyan */
.message-video-progress {
    position: relative; flex: 1 1 auto; min-width: 40px; height: 14px;
    display: flex; align-items: center; cursor: pointer;
}
.message-video-progress::before {
    content: ''; display: block; width: 100%; height: 4px; border-radius: 999px;
    background: rgba(255,255,255,0.28);
}
.message-video-progress-fill {
    position: absolute; top: 50%; left: 0; transform: translateY(-50%);
    height: 4px; width: 0; border-radius: 999px; pointer-events: none;
    background: linear-gradient(90deg, var(--accent2, #8B5CF6), var(--accent, #06B6D4));
}
.message-video-progress:hover::before,
.message-video-progress:hover .message-video-progress-fill { height: 6px; }
.message-video-progress:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 999px; }
/* Hover timestamp baloncuğu — JS left'i (% hover) ve metni (saniye) ayarlar; boşken/duration yokken gizli */
.message-video-progress-tooltip {
    position: absolute; bottom: calc(100% + 8px); left: 0; transform: translateX(-50%);
    padding: 3px 7px; border-radius: 5px; white-space: nowrap;
    background: rgba(18,20,28,0.96); border: 1px solid rgba(255,255,255,0.12);
    color: #fff; font-size: 11px; line-height: 1.4; font-variant-numeric: tabular-nums;
    pointer-events: none; opacity: 0; transition: opacity 0.1s ease; z-index: 9;
}
/* Lightbox wrapper'ın line-height:0'ı tooltip'i squish ediyordu; küçük kartla AYNI boyut/görünüm için normalize */
.message-video-lightbox .message-video-progress-tooltip { font-size: 11px; line-height: 1.4; padding: 3px 7px; }
.message-video-progress:hover .message-video-progress-tooltip:not(:empty) { opacity: 1; }

/* Center play — Discord tarzı rafine: ince ring + hafif şeffaf koyu daire + yumuşak gölge.
   (Eski ağır 6px koyu dış halka KALDIRILDI; daha hafif/temiz/dengeli durur.) */
.message-video-center-play {
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 2px 10px rgba(0,0,0,0.35);
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.message-video-center-play svg { width: 22px; height: 22px; margin-left: 2px; }   /* üçgen orantılı + optik ortalı */
.message-video-center-play:hover {
    background: rgba(0,0,0,0.62);
    border-color: rgba(255,255,255,0.6);
    box-shadow: 0 3px 14px rgba(0,0,0,0.45);
}
/* Bitince (.is-ended) ortada kalıcı replay/play GÖSTERME — yalnız kısa pause feedback (_videoFeedback). */

/* Ses — hover'da çıkan küçük volume popover + slider (mute butonunun üstünde, flush → hover kopmaz) */
.message-video-volume-wrap { position: relative; display: flex; align-items: center; }
.message-video-volume-popover {
    position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%);
    width: 34px; height: 104px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(18,20,28,0.96); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 9px; box-shadow: 0 6px 20px rgba(0,0,0,0.5);
    opacity: 0; visibility: hidden; transition: opacity 0.14s ease, visibility 0.14s ease;
    z-index: 8;
}
/* Popover yalnızca fare volume alanındayken VEYA slider sürüklenirken (.is-volume-open) açık.
   :focus-within KULLANILMAZ → mute'a tıkladıktan sonra fare çıkınca açık kalmaz. */
.message-video-volume-wrap:hover .message-video-volume-popover,
.message-video-volume-wrap.is-volume-open .message-video-volume-popover { opacity: 1; visibility: visible; }
/* Dikey slider: yatay range'i -90° döndür (üst = maksimum). Tüm Chromium'da güvenli, thumb stili korunur. */
.message-video-volume-slider {
    -webkit-appearance: none; appearance: none;
    width: 82px; height: 5px; border-radius: 999px; cursor: pointer; outline: none;
    transform: rotate(-90deg);
    /* Dolan kısım (0 → --vol) cyan/mavi accent (açık cyan → proje accent'i); gerisi soluk track. --vol JS'te güncellenir. */
    background: linear-gradient(to right, #22d3ee, var(--accent, #06B6D4) calc(var(--vol, 1) * 100%), rgba(255,255,255,0.22) calc(var(--vol, 1) * 100%));
}
.message-video-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 13px; height: 13px; border-radius: 50%; background: #fff; cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.55), 0 0 0 2px rgba(34,211,238,0.32);   /* beyaz thumb + cyan halka (fill ile uyumlu) */
}
.message-video-volume-slider::-moz-range-thumb {
    width: 13px; height: 13px; border-radius: 50%; background: #fff; border: none; cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.55), 0 0 0 2px rgba(34,211,238,0.32);
}
/* hover/focus: cyan halka biraz belirginleşir (hafif parlama) */
.message-video-volume-slider:hover::-webkit-slider-thumb,
.message-video-volume-slider:focus-visible::-webkit-slider-thumb { box-shadow: 0 1px 4px rgba(0,0,0,0.55), 0 0 0 3px rgba(34,211,238,0.5); }
.message-video-volume-slider:hover::-moz-range-thumb,
.message-video-volume-slider:focus-visible::-moz-range-thumb { box-shadow: 0 1px 4px rgba(0,0,0,0.55), 0 0 0 3px rgba(34,211,238,0.5); }
.message-video-volume-slider::-moz-range-track { background: transparent; }
.message-video-volume-slider:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ── Video LIGHTBOX: sohbetteki AYNI custom player, GERÇEK tam ekran (dark backdrop image-lightbox'tan) ── */
.message-video-lightbox {
    position: relative;
    width: 100vw; height: 100vh; max-width: none; max-height: none;
    overflow: hidden; line-height: 0;
    background: #000;
    transform: scale(0.985); transition: transform 0.25s ease;
}
.image-lightbox.open .message-video-lightbox { transform: scale(1); }
.message-video-lightbox .message-video-player {
    display: block; width: 100%; height: 100%; object-fit: contain;   /* ekranı doldur, kırpma yok */
}

/* Auto-hide: oynarken fare hareketsiz/dışarıdaysa alt bar gizlenir (JS .is-controls-hidden ekler).
   :hover/.is-playing göster kurallarını ezmek için !important — net ve hedefli override. */
.is-controls-hidden .message-video-controls {
    opacity: 0 !important; pointer-events: none !important; transform: translateY(6px) !important;
}
/* Progress sürüklenirken (.is-scrubbing) kontroller GİZLENMESİN + çubuk biraz belirginleşsin */
.is-scrubbing .message-video-controls {
    opacity: 1 !important; pointer-events: auto !important; transform: translateY(0) !important;
}
.is-scrubbing .message-video-progress::before,
.is-scrubbing .message-video-progress-fill { height: 6px; }
/* İlk oynatmadan SONRA (.has-played) ortada kalıcı büyük play/replay GÖSTERME (bitmiş dahil) — yerine kısa feedback ikonu */
.has-played .message-video-center-play {
    opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(0.85);
}
/* Kısa süreli play/pause feedback ikonu (tıklayınca ortada belirip soldur) */
.message-video-feedback {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.6);
    width: 64px; height: 64px; border-radius: 50%;
    background: rgba(0,0,0,0.5); color: #fff; z-index: 5;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
}
.message-video-feedback.show { animation: videoFeedbackPop 0.65s ease forwards; }
@keyframes videoFeedbackPop {
    0%   { opacity: 0;    transform: translate(-50%, -50%) scale(0.6); }
    22%  { opacity: 0.95; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0;    transform: translate(-50%, -50%) scale(1.28); }
}
.message-video-lightbox .message-video-controls { padding: 28px 16px 13px; gap: 11px; }
.message-video-lightbox .message-video-time { font-size: 13px; }
/* Lightbox kontrol görünürlüğü (chat kurallarının lightbox karşılığı — additive) */
.message-video-lightbox:hover .message-video-controls,
.message-video-lightbox.is-playing .message-video-controls,
.message-video-lightbox:focus-within .message-video-controls { opacity: 1; transform: translateY(0); pointer-events: auto; }
.message-video-lightbox.is-playing .message-video-center-play { opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(0.85); }
.message-video-lightbox:hover .message-video-download,
.message-video-lightbox .message-video-download:focus-visible { opacity: 1; }

/* ═══════════════ IMAGE LIGHTBOX ═══════════════ */
.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.image-lightbox.open { opacity: 1; }
.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}
.lightbox-img {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.6);
    object-fit: contain;
    transform: scale(0.92);
    transition: transform 0.25s ease;
}
.image-lightbox.open .lightbox-img,
.image-lightbox.open .lightbox-video {
    transform: scale(1);
}
.lightbox-video {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.6);
    object-fit: contain;
    transform: scale(0.92);
    transition: transform 0.25s ease;
}
.lightbox-close {
    position: absolute;
    top: 16px; right: 16px;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
    z-index: 1;
}
.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}
.msg-attachment-file a.file-download {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 10px 14px;
    color: var(--text-primary); text-decoration: none;
    transition: background var(--transition);
    max-width: min(350px, 100%);
}
.msg-attachment-file a.file-download:hover { background: var(--bg-hover); text-decoration: none; }
.file-info { display: flex; flex-direction: column; }
.file-name { font-size: 14px; font-weight: 500; color: var(--text-link); }
.file-size { font-size: 11px; color: var(--text-muted); }

/* ── Invite Embed ── */
.invite-embed {
    margin-top: 8px;
    background: var(--bg-secondary, #232428);
    border-radius: 12px;
    max-width: min(340px, 100%);
    overflow: hidden;
    border: 1px solid var(--border, #1e1f22);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.invite-embed.loading { padding: 16px; min-height: 150px; box-sizing: border-box; }
.invite-embed-loading { color: var(--text-secondary, #b5bac1); font-size: 13px; }
/* Sade koyu banner (üst şerit); ikon banner'a taşar — dikey yerleşim (Discord tarzı) */
.invite-embed-banner {
    height: 76px;
    background: var(--invite-banner, linear-gradient(180deg, var(--ui-raised), var(--ui-deep)));
    position: relative;
}
.invite-embed-banner::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.22));
}
.invite-embed-body { padding: 0 16px 16px; }
.invite-embed-inner {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 0 16px 14px;
}
.invite-embed-icon-wrap { display: inline-block; margin-top: -36px; margin-bottom: 10px; position: relative; }
.invite-embed-icon-img,
.invite-embed-icon-letter {
    width: 72px; height: 72px; border-radius: 20px;
    border: 5px solid var(--bg-secondary, #232428);
    box-sizing: border-box; object-fit: cover; display: block;
}
.invite-embed-icon-letter {
    display: flex; align-items: center; justify-content: center;
    font-size: 27px; font-weight: 700; color: var(--ui-text-strong);
    background: var(--bg-surface, #2b2d31);
    overflow: hidden; line-height: 1; white-space: nowrap;   /* uzun kısaltma kutuyu taşırmasın */
}
.invite-embed-info { flex: 1; min-width: 0; padding-top: 12px; }
.invite-embed-name {
    font-size: 18px; font-weight: 700; color: var(--text-primary, #fff);
    line-height: 1.25;
    word-break: break-word; overflow-wrap: break-word;   /* tek satıra kırpma yok — uzun sunucu adı tam görünür (sarar) */
}
.invite-embed-stats {
    display: flex; align-items: center; gap: 14px; margin-top: 6px;
}
.invite-embed-est {
    font-size: 12px; color: var(--text-muted, #80848e); margin-top: 4px;
}
.invite-embed-desc {
    font-size: 13px; color: var(--text-secondary, #b5bac1); line-height: 1.5; margin-top: 10px;
    white-space: normal; word-break: break-word; position: relative;  /* Enter satırları birleşir → metin yan yana akar (alt alta DEĞİL) */
    overflow: hidden; transition: max-height 0.3s ease;  /* aç/kapa geçiş animasyonu */
}
.invite-embed-desc.clamped { max-height: 4.5em; cursor: pointer; }  /* uzunsa ~3 satır göster */
.invite-embed-desc.clamped::after {  /* "..." yerine alta fade */
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1.8em;
    background: linear-gradient(transparent, var(--bg-secondary, #232428));
    pointer-events: none;
}
.invite-embed-desc-toggle {
    background: none; border: none; color: var(--text-secondary, #b5bac1);
    font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; margin-top: 8px; display: none;
}
.invite-embed-desc-toggle:hover { text-decoration: underline; color: var(--text-primary, #fff); }
.invite-stat {
    display: flex; align-items: center; gap: 5px;
    font-size: 13px; color: var(--text-secondary, #b5bac1); font-weight: 500;
}
.invite-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.invite-dot.online { background: var(--online, #10B981); box-shadow: 0 0 6px rgba(16, 185, 129, 0.5); }
.invite-dot.members { background: var(--text-muted, #80848e); }
.invite-embed-btn {
    display: block; width: calc(100% - 32px); margin: 0 16px 16px;
    padding: 9px; border-radius: 8px; border: none;
    background: #248046; color: #fff; font-size: 14px;
    font-weight: 600; cursor: pointer; text-align: center;
    letter-spacing: 0.2px;
    transition: background 0.15s;
}
.invite-embed-btn:hover { background: #1d6b3a; }
.invite-embed-btn:active { background: #1a5e33; }
.invite-embed-btn:disabled { opacity: 0.7; cursor: wait; }

/* ─── Sunucu Profili ayar sekmesi (canlı önizleme + Afiş) ─── */
.sp-layout { display: flex; gap: 28px; align-items: flex-start; }
/* Dirty çubuğu içerik kısa olsa da en ALTA sabit + ortada (footer); uzun içerikte sticky korur. .active → tab gizleme bozulmaz */
#server-settings-modal.server-settings-expanded .settings-main-scroll > #ss-profile.active { min-height: 100%; display: flex; flex-direction: column; }
#ss-profile > #sp-dirty-bar { margin-top: auto; }
.sp-form { flex: 1; min-width: 0; max-width: 480px; }
.sp-field { margin-top: 22px; }
.sp-field > label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.5px; color: var(--text-secondary); margin-bottom: 6px; }
.sp-hint { font-size: 12px; color: var(--text-muted, #949ba4); margin: 0 0 10px; }
.sp-icon-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
/* "Sunucu Simgesini Değiştir" — solid indigo dolu buton (gönderilen görsele göre) */
#sp-icon-change {
    padding: 9px 18px; background: #6366f1; border: none; border-radius: var(--radius-sm);
    color: #fff; font-size: 14px; font-weight: 600; font-family: inherit; line-height: 1.2;
    cursor: pointer; box-shadow: none; transition: background 0.15s ease;
}
#sp-icon-change:hover { background: #5457e6; }
/* "Simgeyi Kaldır" — görünür kırmızı dolgulu buton (görsele göre; arka plan boş durmasın) */
#sp-icon-remove {
    padding: 9px 16px; background: rgba(237,66,69,0.16); border: none; border-radius: var(--radius-sm);
    color: #ed4245; font-size: 14px; font-weight: 600; font-family: inherit; line-height: 1.2;
    cursor: pointer; transition: background 0.15s ease, color 0.15s ease;
}
#sp-icon-remove:hover { background: rgba(237,66,69,0.26); color: #f25055; }
#sp-desc { width: 100%; resize: none; min-height: 110px; background: var(--bg-input); color: var(--text-primary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; font-size: 14px; font-family: inherit; line-height: 1.5; }
/* Kaydırma çubuğu thumb'ı en üst/en altta yuvarlak köşelere (8px) taşmasın → track'i içeri çek */
#sp-desc::-webkit-scrollbar-track { margin: 9px 0; background: transparent; }
#sp-desc::-webkit-scrollbar-thumb { background: rgb(var(--overlay-rgb) / 0.1); border-radius: 3px; }
.sp-banner-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 4px; max-width: 380px; }
.sp-banner-swatch {
    position: relative;
    height: 52px; border-radius: 8px; cursor: pointer;
    border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    transition: transform 0.12s, border-color 0.12s;
}
.sp-banner-swatch:hover { transform: translateY(-2px); }
.sp-banner-swatch.selected { border-color: var(--accent, #06B6D4); }
/* Afiş swatch hover: özel koyu tooltip (renk adı + aşağı ok) — native title yerine */
.sp-banner-swatch[data-name]::after, .sp-banner-swatch[data-name]::before {
    opacity: 0; pointer-events: none; position: absolute; left: 50%;
    transform: translateX(-50%); transition: opacity 0.12s ease; z-index: 60;
}
.sp-banner-swatch[data-name]::after {
    content: attr(data-name); bottom: calc(100% + 10px);
    background: var(--tooltip-bg, var(--ui-floating)); color: var(--tooltip-fg, var(--ui-text-strong)); font-size: 12px; font-weight: 600;
    padding: 6px 11px; border-radius: 8px; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,0.5);
}
.sp-banner-swatch[data-name]::before {
    content: ''; bottom: calc(100% - 2px); border: 6px solid transparent; border-top-color: var(--tooltip-bg, var(--ui-floating));
}
.sp-banner-swatch[data-name]:hover::after, .sp-banner-swatch[data-name]:hover::before { opacity: 1; }
.sp-preview-wrap { width: 320px; flex-shrink: 0; position: sticky; top: 8px; }
.sp-preview-label { font-size: 11px; font-weight: 700; letter-spacing: 0.5px; color: var(--text-muted, #949ba4); margin-bottom: 10px; }
#sp-preview { margin-top: 0; max-width: 100%; }
#sp-preview .invite-embed-btn { cursor: pointer; opacity: 1; }  /* önizleme: disabled olsa da tıklanabilir görünsün (wait imleci değil) */
#delete-confirm-modal .invite-embed-btn { cursor: pointer; }  /* silme önizlemesi: Katıl/Sunucuya git disabled (:disabled cursor:wait) olsa da tıklanabilir görünsün */
@media (max-width: 860px) { .sp-layout { flex-direction: column; } .sp-preview-wrap { width: 100%; position: static; } }
.invite-embed.error .invite-embed-inner { padding: 12px 16px; align-items: center; }
.invite-embed-invalid { color: #f23f42; font-size: 13px; }
.invite-invalid-icon {
    width: 50px; height: 50px; border-radius: 16px;
    background: #f23f42; display: flex; align-items: center; justify-content: center;
    font-size: 24px; flex-shrink: 0;
}
.invite-invalid-title {
    font-size: 16px; font-weight: 600; color: #f23f42;
}
.invite-invalid-desc {
    font-size: 13px; color: var(--ui-text-secondary); margin-top: 2px;
}

/* ── Emoji / Sticker / GIF Picker ── */
.emoji-picker {
    position: fixed;
    width: min(450px, calc(100vw - 24px));
    height: min(500px, calc(100vh - 24px));
    background: var(--surface-menu, var(--ui-secondary));
    border: 1px solid rgb(var(--overlay-rgb) / 0.06);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.3);
    z-index: 9999;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: emojiPickerIn 0.13s ease-out;
}
/* ─── Profile card picker variant: wider, shorter, emoji-only ─── */
.emoji-picker.profile-card-picker {
    width: 450px;
    height: min(380px, calc(100vh - 24px));
}
/* Hide the mode bar entirely — profile card picker shows only emoji panel */
.emoji-picker.profile-card-picker .picker-mode-bar {
    display: none;
}
@keyframes emojiPickerIn {
    from { opacity: 0; transform: translateY(6px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Mode bar (Emoji | Stickers | GIFs) ─── */
.picker-mode-bar {
    display: flex;
    background: var(--ui-tertiary);
    border-bottom: 1px solid rgb(var(--overlay-rgb) / 0.06);
    flex-shrink: 0;
}
.picker-mode-btn {
    flex: 1; padding: 8px 4px;
    display: flex; align-items: center; justify-content: center; gap: 5px;
    border: none; background: none; cursor: pointer;
    color: var(--ui-text-faint); font-size: 12px; font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: color 0.1s, background 0.1s;
    line-height: 1;
}
.picker-mode-btn:hover { color: var(--ui-text-normal); background: rgb(var(--overlay-rgb) / 0.04); }
.picker-mode-btn.active { color: var(--ui-text-normal); border-bottom-color: var(--accent); background: rgb(var(--overlay-rgb) / 0.04); }
/* Reaksiyon emoji seçicide üstteki sekme barının TAMAMI gizlenir (Emoji/Çıkartma/GIF satırı yok) — yalnızca reaksiyon açılışında. */
.emoji-picker.reaction-only-picker .picker-mode-bar { display: none; }
/* Reaksiyon picker'ı daha KISA → tepki butonunun hemen ÜSTÜNE sığar (reaksiyon altta görünür kalır, picker ekrana
   sığmayıp clamp olmaz). Konum _positionEmojiPicker(_anchorRect, _, 'left') ile butona SOL-hizalı (Discord tarzı). */
.emoji-picker.reaction-only-picker { height: min(420px, calc(100vh - 100px)); }
.gif-mode-label { font-size: 13px; font-weight: 800; letter-spacing: 0.5px; }

/* ─── Panel container ─── */
.picker-panel {
    display: flex; flex-direction: column; flex: 1; min-height: 0;
}
.picker-panel.hidden { display: none; }

/* ─── Panel body (sidebar + content) ─── */
.picker-body {
    display: flex; flex: 1; min-height: 0;
}
.picker-sidebar {
    display: flex; flex-direction: column;
    width: 44px; min-width: 44px;
    background: var(--ui-tertiary);
    border-right: 1px solid rgb(var(--overlay-rgb) / 0.06);
    overflow-y: auto; overflow-x: hidden;
    padding: 4px 0;
    scrollbar-width: none;
}
.picker-sidebar::-webkit-scrollbar { display: none; }
.picker-content {
    flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden;
}
/* Picker içinde fareyle kaydırma arkadaki sohbete TAŞMASIN (scroll chaining engelle) */
.emoji-picker-grid, .sticker-grid, .gif-grid, .picker-sidebar, .emoji-search-overlay { overscroll-behavior: contain; }

/* Search bar */
.emoji-picker-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 8px;
    background: var(--ui-secondary);
    flex-shrink: 0;
    border-bottom: 1px solid rgb(var(--overlay-rgb) / 0.04);
}
.emoji-picker-search svg {
    color: var(--ui-text-faint);
    flex-shrink: 0;
}
.emoji-picker-search input {
    flex: 1;
    padding: 6px 8px;
    background: var(--ui-tertiary);
    border: none;
    border-radius: 4px;
    color: var(--ui-text-normal);
    font-size: 14px;
    outline: none;
    min-width: 0;
}
.emoji-picker-search input::placeholder { color: var(--ui-text-faint); }
.emoji-picker-search input:focus { outline: 1px solid var(--accent); box-shadow: 0 0 0 2px rgba(6,182,212,0.25); }

/* ─── Category tabs → now vertical sidebar icons ─── */
.emoji-picker-tabs {
    display: flex !important;
    flex-direction: column !important;
    overflow-x: unset !important;
    border-top: none !important;
    border-bottom: none !important;
    background: var(--ui-tertiary) !important;   /* çıkartma yan-çubuğu ile aynı renk */
    gap: 0 !important;
    padding: 4px 0 !important;
}
.emoji-tab {
    flex: unset !important;
    min-width: unset !important;
    width: 32px !important; height: 32px !important;
    padding: 0 !important;
    margin: 2px auto !important;
    border-radius: 8px !important;
    border-bottom: none !important;
    font-size: 18px !important;   /* çıkartma yan-çubuğu ikonlarıyla aynı boyut */
    position: relative;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
}
.emoji-tab.active {
    opacity: 1 !important;
    background: rgb(var(--overlay-rgb) / 0.12) !important;
    border-bottom-color: transparent !important;
}
.emoji-tab.active::before {
    content: '';
    position: absolute; left: -4px; top: 50%; transform: translateY(-50%);
    width: 4px; height: 20px;
    background: var(--accent); border-radius: 0 3px 3px 0;
}

/* Emoji scroll container (sections live inside) */
.emoji-picker-grid {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--ui-scroll-track) transparent;
}
.emoji-picker-grid::-webkit-scrollbar { width: 4px; }
.emoji-picker-grid::-webkit-scrollbar-track { background: transparent; }
.emoji-picker-grid::-webkit-scrollbar-thumb { background: var(--ui-scroll-thumb); border-radius: 2px; }

/* ─── Section-based layout ─── */
.emoji-section { display: block; }
.emoji-section-header {
    position: sticky;
    top: 0;
    z-index: 2;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--ui-text-faint);
    background: var(--ui-secondary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1.4;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: color 0.1s;
}
.emoji-section-header:hover { color: var(--ui-text-normal); }
.emoji-section-title { flex: 1; }
.emoji-section-chevron {
    flex-shrink: 0;
    width: 14px; height: 14px;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.15s ease;
}
.emoji-section-chevron::before {
    content: '';
    display: block;
    width: 6px; height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translate(-1px, -1px);
}
/* Collapsed state */
.emoji-section.is-collapsed .emoji-section-grid { display: none; }
.emoji-section.is-collapsed .emoji-section-chevron { transform: rotate(-90deg); }

.emoji-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
    gap: 4px;
    padding: 4px 6px 12px;
    align-content: start;
}

/* ─── Emoji hover footer bar ─── */
.emoji-picker-footer {
    height: 34px;   /* SABİT yükseklik — hover'da önizleme (22px emoji) gelince bar büyümesin (eskiden 28px→33px zıplıyordu) */
    background: var(--ui-tertiary);   /* çıkartma yan-çubuğu ile aynı renk */
    border-top: 1px solid rgb(var(--overlay-rgb) / 0.07);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;   /* çıkartma alt barı ile aynı */
    color: var(--ui-text-normal);
    flex: 0 0 auto;
}
.emoji-footer-preview {
    font-size: 22px;
    line-height: 1;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
    flex-shrink: 0;
}
.emoji-footer-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--ui-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── Sidebar separator (between recent/favorites and regular categories) ─── */
.emoji-sidebar-separator {
    width: 18px;
    height: 1px;
    margin: 6px auto;
    background: rgb(var(--overlay-rgb) / 0.14);
    border-radius: 999px;
    flex: 0 0 auto;
}
.emoji-sidebar-separator[hidden] { display: none; }
.emoji-item {
    aspect-ratio: 1;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; cursor: pointer;
    border-radius: 8px; border: none; background: none;
    transition: background 0.1s;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Twemoji Mozilla', sans-serif;
    line-height: 1;
    padding: 2px;
    width: 44px; height: 44px; min-width: 44px; min-height: 44px;
}
.emoji-item:hover,
.emoji-item.emoji-item-preview-active { background: rgb(var(--overlay-rgb) / 0.1); }
.emoji-item.favorited::after {
    content: ''; position: absolute; top: 2px; right: 2px;
    width: 5px; height: 5px; background: #faa81a; border-radius: 50%;
}

/* ─── Search mode overlay (flat dedup grid) ─── */
.emoji-search-overlay {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--ui-scroll-track) transparent;
}
.emoji-search-overlay::-webkit-scrollbar { width: 4px; }
.emoji-search-overlay::-webkit-scrollbar-track { background: transparent; }
.emoji-search-overlay::-webkit-scrollbar-thumb { background: var(--ui-scroll-thumb); border-radius: 2px; }
.emoji-search-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
    gap: 4px;
    padding: 8px 6px 12px;
    align-content: start;
}

/* ─── Skin tone button + popover ─── */
.emoji-skin-wrap {
    position: relative;
    flex-shrink: 0;
}
.emoji-skin-btn {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    border: none; background: none; cursor: pointer;
    border-radius: 4px;
    font-size: 17px; line-height: 1;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
    opacity: 0.7;
    transition: opacity 0.1s, background 0.1s;
    color: var(--ui-text-normal);
}
.emoji-skin-btn:hover { opacity: 1; background: rgb(var(--overlay-rgb) / 0.08); }
.emoji-skin-popover {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--surface-menu, var(--ui-floating));
    border: 1px solid rgb(var(--overlay-rgb) / 0.1);
    border-radius: 8px;
    padding: 6px 8px;
    display: flex; gap: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    z-index: 10010;
    white-space: nowrap;
}
.emoji-skin-popover.hidden { display: none; }
.skin-tone-opt {
    width: 30px; height: 30px;
    border: none; background: none; cursor: pointer;
    border-radius: 5px;
    font-size: 18px; line-height: 1;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.1s;
}
.skin-tone-opt:hover { background: rgb(var(--overlay-rgb) / 0.1); }

/* ─── Emoji right-click context menu ─── */
.emoji-context-menu {
    position: fixed;
    background: var(--surface-menu, var(--ui-secondary));                        /* emoji picker ile birebir aynı renk */
    border: 1px solid rgb(var(--overlay-rgb) / 0.06);  /* emoji picker ile aynı kenarlık */
    border-radius: var(--radius-md);
    padding: 6px;
    min-width: 172px;
    box-shadow: var(--shadow-lg);
    z-index: 10020;
    animation: emojiPickerIn 0.12s ease-out;
}
.emoji-context-menu.hidden { display: none; }
.emoji-context-menu button {
    display: block; width: 100%;
    padding: 8px 12px;
    border: none; background: none; cursor: pointer;
    color: var(--text-secondary); font-size: 13px; font-weight: 500; text-align: left;
    border-radius: 7px;
    transition: background var(--transition), color var(--transition);
}
.emoji-context-menu button:hover { background: var(--accent); color: #fff; }
.ecm-divider { height: 1px; background: var(--border); margin: 5px 6px; }

/* ─── Server emoji divider in sidebar ─── */
.picker-sidebar-divider {
    width: 24px; height: 1px; background: rgb(var(--overlay-rgb) / 0.08);
    margin: 4px auto;
    flex-shrink: 0;
}
.server-emoji-tab {
    width: 32px; height: 32px;
    margin: 2px auto;
    border-radius: 8px;
    border: none; background: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: var(--ui-text-faint);
    overflow: hidden;
    transition: background 0.1s, color 0.1s;
    position: relative;
}
.server-emoji-tab:hover { background: rgb(var(--overlay-rgb) / 0.08); color: var(--ui-text-normal); }
.server-emoji-tab.active { background: rgb(var(--overlay-rgb) / 0.12); color: var(--ui-text-normal); }
.server-emoji-tab img { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; }
.server-emoji-tab.active::before {
    content: ''; position: absolute; left: -4px; top: 50%; transform: translateY(-50%);
    width: 4px; height: 20px; background: var(--accent); border-radius: 0 3px 3px 0;
}

/* ─── Sticker panel ─── */
.sticker-pack-name {
    padding: 6px 10px 2px; font-size: 10px; font-weight: 700;
    color: var(--ui-text-faint); text-transform: uppercase; letter-spacing: 0.6px;
    flex-shrink: 0;
}
.sticker-grid {
    display: flex; flex-direction: column;
    overflow-y: auto; flex: 1; min-height: 0;
    scrollbar-width: thin; scrollbar-color: var(--ui-scroll-track) transparent;
}
.sticker-section { display: block; }
.sticker-section-header {
    position: sticky; top: 0; z-index: 2; width: 100%;
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 10px 4px; font-family: inherit; font-size: 11px; font-weight: 700;
    color: var(--ui-text-faint); background: var(--ui-secondary);
    text-transform: uppercase; letter-spacing: 0.4px;
    border: none; cursor: pointer; text-align: left; transition: color 0.1s;
}
.sticker-section-header:hover { color: var(--ui-text-normal); }
.sticker-section-title { flex: 1; }
.sticker-section-chevron {
    flex-shrink: 0; width: 14px; height: 14px;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.15s ease;
}
.sticker-section-chevron::before {
    content: ''; display: block; width: 6px; height: 6px;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translate(-1px, -1px);
}
.sticker-section.is-collapsed .sticker-section-grid { display: none; }
.sticker-section.is-collapsed .sticker-section-chevron { transform: rotate(-90deg); }
.sticker-section-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 6px; padding: 4px 8px 12px;
    align-content: start;
}
.sticker-grid::-webkit-scrollbar { width: 4px; }
.sticker-grid::-webkit-scrollbar-thumb { background: var(--ui-scroll-thumb); border-radius: 2px; }
.sticker-item {
    aspect-ratio: 1; border-radius: 10px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: none;
    transition: background 0.1s;
    overflow: hidden; padding: 5px;
}
/* Emoji gibi: düz arka plan vurgusu (scale yok) + son hover'da kalıcı kalan vurgu */
.sticker-item:hover,
.sticker-item.sticker-item-active { background: rgb(var(--overlay-rgb) / 0.1); }
.sticker-item img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* Alt önizleme barı (Discord'daki gibi: çıkartma adı + paket) */
.sticker-footer {
    flex-shrink: 0; height: 34px; background: var(--ui-tertiary);   /* SABİT yükseklik — hover'da önizleme (22px çıkartma) gelince bar büyümesin */
    display: flex; align-items: center;
    padding: 5px 12px; border-top: 1px solid rgb(var(--overlay-rgb) / 0.06);
    font-size: 13px; color: var(--ui-text-secondary); white-space: nowrap; overflow: hidden;
}
.sticker-footer-img { width: 22px; height: 22px; object-fit: contain; margin-right: 8px; flex-shrink: 0; }
.sticker-footer-name { font-weight: 700; color: var(--ui-text-header); overflow: hidden; text-overflow: ellipsis; }
.sticker-footer-pack { color: var(--ui-text-faint); flex-shrink: 0; }
/* Composer'a iliştirilen bekleyen çıkartma önizlemesi (Discord gibi: görsel + × ile kaldır) */
.sticker-preview-area { padding: 10px 16px 2px; display: flex; }
.sticker-preview-item {
    position: relative; width: 84px; height: 84px;
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: 14px; padding: 9px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.28);
    transition: border-color var(--transition), transform var(--transition);
}
.sticker-preview-item:hover { border-color: var(--accent); transform: translateY(-1px); }
.sticker-preview-item img { width: 100%; height: 100%; object-fit: contain; }
.sticker-preview-remove {
    position: absolute; top: -8px; right: -8px;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--ui-tertiary); color: var(--ui-text-normal); border: 1px solid var(--border);
    cursor: pointer; font-size: 14px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 1px 5px rgba(0,0,0,0.45);
    transition: background 0.12s, color 0.12s, transform 0.12s;
}
.sticker-preview-remove:hover { background: #da373c; color: #fff; transform: scale(1.12); }
.sticker-sidebar-btn {
    width: 32px; height: 32px; margin: 2px auto;
    display: flex; align-items: center; justify-content: center;
    border: none; background: none; cursor: pointer;
    border-radius: 8px; font-size: 18px; opacity: 0.55;
    transition: opacity 0.1s, background 0.1s;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
    position: relative;
}
.sticker-sidebar-btn:hover { opacity: 1; background: rgb(var(--overlay-rgb) / 0.08); }
.sticker-sidebar-btn.active { opacity: 1; background: rgb(var(--overlay-rgb) / 0.12); }
.sticker-sidebar-btn.active::before {
    content: ''; position: absolute; left: -4px; top: 50%; transform: translateY(-50%);
    width: 4px; height: 20px; background: var(--accent); border-radius: 0 3px 3px 0;
}
.sticker-empty {
    grid-column: 1/-1; padding: 24px 8px;
    text-align: center; color: var(--ui-text-faint); font-size: 13px;
}

/* ─── GIF panel ─── */
.gif-search-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px 8px; background: var(--ui-secondary);
    border-bottom: 1px solid rgb(var(--overlay-rgb) / 0.06);
    flex-shrink: 0;
}
.gif-search-bar svg { color: var(--ui-text-faint); flex-shrink: 0; }
.gif-search-bar input {
    flex: 1; padding: 6px 8px; background: var(--ui-tertiary);
    border: none; border-radius: 4px; color: var(--ui-text-normal);
    font-size: 14px; outline: none; min-width: 0;
}
.gif-search-bar input::placeholder { color: var(--ui-text-faint); }
.gif-search-bar input:focus { outline: 1px solid var(--accent); box-shadow: 0 0 0 2px rgba(6,182,212,0.25); }
.gif-fav-btn {
    background: none; border: none; cursor: pointer;
    color: #80848e; padding: 4px; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    transition: color 0.1s; flex-shrink: 0;
}
.gif-fav-btn:hover, .gif-fav-btn.active { color: var(--accent); }
/* Geri butonu (kategori/sonuç/başlık görünümünde) */
.gif-back-btn {
    background: none; border: none; cursor: pointer; color: var(--ui-text-faint);
    padding: 4px; border-radius: 4px; display: flex; align-items: center; justify-content: center;
    transition: color 0.1s, background 0.1s; flex-shrink: 0;
}
.gif-back-btn svg { color: inherit; }
.gif-back-btn:hover { color: var(--ui-text-normal); background: rgb(var(--overlay-rgb) / 0.06); }
/* Favorilerim / Öne Çıkarılanlar başlığı (arama barı yerine) */
.gif-section-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; color: var(--ui-text-normal); padding: 6px 4px; }
/* GIF kategori karoları (Discord tarzı: önizleme görseli + sol-alt etiket) */
.gif-category-tile {
    position: relative; display: flex; align-items: flex-end;
    height: 106px; flex-shrink: 0;   /* SABİT yükseklik (86→106, ~%23 daha büyük: daha rahat tıklanır, görsel büyük); aspect-ratio kaymalara yol açıyordu */
    border-radius: 8px; overflow: hidden;
    border: none; padding: 0; cursor: pointer; background: #1e1f22;
}
.gif-category-tile img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; filter: brightness(0.72);
    transition: transform 0.15s ease, filter 0.15s ease;
}
.gif-category-tile:hover img { transform: scale(1.06); filter: brightness(0.55); }
.gif-category-tile .gif-category-label {
    position: relative; z-index: 1; padding: 8px 10px;
    font-size: 14px; font-weight: 800; color: #fff; line-height: 1.1; text-align: left;
    text-shadow: 0 1px 4px rgba(0,0,0,0.85); pointer-events: none;
}
.gif-category-tile .gif-category-icon {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 38px; opacity: 0.95; pointer-events: none;   /* büyük karoya uygun büyük emoji */
}
/* Önizleme yoksa renkli gradyan zemin (Favorilerim / Öne Çıkarılanlar / kategoriler) */
.gif-cat-fav { background: linear-gradient(135deg, #8B5CF6, #06B6D4); }
.gif-cat-hot { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.gif-cat-cat { background: linear-gradient(135deg, #1e2233, #2b2f44); }   /* statik kategori karosu (API preview YOK) */
.gif-grid {
    /* GIF SONUÇLARI: gerçek 2-kolon JS masonry (flex). Kolon içi öğeler dikey yığılır → ARALARDA BOŞLUK YOK.
       column-count YOK → yatay scroll/sağa taşma YOK; sadece dikey scroll. */
    display: flex; gap: 8px; align-items: flex-start;
    padding: 8px;
    overflow-x: hidden; overflow-y: auto; flex: 1; min-height: 0;
    scrollbar-width: thin; scrollbar-color: var(--ui-scroll-track) transparent;
}
/* Masonry kolonu: her item daha kısa kolona eklenir; flex-column gap-siz yığar */
.gif-masonry-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
/* KATEGORİ KAROLARI görünümü: 2-kolon GRID (masonry değil — karolar eşit/sabit yükseklikte) */
.gif-grid.gif-grid-categories {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: min-content; gap: 8px; align-items: start; align-content: start;
}
.gif-grid::-webkit-scrollbar { width: 4px; }
.gif-grid::-webkit-scrollbar-thumb { background: var(--ui-scroll-thumb); border-radius: 2px; }
.gif-item {
    /* masonry kartı: doğal yükseklik (flex-column içinde içerik yüksekliği); kırpma yok */
    width: 100%; min-width: 0;
    border-radius: 8px; cursor: pointer; overflow: hidden;
    position: relative; background: #1e1f22; transition: filter 0.12s;
}
.gif-item:hover { filter: brightness(1.12); }
/* img (gif fallback) ve video (optimize mp4) aynı kart davranışı — doğal en-boy oranı, kırpma yok */
.gif-item img, .gif-item video { width: 100%; height: auto; display: block; background: #1e1f22; }
.gif-fav-overlay {
    position: absolute; top: 5px; right: 5px;
    background: rgba(0,0,0,0.6); border-radius: 7px;   /* daire değil, yuvarlak KARE (mesaj GIF'iyle aynı) */
    width: 26px; height: 26px; color: #fff;
    display: none; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    transition: background 0.12s, transform 0.12s, color 0.12s;
}
.gif-item:hover .gif-fav-overlay { display: flex; }
.gif-fav-overlay:hover { background: rgba(0,0,0,0.78); transform: scale(1.08); }
/* favori = ALTIN dolu yıldız; picker'da favoriler hep görünür (hangi GIF favori belli olsun) */
.gif-fav-overlay.active { display: flex !important; color: #fbbf24; background: rgba(0,0,0,0.62); }
.gif-fav-overlay svg { width: 15px; height: 15px; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,0.4)); }
.gif-fav-overlay.active svg { filter: drop-shadow(0 1px 2px rgba(245,158,11,0.45)); }
.gif-setup-msg {
    padding: 20px 16px; text-align: center;
    color: var(--ui-text-faint); font-size: 13px; line-height: 1.6;
}
.gif-setup-msg code {
    display: block; margin-top: 8px; padding: 6px 10px;
    background: var(--ui-tertiary); border-radius: 4px;
    font-family: monospace; color: var(--ui-text-normal); font-size: 11px;
}
.gif-status-msg {
    grid-column: 1/-1; padding: 20px 8px;   /* grid'de tam genişlik (Yükleniyor / GIF bulunamadı) */
    text-align: center; color: var(--ui-text-faint); font-size: 13px;
}
/* Sağlayıcı attribution (Tenor/GIPHY şartları gereği görünür olmalı) — panel altında okunabilir footer */
/* GIPHY/Tenor şartları gereği ZORUNLU attribution — kaldırılmaz. Zarif, küçük, alt SAĞ footer:
   göze batmayan ama okunabilir; ayrı/parlak bar görünümü yok, GIF grid'i kaplamaz (flex footer). */
.gif-provider-attribution {
    flex-shrink: 0; text-align: right;
    padding: 4px 11px 5px; font-size: 9px; font-weight: 600; letter-spacing: 0.4px;
    text-transform: uppercase; color: var(--ui-text-faint);
    background: transparent; border-top: none;
    opacity: 0.85; transition: opacity 0.15s;
}
.gif-provider-attribution:hover { opacity: 1; }       /* hover'da tam netleşir (okunabilirlik) */
.gif-provider-attribution:empty { display: none; }   /* provider bilinene kadar gizli — yanlış provider flicker etmez */

/* ── Ses Widget'i (uygulama-içi voice mini overlay) ───────────────────────── */
/* Ayarlar kontrolleri */
.vw-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); }
.vw-field-label { font-size: 14px; color: var(--text-primary); font-weight: 500; }
.vw-select {
    min-width: 190px; padding: 8px 10px; border-radius: 8px;
    background: var(--bg-input); color: var(--text-primary);
    border: 1px solid var(--border); font-size: 13px; font-family: inherit; cursor: pointer;
}
.vw-select:focus { outline: none; border-color: var(--accent); }
/* ── VOICE-WIDGET-DROPDOWN-UI-1: Ses Widget'i seçicileri ─────────────────────────────────
   Native açılır liste işletim sistemi stilinde çizilir (beyaz zemin, sistem mavisi; temaya uymaz,
   CSS ile değiştirilemez) → ortak createCustomSelect (a11y kipi). Native select DEĞER TAŞIYICISI
   olarak kalır ve YALNIZ sarmalandığında gizlenir (JS çalışmazsa yukarıdaki görünüm kalır). Kurallar
   #us-voicewidget kapsamındadır → diğer özel seçiciler ETKİLENMEZ; renkler tema token'larından. */
.custom-select-wrap + select.vw-select { display: none; }
.vw-field > .custom-select-wrap { flex: 0 0 200px; width: 200px; max-width: 60%; }
#us-voicewidget .custom-select-trigger {
    min-height: 38px; padding: 8px 34px 8px 12px;
    font-size: 13px; font-weight: 500;
}
#us-voicewidget .custom-select-trigger:hover { border-color: var(--border-hover); background: var(--bg-hover); }
#us-voicewidget .custom-select-trigger:focus,
#us-voicewidget .custom-select-trigger.open {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
/* Ok: maske + token rengi (sabit gri yerine); açıkken / klavye odağında accent */
#us-voicewidget .custom-select-trigger::after {
    background: var(--text-secondary);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
    transition: transform 0.2s, background-color var(--transition);
}
#us-voicewidget .custom-select-trigger.open::after,
#us-voicewidget .custom-select-trigger:focus-visible::after { background: var(--accent); }
/* Açık liste: ayar kartından YÜKSELTİLMİŞ menü (ortak menü --bg-surface'te kartla aynı renkti) */
#us-voicewidget .custom-select-menu {
    background: var(--bg-floating);
    border-color: var(--border-hover);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    padding: 6px; max-height: 260px;
}
#us-voicewidget .custom-select-option {
    gap: 10px; min-height: 36px; padding: 8px 10px; border-radius: 6px;
    font-size: 13px; font-weight: 500; color: var(--text-secondary);
}
#us-voicewidget .custom-select-option + .custom-select-option { margin-top: 2px; }
/* Uzun seçenek: tek satır + ellipsis (tam metin title'da); tik sağda sabit kalır */
#us-voicewidget .custom-select-option > span {
    flex: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#us-voicewidget .custom-select-option .cs-check { flex-shrink: 0; }
#us-voicewidget .custom-select-option:hover,
#us-voicewidget .custom-select-option:focus-visible {
    background: var(--bg-modifier-hover); color: var(--text-primary);
}
#us-voicewidget .custom-select-option:focus-visible {
    outline: none; box-shadow: inset 0 0 0 1px var(--accent);
}
/* Seçili: accent tonu + tik; etiket tema metin renginde (Açık temada accent metin okunaksızdı).
   Hover/odakta da seçili kalır (aynı özgüllük, SONRA gelir). */
#us-voicewidget .custom-select-option.selected {
    background: var(--accent-soft); color: var(--text-primary); font-weight: 600;
}
/* Önizleme sahnesi */
/* "Şu an pasif" bilgi notu — widget özelliği flag ile kapalıyken kullanıcıyı bilgilendirir */
.vw-status-note {
    margin-top: 8px; padding: 8px 12px; border-radius: 8px;
    background: rgba(245,158,11,0.10); border: 1px solid rgba(245,158,11,0.30);
    color: #d9a441; font-size: 13px; line-height: 1.5;
}
.vw-status-note b { color: var(--tint-amber, #f0b54a); }
.vw-preview-stage {
    position: relative; height: 220px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border);
    background: radial-gradient(circle at 28% 22%, rgba(139,92,246,0.13), transparent 60%),
                repeating-linear-gradient(45deg, #0c0f16, #0c0f16 13px, #0e121b 13px, #0e121b 26px);
}
/* Widget gövdesi (hem preview hem gerçek floating) */
.vw-widget {
    display: flex; flex-direction: column; gap: 4px; padding: 7px; border-radius: 12px;
    background: rgb(var(--bg-secondary-rgb) / 0.92); border: 1px solid rgb(var(--overlay-rgb) / 0.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.45); width: max-content; max-width: 240px; user-select: none;
}
.vw-preview.vw-pos-top-left     { position: absolute; top: 12px; left: 12px; }
.vw-preview.vw-pos-top-right    { position: absolute; top: 12px; right: 12px; }
.vw-preview.vw-pos-bottom-left  { position: absolute; bottom: 12px; left: 12px; }
.vw-preview.vw-pos-bottom-right { position: absolute; bottom: 12px; right: 12px; }
/* Gerçek floating widget — uygulama-içi, fixed */
#voice-mini-widget { position: fixed; z-index: 900; }   /* içeriğin üstünde ama modal/menü/toast altında */
#voice-mini-widget.vw-pos-top-left     { top: 16px; left: 16px; }
#voice-mini-widget.vw-pos-top-right    { top: 16px; right: 16px; }
#voice-mini-widget.vw-pos-bottom-left  { bottom: 16px; left: 16px; }
#voice-mini-widget.vw-pos-bottom-right { bottom: 16px; right: 16px; }
#voice-mini-widget.hidden { display: none; }
/* Kullanıcı satırı */
.vw-user { display: flex; align-items: center; gap: 8px; padding: 3px 5px; border-radius: 8px; }
.vw-user.vw-hide { display: none; }
.vw-avatar {
    position: relative; flex-shrink: 0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: #fff; background: #5865F2;
}
.vw-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.vw-widget.vw-size-small .vw-avatar { width: 28px; height: 28px; font-size: 12px; }
.vw-widget.vw-size-large .vw-avatar { width: 40px; height: 40px; font-size: 15px; }
.vw-user.speaking .vw-avatar { box-shadow: 0 0 0 2px var(--online), 0 0 8px 1px rgba(16,185,129,0.55); }
.vw-name {
    font-size: 12px; font-weight: 600; color: var(--text-primary);
    max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    background: rgb(var(--overlay-rgb) / 0.06); padding: 2px 8px; border-radius: 10px;
}
.vw-name.vw-hide { display: none; }
.vw-badge {
    position: absolute; bottom: -2px; right: -3px; width: 14px; height: 14px; border-radius: 50%;
    background: var(--dnd); color: #fff; display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--bg-secondary);
}
.vw-badge svg { width: 9px; height: 9px; }
.vw-widget.vw-size-large .vw-badge { width: 16px; height: 16px; bottom: -2px; right: -2px; }
.vw-channel {
    margin-top: 2px; font-size: 10px; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase;
    color: var(--text-muted); display: flex; align-items: center; gap: 5px; padding: 3px 6px;
}
.vw-empty-note { font-size: 11px; color: var(--text-muted); padding: 4px 8px; }

/* ── Reactions ── */
.msg-reactions {
    display: flex; flex-wrap: wrap; gap: 4px;
    margin-top: 4px;
}
.reaction-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 999px;
    background: rgb(var(--overlay-rgb) / 0.07);
    border: 1px solid rgb(var(--overlay-rgb) / 0.1);
    font-size: 14px; cursor: pointer;
    color: var(--text-muted, #949ba4);
    user-select: none;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 90ms ease;
}
.reaction-badge:hover { background: rgb(var(--overlay-rgb) / 0.11); border-color: rgb(var(--overlay-rgb) / 0.18); }
.reaction-badge:active { transform: scale(0.94); }
/* "Tepki ekle" (+) butonu — reaksiyon rozetiyle aynı pill, yalnızca ikon (smiley). Mevcut reaksiyonların yanında. */
.reaction-add-btn {
    display: none;   /* varsayılan: yalnızca aktif reaksiyonlar görünür; (+) butonu mesaj hover'ında çıkar */
    align-items: center; justify-content: center;
    padding: 2px 7px; border-radius: 999px;
    background: rgb(var(--overlay-rgb) / 0.07);
    border: 1px solid rgb(var(--overlay-rgb) / 0.1);
    color: var(--text-muted, #949ba4); cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 90ms ease;
}
/* "Tepki ekle" (+) butonu yalnızca mesajın üstüne gelince görünür (kanal + DM mesajları .message kullanır). */
.message:hover .reaction-add-btn,
.message.reaction-picker-open .reaction-add-btn { display: inline-flex; }   /* picker bu mesaj için açıkken de görünür kalsın */
.reaction-add-btn:hover { background: rgb(var(--overlay-rgb) / 0.12); border-color: rgb(var(--overlay-rgb) / 0.2); color: var(--text-secondary); }
.reaction-add-btn:active { transform: scale(0.94); }
.reaction-add-btn svg { width: 16px; height: 16px; display: block; }
.reaction-badge.mine {
    background: rgba(6, 182, 212, 0.18);
    border-color: rgba(6, 182, 212, 0.55);
    color: var(--text-primary, #f2f3f5);
}
.reaction-badge.mine:hover { background: rgba(6, 182, 212, 0.26); }
.reaction-badge span,
.reaction-badge .reaction-count { font-size: 12px; color: var(--text-secondary); display: inline-block; user-select: none; -webkit-user-select: none; }
.reaction-badge.mine span,
.reaction-badge.mine .reaction-count { color: var(--text-primary, #f2f3f5); }
.reaction-badge.reaction-enter { animation: reactionPopIn 240ms cubic-bezier(0.2, 0.9, 0.3, 1.2); transform-origin: center; }
.reaction-badge.reaction-bump { animation: reactionBump 190ms ease-out; transform-origin: center; }
.reaction-badge.reaction-selected-pulse { animation: reactionSelectedPulse 360ms ease-out; transform-origin: center; }
.reaction-badge.reaction-leave { animation: reactionFadeOut 170ms ease-in forwards; pointer-events: none; }
.reaction-leave-clone { position: fixed; z-index: 10001; margin: 0; pointer-events: none; }
.reaction-count.count-up { animation: inbox-count-up 180ms ease-out; }
.reaction-count.count-down { animation: inbox-count-down 180ms ease-out; }
@keyframes reactionPopIn {
    0% { transform: scale(0.86); opacity: 0; }
    62% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes reactionBump {
    0% { transform: scale(1); }
    45% { transform: scale(1.12); }
    100% { transform: scale(1); }
}
@keyframes reactionSelectedPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.28); }
    42% { transform: scale(1.08); box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.16); }
    100% { transform: scale(1); box-shadow: 0 0 0 7px rgba(6, 182, 212, 0); }
}
@keyframes reactionFadeOut {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.82); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .reaction-badge { transition: none !important; }
    .reaction-badge.reaction-enter,
    .reaction-badge.reaction-bump,
    .reaction-badge.reaction-selected-pulse,
    .reaction-badge.reaction-leave,
    .reaction-leave-clone,
    .reaction-count { animation: none !important; }
}

/* .quick-react-picker (bespoke hızlı-tepki şeridi) KALDIRILDI — hover "Tepki Ekle" tam picker'ı açar. */

/* ── Reaction Tooltip ── */
#reaction-tooltip {
    position: fixed; z-index: 10000;
    background: var(--tooltip-bg, var(--ui-floating)); border: 1px solid rgb(var(--overlay-rgb) / 0.08);
    color: var(--text-primary, #f2f3f5);
    padding: 12px 14px; border-radius: 8px;
    max-width: 340px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    opacity: 0; transition: opacity 0.12s ease;
    display: flex; align-items: center; gap: 12px;
}
#reaction-tooltip.visible { opacity: 1; }
.reaction-tooltip-more {
    border: 0; background: transparent;
    color: var(--accent, #06b6d4);
    padding: 0; font: inherit; cursor: pointer; display: inline;
}
.reaction-tooltip-more:hover { text-decoration: underline; }
.reaction-tooltip-emoji {
    flex: 0 0 auto;
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    font-size: 34px; line-height: 1;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
}
.reaction-tooltip-emoji img {
    width: 38px; height: 38px; object-fit: contain;
}
.reaction-tooltip-text {
    min-width: 0; font-size: 13px; line-height: 1.35;
    color: var(--text-primary, #f2f3f5); word-break: break-word;
}

/* ── Reactions Details Modal ── */
.reactions-modal-overlay {
    position: fixed; inset: 0; z-index: 9500;
    background: rgba(0,0,0,0.6);
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.reactions-modal {
    background: var(--bg-surface, #2b2d31);
    border: 1px solid var(--border, rgba(255,255,255,0.06));
    border-radius: 10px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    width: 440px; max-width: calc(100vw - 32px); max-height: 80vh;
    display: flex; flex-direction: column; overflow: hidden;
    animation: rxModalIn 0.18s ease;
}
@keyframes rxModalIn {
    from { opacity: 0; transform: scale(0.96) translateY(-8px); }
    to   { opacity: 1; transform: none; }
}
.reactions-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--border, rgba(255,255,255,0.06)); flex-shrink: 0;
}
.reactions-modal-title { font-size: 16px; font-weight: 700; color: var(--text-primary, #f2f3f5); }
.reactions-modal-close {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; cursor: pointer; color: var(--text-muted, #949ba4);
    background: none; transition: background 0.1s, color 0.1s;
}
.reactions-modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.reactions-modal-body { display: flex; flex: 1; overflow: hidden; }
.reactions-modal-tabs {
    width: 110px; flex-shrink: 0; border-right: 1px solid var(--border, rgba(255,255,255,0.06));
    overflow-y: auto; padding: 8px 4px;
    display: flex; flex-direction: column; gap: 2px;
}
.reactions-modal-tab {
    display: flex; align-items: center; gap: 5px;
    padding: 7px 8px; border-radius: 6px; cursor: pointer;
    font-size: 14px; color: var(--text-secondary, #b5bac1);
    background: none; text-align: left; width: 100%;
    transition: background 0.1s, color 0.1s; white-space: nowrap; overflow: hidden;
}
.reactions-modal-tab:hover { background: var(--bg-hover); color: var(--text-primary); }
.reactions-modal-tab.active { background: var(--accent-soft, rgba(6,182,212,0.12)); color: var(--accent, #06B6D4); }
.rm-tab-count { font-size: 12px; opacity: 0.8; }
.reactions-modal-users { flex: 1; overflow-y: auto; padding: 8px; }
.reactions-modal-loading,
.reactions-modal-empty {
    padding: 24px 16px; text-align: center;
    color: var(--text-muted, #949ba4); font-size: 13px;
}
.reaction-user-row {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 8px; border-radius: 6px; transition: background 0.1s;
}
.reaction-user-row:hover { background: var(--bg-hover); }
.reaction-user-row.is-clickable { cursor: pointer; }
.reaction-user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    font-size: 13px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    color: white; flex-shrink: 0; overflow: hidden;
}
.reaction-user-avatar .avatar-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.reaction-user-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.reaction-user-name {
    font-size: 13px; font-weight: 600; color: var(--text-primary, #f2f3f5);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.reaction-user-subtitle {
    font-size: 11px; color: var(--text-muted, #949ba4);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Context menu reactions row */
.ctx-reactions {
    display: flex; gap: 0; padding: 4px 8px;   /* hızlı emojiler bitişik grup (çubuktakiyle aynı dil) */
}
.ctx-react-btn {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; border-radius: 6px;
    cursor: pointer;
    transition: background var(--transition);
}
.ctx-react-btn:hover { background: var(--bg-hover); }
/* Mesaj menüsü: hızlı tepkiler EN ÜSTTE (mevcut .ctx-reactions satırı). "Tepki Ekle" düz bir
   .ctx-item'dir ve MEVCUT tam tepki picker'ını açar (alt menü yok); ikonu hover çubuğuyla aynı kaynaktan
   (_MSG_TB_ICON.react) JS basar. */
#ctx-react-trigger .ctx-react-icon { display: inline-flex; align-items: center; flex-shrink: 0; }
#ctx-react-trigger .ctx-react-icon svg { width: 16px; height: 16px; }

/* ── Pins Panel ── */
.pins-panel {
    position: absolute; top: 4px; right: 8px;
    width: 360px; max-height: calc(100% - 12px);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100; display: flex; flex-direction: column;
    overflow: hidden;
}
/* Sabitlenenler paneli — Discord benzeri yükseklik. Eskiden `max-height: calc(100% - 12px)` ile
   sohbet alanının TAMAMINI kaplıyor ve mesaj yazma barının (composer) üzerine biniyordu (ölçüm:
   panel 85→942, composer 878→950). Artık composer'ın ÜSTÜNDE biter (canlı `--composer-height`
   değişkeni, ResizeObserver ile güncellenir) ve uzun ekranlarda sınırsız uzamaz.
   NOT: `.pins-panel` sınıfını arama paneli de paylaşır; bu kural ID-kapsamlıdır → arama paneli
   kendi `#search-results-panel { height: calc(100% - 12px) }` davranışında kalır. */
#pins-panel { max-height: min(720px, calc(100% - 16px - var(--composer-height, 72px))); }
.pins-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 12px 10px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.pins-panel-header h4 { font-size: 13px; font-weight: 700; color: var(--text-primary); letter-spacing: 0.01em; text-transform: uppercase; }
/* Sabitlenenler panelinde başlığın SOLUNDA pin ikonu (Discord paritesi). Yalnız pin paneline
   aittir — arama panelinin başlığı kendi `.sr-header-titles` yapısını kullanır. */
.pins-panel-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pins-panel-title-ico { flex-shrink: 0; color: var(--text-secondary); }
.pins-list { overflow-y: auto; padding: 8px; flex: 1; }
/* Boş durum — ikonlu, açıklamalı (Discord tarzı) */
.pins-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 40px 26px 44px; gap: 3px; min-height: 180px;
}
.pins-empty-icon {
    width: 54px; height: 54px; border-radius: 50%; margin-bottom: 12px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-soft); color: var(--accent);
    box-shadow: 0 0 0 6px rgba(6,182,212,0.06);
}
.pins-empty-title { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.pins-empty-sub { font-size: 12px; color: var(--text-muted); line-height: 1.55; max-width: 250px; margin-top: 2px; }
.pins-empty-sub strong { color: var(--text-secondary); font-weight: 600; }
.pinned-msg-item {
    padding: 10px 12px; margin-bottom: 6px;
    background: var(--bg-secondary); border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent);
    overflow: hidden;
}
.pinned-msg-author { font-size: 13px; font-weight: 600; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.pinned-msg-text {
    font-size: 13px; color: var(--text-secondary); word-break: break-word;
    white-space: pre-wrap;   /* sohbetteki gibi satır sonlarını koru (.message-text ile aynı) — düz yazıya çökmesin */
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
}
.pinned-msg-ellipsis { color: var(--text-muted); }
.pinned-msg-attach { margin-top: 6px; }
.pinned-msg-attach img { max-width: 100%; max-height: 90px; border-radius: 4px; object-fit: cover; display: block; }
.pinned-msg-attach video { max-width: 100%; max-height: 90px; border-radius: 4px; object-fit: cover; display: block; }
.pinned-msg-attach-file {
    margin-top: 6px; display: flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pinned-msg-attach-hint {
    margin-top: 4px; font-size: 12px; color: var(--text-secondary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pinned-msg-attach-only { color: var(--text-secondary) !important; font-style: normal !important; }
.pinned-msg-time { font-size: 11px; color: var(--text-muted); margin-top: 5px; }

/* ── Search result message card (chat-style layout) ── */
.sr-msg { display: flex; gap: 12px; align-items: flex-start; }
.sr-msg-body { flex: 1; min-width: 0; }
.sr-msg-header { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-bottom: 3px; }
.sr-msg-header .message-author { font-size: 13px; font-weight: 600; }
.sr-msg-header .pinned-msg-time { font-size: 11px; color: var(--text-muted); margin-top: 0; }
.sr-msg .message-text { font-size: 13px; color: var(--text-secondary); word-break: break-word; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.sr-pin-avatar { background: var(--text-muted) !important; }
.sr-call-ended-icon {
    width: 40px; height: 40px; flex: 0 0 40px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #23a55a; background: transparent;
}
.sr-call-ended-icon svg { display: block; }
.sr-call-ended-content { display: inline-flex; align-items: center; gap: 6px; }
.sr-call-ended-inline-icon { display: inline-flex; align-items: center; justify-content: center; color: #23a55a; flex: 0 0 auto; line-height: 1; }
.sr-call-ended-inline-icon svg { display: block; width: 14px; height: 14px; }

/* Search sort bar + dropdown */
.search-sort-bar { display: flex; align-items: center; gap: 8px; padding: 6px 0 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.sr-sort-dropdown { position: relative; }
.sr-sort-trigger { display: flex; align-items: center; gap: 6px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 4px; color: var(--text-secondary); font-size: 13px; font-weight: 500; padding: 4px 10px; cursor: pointer; line-height: 1.4; transition: background 0.15s, color 0.15s; }
.sr-sort-trigger:hover { background: var(--bg-hover); color: var(--text); }
.sr-sort-chevron { flex-shrink: 0; }
.sr-sort-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 200; background: var(--bg-tertiary, var(--bg-secondary)); border: 1px solid var(--border); border-radius: 6px; padding: 4px; min-width: 130px; box-shadow: 0 4px 16px rgba(0,0,0,0.4); }
.sr-sort-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 4px; cursor: pointer; font-size: 13px; color: var(--text-secondary); transition: background 0.1s, color 0.1s; }
.sr-sort-item:hover { background: var(--bg-hover); color: var(--text); }
.sr-sort-item.active { color: var(--text); }
.sr-radio-icon { flex-shrink: 0; color: var(--text-muted); }
.sr-sort-item.active .sr-radio-icon { color: var(--accent); }
.sr-result-count { margin-left: auto; font-size: 12px; color: var(--text-muted); }

/* Search pagination */
.search-pagination { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 10px 0 4px; flex-wrap: wrap; }
.sr-page-btn { min-width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 6px; background: none; color: var(--text-muted); font-size: 13px; cursor: pointer; padding: 0 6px; transition: background 0.15s, color 0.15s; }
.sr-page-btn:hover { background: var(--bg-hover); color: var(--text); }
.sr-page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.sr-page-ellipsis { color: var(--text-muted); font-size: 13px; padding: 0 2px; }
/* Arama sonuçları — sabit ALT BAR (sayfalama daima görünür, kaydırma listesinin dışında) */
.search-results-footer { flex-shrink: 0; border-top: 1px solid var(--border); padding: 8px; background: var(--bg-surface); }
.search-results-footer.hidden, .search-results-footer:empty { display: none; }
.search-results-footer .search-pagination { padding: 0; }
/* Arama paneli daima TAM YÜKSEKLİK + sonuçların sonu mesajı */
#search-results-panel { height: calc(100% - 12px); }
.sr-end-message { text-align: center; padding: 14px 12px 6px; color: var(--text-muted); font-size: 12px; }
/* R2-top: panel başlığında bağlam etiketi (#kanal / @kullanıcı) */
.sr-header-titles { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sr-header-context { font-size: 11px; font-weight: 500; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.sr-header-context:hover { color: var(--accent); text-decoration: underline; }
.sr-header-context:empty { display: none; }
/* R1: arama sonucu yokken zarif boş durum */
.sr-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 24px; gap: 6px; }
.sr-empty-icon { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(6,182,212,0.12), rgba(139,92,246,0.12)); color: var(--accent); margin-bottom: 6px; }
.sr-empty-icon svg { width: 28px; height: 28px; }
.sr-empty-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.sr-empty-text { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; max-width: 260px; }
/* Issue1: arama paneli açıkken üye listesini gizle → panel SAĞDA temiz konumlanır.
   NOT: mesajlar/composer SIKIŞTIRILMAZ (margin yok) — panel yalnızca overlay; squish geri gelmez. */
.chat-members-content:has(#search-results-panel:not(.hidden)) #members-sidebar { display: none; }
/* Arama paneli SAĞDA AYRI docked kolon (üye listesi gibi flex sütun; floating overlay/kart DEĞİL):
   flush, tam yükseklik, sol kenarlık ayraçlı, yuvarlatma/gölge/boşluk yok. Sohbet (chat-area flex:1) yanında reflow olur. */
.chat-members-content > #search-results-panel {
    position: static; flex: 0 0 340px; width: 340px;
    height: 100%; max-height: 100%; top: auto; right: auto; margin: 0;
    box-sizing: border-box;
    display: flex; flex-direction: column; overflow: hidden; /* iç düzen: header + liste(flex:1 scroll) + footer */
    border: none; border-left: 1px solid var(--border);
    border-radius: 0; box-shadow: none;
}

/* Pin system message */
.system-pin-msg {
    display: block; padding: 4px 16px 4px 62px; font-size: 13px; color: var(--text-secondary);
    position: relative;
    user-select: text; -webkit-user-select: text;
}
.pin-msg-row { display: inline-flex; align-items: center; gap: 0; max-width: 100%; user-select: text; -webkit-user-select: text; }
.pin-msg-text { flex: 0 1 auto; min-width: 0; user-select: text; -webkit-user-select: text; pointer-events: auto; }
.system-pin-msg strong, .system-pin-msg span { user-select: text; -webkit-user-select: text; }
.pin-msg-time { flex: 0 0 auto; margin-left: 5px; color: var(--text-muted); font-size: 10.5px; line-height: 1; opacity: 0.75; white-space: nowrap; align-self: center; transform: translateY(2px); user-select: text; -webkit-user-select: text; }
.system-pin-msg .message-actions,
.system-pin-msg .msg-reactions button,
.system-pin-msg .reaction-chip,
.system-pin-msg button { user-select: none; -webkit-user-select: none; }
.system-pin-msg .msg-reactions { margin-left: 0; margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.system-pin-msg:hover { background: var(--hover-bg); }
.system-pin-msg:hover .message-actions { display: flex; }
/* İkon avatar sütununa (sol gutter, ~merkez 28px) çekilir; negatif margin-left ile sola, margin-right ile
   metin tekrar 62px'e (normal mesaj metni hizası) itilir. Metin normal yazılarla aynı hizada başlar. */
.pin-system-icon { color: var(--accent); flex-shrink: 0; display: flex; align-items: center; margin-left: -42px; margin-right: 26px; }
.pin-see-all { color: var(--text); font-weight: 600; text-decoration: none; cursor: pointer; }
.pin-see-all:hover { text-decoration: underline; }
/* Clickable pinner name in the pin system notice → opens the profile card */
.pin-msg-author {
    color: var(--text); font-weight: 700; cursor: pointer;
    background: none; border: 0; padding: 0;
    font-family: inherit; font-size: inherit; line-height: inherit;
}
.pin-msg-author:hover { text-decoration: underline; }
/* Pin icon new-pin badge dot */
#pin-toggle-btn { position: relative; }
#pin-toggle-btn.has-new-pin::after {
    content: ''; position: absolute;
    /* Discord paritesi: nokta raptiyenin SAĞ ALTINDA durur (eskiden sağ üstteydi) */
    bottom: 5px; right: 4px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #f23f43;
    box-shadow: 0 0 0 2px var(--bg-tertiary, #1e2430);
    pointer-events: none;
}

/* Sohbet başlığı ikonları — hover'da ZEMİN YOK (bilgi `data-tooltip` balonuyla verilir),
   pin/üyeler butonunda aktiflik ZEMİNLE değil DOLGU (solid) ikonla gösterilir.
   `.active` sınıfını app.js::_syncHeaderToggleStates() panel görünürlüğünden türetir. */
.chat-header-right .icon-btn {
    width: 35px; height: 35px;   /* 23px ikon + rahat tıklama alanı (genel .icon-btn 32px kalır) */
}
.chat-header-right .icon-btn:hover {
    background: transparent;
    color: var(--text-primary);
}
#pin-toggle-btn.active,
#toggle-members.active {
    background: transparent;
    color: var(--text-primary);
}
/* Pin ve üyeler: pasif=outline, aktif=DOLU varyant (aynı geometri, tek mekanizma) */
.chat-header-right .hdr-ico-solid { display: none; }
.chat-header-right .icon-btn.active .hdr-ico-solid { display: block; }
.chat-header-right .icon-btn.active .hdr-ico-outline { display: none; }

/* ── Chat Search ── */
.chat-search-box {
    max-width: 230px;
    flex-shrink: 1;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-primary, #080A10);
    position: relative;
    overflow: visible;
    transition: border-color var(--transition);
}
.chat-search-box:focus-within {
    border-color: var(--accent);
}
.chat-search-box input {
    width: 100%; padding: 2px 4px;
    font-size: 13.5px;
    line-height: 19px;
}

/* ── Search Dropdown ── */
.chat-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 320px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    padding: 6px 0 8px;
    font-size: 13px;
    overflow: hidden;
}
.chat-search-query {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 500;
    border-radius: 4px;
    margin: 0 6px 4px;
}
.chat-search-query:hover { background: var(--bg-hover); }
.chat-search-filters-label {
    padding: 8px 14px 3px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    border-top: 1px solid var(--border);
    margin-top: 2px;
}
.chat-search-filter-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 14px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background 0.12s;
    min-height: 40px;
}
.chat-search-filter-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.chat-search-filter-item svg { flex-shrink: 0; opacity: 0.55; margin-top: 2px; }
.chat-search-filter-item .filter-title { font-weight: 500; color: var(--text-primary); font-size: 13px; line-height: 1.3; }
.chat-search-filter-item .filter-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.3; }

/* ── Search Autocomplete ── */
.chat-search-autocomplete {
    border-top: 1px solid var(--border);
    margin-top: 4px;
    padding: 4px 0;
}
.chat-search-autocomplete.hidden { display: none; }
.chat-search-ac-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    cursor: pointer;
    transition: background 0.12s;
    min-height: 36px;
}
.chat-search-ac-item:hover { background: var(--bg-hover); }
.chat-search-ac-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.chat-search-ac-ch-icon {
    width: 26px; height: 26px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; color: var(--text-muted);
    background: var(--bg-hover); flex-shrink: 0;
}
.chat-search-ac-texts { display: flex; flex-direction: column; min-width: 0; }
.chat-search-ac-label { font-size: 13px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-search-ac-hint { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-search-ac-empty { padding: 10px 14px; font-size: 12px; color: var(--text-muted); }

/* ── Search Results Panel extras ── */
.search-results-label {
    padding: 6px 12px 4px;
    font-size: 11px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}
.search-result-channel {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 6px;
}

/* ── Unread Badges ── */
/* DM satiri ayni tokeni paylasir (kopya kural yok): kaynak `c.unread`. */
.channel-item.unread .channel-name,
.dm-item.unread .dm-name { font-weight: 700; color: var(--text-primary); }
.unread-badge {
    font-size: 10px; font-weight: 700;
    min-width: 16px; height: 16px;
    padding: 0 5px;
    border-radius: 8px;
    background: var(--dnd);
    color: white;
    display: flex; align-items: center; justify-content: center;
    margin-left: auto;
}
.unread-dot { display: none; } /* replaced by .channel-item.unread::before */

/* ── Left-side unread pill (text channels only, via .unread class) ── */
.channel-item.unread::before,
.dm-item.unread::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 8px;
    border-radius: 0 3px 3px 0;
    background: var(--accent-grad);
    pointer-events: none;
}
.channel-item.active.unread::before { display: none; }
.channel-list { overflow: visible; }
.sidebar-section { overflow-x: hidden; }

/* ── User Status ── */
.user-avatar-wrap { position: relative; display: inline-block; }
.user-status-dot {
    position: absolute; bottom: 0; right: -2px;
    width: 10px; height: 10px;
    border-radius: 50%;
    border: 2px solid var(--bg-tertiary);
}
.status-online { background: var(--online); }
.status-idle { background: var(--idle); }
.status-dnd { background: var(--dnd); }
.status-invisible, .status-offline { background: var(--offline); }

.btn-sm {
    padding: 5px 12px; font-size: 12px; font-weight: 600;
    border-radius: 6px; cursor: pointer;
    background: var(--accent); color: white;
    transition: background var(--transition);
}
.btn-sm:hover { background: var(--accent-hover); }

/* ── Mention Popup ── */
.mention-popup {
    position: absolute; bottom: 100%; left: 0; right: 0;
    max-height: 240px; overflow-y: auto;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100; margin-bottom: 4px;
}
.mention-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; cursor: pointer;
    transition: background var(--transition);
}
.mention-item:hover, .mention-item.active { background: var(--bg-hover); }
.mention-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600; color: white;
    flex-shrink: 0;
}
.mention-name { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.mention-tag { font-size: 11px; color: var(--text-muted); }

/* Composer mention chips — matches .mention visual in chat */
.composer-mention-chip {
    display: inline-block;
    line-height: 1.2;
    background: rgba(88, 101, 242, 0.3);
    color: #dee0fc;
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: 500;
    vertical-align: baseline;
    white-space: nowrap;
    cursor: default;
    user-select: all;
}
.composer-mention-chip.composer-mention-special {
    background: rgba(250, 166, 26, 0.3);
    color: #faa61a;
}

/* Mention popup section labels */
.mention-section-label {
    padding: 6px 12px 2px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    pointer-events: none;
    user-select: none;
}

/* ── Mention highlight in messages ── */
.mention {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent);
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: 500;
}

/* ── Spoiler ── */
.spoiler {
    background: var(--bg-active);
    color: transparent;
    border-radius: 4px;
    padding: 0 4px;
    cursor: pointer;
    transition: all var(--transition);
    user-select: none;
}
.spoiler.revealed { color: var(--text-primary); background: var(--bg-hover); }

/* ── Blockquote ── */
blockquote {
    border-left: 3px solid var(--text-muted);
    padding-left: 10px;
    margin: 4px 0;
    color: var(--text-secondary);
}

/* ── Code blocks ── */
pre {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin: 6px 0;
    overflow-x: auto;
    font-size: 13px;
}
pre code { background: none; padding: 0; border-radius: 0; }

/* ── Bans List ── */
.bans-list { display: flex; flex-direction: column; gap: 8px; }
.ban-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-hover); border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.ban-user-info { display: flex; flex-direction: column; }
.ban-username { font-size: 14px; font-weight: 500; }
.ban-reason { font-size: 12px; color: var(--text-muted); }
.btn-unban {
    padding: 5px 14px; font-size: 12px; font-weight: 600;
    border-radius: 6px; cursor: pointer;
    background: var(--dnd); color: white;
    transition: background var(--transition);
}
.btn-unban:hover { background: #dc2626; }
.empty-state-text { color: var(--text-muted); font-size: 13px; text-align: center; padding: 20px; }

/* ── Ses Kısıtlamaları (E5B — Karar #39) ── */
.voice-restrictions-list { display: flex; flex-direction: column; gap: 8px; }
.vr-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; flex-wrap: wrap;
    background: var(--bg-hover); border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.vr-avatar {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600; color: white; overflow: hidden;
}
.vr-avatar .avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.vr-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.vr-name {
    font-size: 14px; font-weight: 500;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.vr-sub {
    font-size: 12px; color: var(--text-muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.vr-membership { font-size: 11px; color: var(--text-secondary); }
.vr-membership.vr-left { color: var(--idle); }
.vr-badges { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }
.vr-badge {
    font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 10px;
    white-space: nowrap;
}
.vr-badge-muted { background: rgba(239, 68, 68, 0.14); color: var(--dnd); border: 1px solid rgba(239, 68, 68, 0.3); }
.vr-badge-deafened { background: rgba(139, 92, 246, 0.14); color: var(--accent2); border: 1px solid rgba(139, 92, 246, 0.3); }
.vr-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }
.vr-remove-btn {
    padding: 5px 12px; font-size: 12px; font-weight: 600;
    border-radius: 6px; cursor: pointer;
    background: var(--bg-secondary); color: var(--text-primary);
    border: 1px solid var(--border);
    transition: background var(--transition);
}
.vr-remove-btn:hover:not(:disabled) { background: var(--dnd); color: white; }
.vr-remove-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.vr-remove-btn.vr-btn-loading { opacity: 0.6; pointer-events: none; }
.vr-retry-btn {
    margin: 0 auto 8px; display: block;
    padding: 5px 14px; font-size: 12px; font-weight: 600;
    border-radius: 6px; cursor: pointer;
    background: var(--accent); color: white;
    transition: opacity var(--transition);
}
.vr-retry-btn:hover { opacity: 0.85; }
@media (max-width: 640px) {
    .vr-item { align-items: flex-start; }
    .vr-badges, .vr-actions { width: 100%; }
}

/* ── Theme Selector ── */
.theme-selector { display: flex; gap: 12px; margin-top: 8px; position: relative; }
.theme-option { cursor: pointer; flex: 1; }
/* KEYBOARD-RADIO-CARD-ACCESSIBILITY-1: tema radyosu da gorsel olarak gizli ama odaklanabilir (display:none yerine);
   secili kenarlik `input:checked + .theme-preview` ile gercek checked durumunu izlemeye devam eder. Kapsayici blok GRUP
   KABI (`.theme-selector` position: relative): aksi halde radyo konumlu `.settings-main`e baglanir, kaydirilan
   `.settings-main-scroll` ile KAYMAZ ve klavye odagi karti gorunur alana getirmez. (Kart duzeyinde konumlama kesirli
   konumda secili kartin kenar yumusatmasini degistiriyordu; grup kabi piksel-ozdes.) */
.theme-option input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.theme-option:has(> input:focus-visible) .theme-preview { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.theme-preview {
    padding: 20px 16px; border-radius: var(--radius-md);
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition);
}
.theme-option input:checked + .theme-preview { border-color: var(--accent); }
.theme-preview-dark { background: #1a1a2e; }
.theme-preview-light { background: #f0f0f0; }
.theme-preview-amoled { background: #000000; }
.theme-label { font-weight: 600; font-size: 13px; }
.theme-preview-dark .theme-label { color: #e0e0e0; }
.theme-preview-light .theme-label { color: #333; }
.theme-preview-amoled .theme-label { color: #e0e0e0; }

/* ── React button in message actions ── */
.react-msg-btn {
    font-size: 13px !important;
    display: flex; align-items: center; justify-content: center;
}
/* Forward message button */
.msg-action-btn.forward-btn:hover { background: rgba(88,101,242,0.15); color: #5865f2; }

/* ─── Inline GIF in messages ─── */
.msg-gif { margin: 4px 0; max-width: min(380px, 100%); position: relative; display: inline-block; }
.msg-gif-img {
    max-width: 100%; max-height: 250px;
    border-radius: 6px; display: block; cursor: pointer;
}
/* Mesaj GIF'inde favori (YILDIZ) butonu — Discord tarzı: koyu yuvarlak-kare, sol-üst köşe.
   Yalnızca hover'da görünür (favorideyken de gizli kalır; favori = ALTIN dolu yıldız). */
.msg-gif-fav {
    position: absolute; top: 8px; right: 8px;       /* GIF picker'la aynı: sağ-üst köşe */
    width: 30px; height: 30px; padding: 0;
    display: none; align-items: center; justify-content: center;
    border: none; border-radius: 8px;               /* daire değil, yuvarlak KARE */
    background: rgba(0,0,0,0.6); color: #fff; cursor: pointer;
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    transition: background 0.14s ease, transform 0.14s ease, color 0.14s ease;
}
.msg-gif:hover .msg-gif-fav { display: flex; }
.msg-gif-fav:hover { background: rgba(0,0,0,0.78); transform: scale(1.08); }
/* favorideyken: koyu kare zemin (Discord gibi) + ALTIN dolu yıldız (görünürlük yine SADECE hover'da) */
.msg-gif-fav.active { color: #fbbf24; background: rgba(0,0,0,0.62); }
.msg-gif-fav.active:hover { background: rgba(0,0,0,0.78); transform: scale(1.08); }
.msg-gif-fav svg { width: 17px; height: 17px; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,0.4)); }
.msg-gif-fav.active svg { filter: drop-shadow(0 1px 2px rgba(245,158,11,0.45)); }   /* altın yıldıza hafif glow */

/* ─── Sticker in messages ─── */
.msg-sticker { margin: 4px 0; }
.msg-sticker-img {
    width: 130px; height: 130px; object-fit: contain;
    display: block; cursor: pointer; border-radius: 4px;
}
/* Çıkartma/GIF: fareyle basılı tutulup SEÇİLİP (highlight) veya sürüklenip KOPYALANMASINI engelle.
   Tıklama (lightbox / favori butonu) etkilenmez; uzun-bas callout'u (resmi kaydet/kopyala) da kapatılır. */
.msg-gif, .msg-gif-img, .msg-sticker, .msg-sticker-img {
    user-select: none; -webkit-user-select: none; -moz-user-select: none;
    -webkit-user-drag: none; -webkit-touch-callout: none;
}
/* Yalnızca img'i none yapmak çapraz-sürüklemede yetmiyor (kapsayan .message-text user-select:text);
   GIF/çıkartma içeren mesaj GÖVDESİNİ seçilemez yaparak metinden sürükleyince onlar highlight olmaz. */
.message-text:has(.msg-gif),
.message-text:has(.msg-sticker) {
    user-select: none; -webkit-user-select: none;
}

/* ── Compact mode ── */
.compact-mode .message { padding: 2px 48px 2px 52px; }
.compact-mode .message .message-avatar { width: 28px; height: 28px; font-size: 11px; }
.compact-mode .message .message-text { font-size: 13px; }

/* ═══════════════ THEME: LIGHT ═══════════════ */
/* Yuzey merdiveni KOYU ile AYNI yonde: primary (ray/govde, en derin) < secondary
   (kenar cubuklari) < tertiary (sohbet) — koyuda "daha acik = daha yukarida" olan
   her iliski acik temada da korunur (eski eslem merdiveni TERS ceviriyordu). */
[data-theme="light"] {
    --bg-primary:    #E3E5E8;
    --bg-secondary:  #F2F3F5;
    --bg-tertiary:   #FFFFFF;
    --bg-surface:    #FFFFFF;
    --bg-hover:      #EBEDEF;
    --bg-active:     #DCDFE3;
    --bg-floating:   #FFFFFF;
    --bg-input:      #EBEDEF;
    --text-primary:  #2E3338;
    --text-secondary:#4F5660;
    --text-muted:    #6A7480;
    --text-link:     #0369A1;
    /* KEYBOARD-FOCUS-VISIBILITY-1: accent (#06B6D4) acik zeminlerde 3:1'in ALTINDA kalir → koyu link mavisi. */
    --focus-ring:    var(--text-link);
    --border:        rgba(0, 0, 0, 0.08);
    --border-hover:  rgba(0, 0, 0, 0.12);
    --shadow:        0 4px 24px rgba(0, 0, 0, 0.1);
    --shadow-lg:     0 8px 48px rgba(0, 0, 0, 0.15);
    --glow:          none;
    --overlay-rgb:          0 0 0;
    --shade-k:              0.35;
    --text-glow-rgb:        255 255 255;
    --offline-member-opacity: 0.6;
    --ui-floating:          #FFFFFF;
    --ui-floating-alt:      #FFFFFF;
    --ui-card-deep:         #FFFFFF;
    --ui-stage:             #F2F3F5;
    --ui-deep:              #E3E5E8;
    --ui-tertiary:          #E3E5E8;
    --ui-deep-alt:          #E3E5E8;
    --ui-secondary-alt:     #EBEDEF;
    --ui-secondary:         #F2F3F5;
    --ui-primary:           #FFFFFF;
    --ui-raised:            #EBEDEF;
    --ui-hover:             #E3E5E8;
    --ui-folder:            #E3E5E8;
    --ui-hover-alt:         #EBEDEF;
    --ui-active:            #D7D9DD;
    --ui-scroll-thumb:      #C4C9CE;
    --ui-scroll-track:      #F2F3F5;
    --ui-folder-open-wrap:  rgba(0, 0, 0, 0.06);
    --ui-folder-open:       rgba(0, 0, 0, 0.08);
    --ui-surface-hover:     #EBEDEF;
    --ui-menu-alt:          #FFFFFF;
    --ui-menu-navy:         #FFFFFF;
    --ui-gh-input:          #EBEDEF;
    --ui-gh-raised:         #E3E5E8;
    --ui-punish-bg:         #E3E5E8;
    --ui-force-bg:          #E3E5E8;
    --ui-btn-disabled:      #D7D9DD;
    --bg-primary-rgb:       227 229 232;
    --bg-secondary-rgb:     242 243 245;
    --bg-tertiary-rgb:      255 255 255;
    --bg-surface-rgb:       255 255 255;
    --ui-surface-deep-rgb:  242 243 245;
    --ui-catchup-rgb:       255 255 255;
    --surface-card-rgb:     255 255 255;
    --tint-amber:           #8A5A00;
    --tint-green:           #166534;
    --tint-cyan:            #155E75;
    --tint-indigo:          #4338CA;
    --tint-violet:          #6D28D9;
    --tint-pink:            #BE185D;
    --tint-neutral:         #4E5058;
    --aurora-1:             #E0E7FF;
    --aurora-2:             #EDE9FE;
    --aurora-3:             #F3E8FF;
    --aurora-4:             #E0E7FF;
    --aurora-5:             #EEF2FF;
    --aurora-6:             #F5F3FF;
    --aurora-blob-a:        rgba(124, 132, 255, 0.35);
    --aurora-blob-b:        rgba(190, 110, 255, 0.30);
    --aurora-fg:            #1E1B4B;
    --aurora-fg-soft:       rgba(30, 27, 75, 0.75);
    --aurora-icon-bg:       rgba(255, 255, 255, 0.65);
    --aurora-icon-fg:       #4338CA;
    --aurora-btn-bg:        #4338CA;
    --aurora-btn-fg:        #FFFFFF;
    --aurora-tile-bg:       rgba(255, 255, 255, 0.55);
    --aurora-more-fg:       #312E81;
    --ui-text-strong:       #060607;
    --ui-text-header:       #060607;
    --ui-text-header-alt:   #060607;
    --ui-text-normal:       #313338;
    --ui-text-normal-alt:   #2E3338;
    --ui-text-bright:       #2E3338;
    --ui-text-soft:         #4E5058;
    --ui-text-soft-alt:     #4E5058;
    --ui-text-soft-2:       #4E5058;
    --ui-text-secondary:    #4E5058;
    --ui-text-muted:        #5C5E66;
    --ui-text-muted-alt:    #5C5E66;
    --ui-text-faint:        #6D6F78;
    --ui-text-faint-alt:    #6D6F78;
    --ui-text-dim:          #747F8D;
    --ui-text-ghost:        #A3A6AA;
    --ui-text-slate-strong: #0F172A;
    --ui-text-slate:        #334155;
    --ui-text-gray-soft:    rgba(46, 51, 56, 0.85);
    --bg-modifier-hover:    rgba(116, 127, 141, 0.16);
    --link-color:           #0369A1;
    --tooltip-bg:           #FFFFFF;
    --tooltip-fg:           #060607;
    --toast-success-bg:     #E7F7EE;
    --toast-success-fg:     #157F3C;
    --toast-warning-bg:     #FFF4DB;
    --toast-warning-fg:     #8A5A00;
    --toast-info-bg:        #E6F7FA;
    --toast-blocked-bg:     #FDECEC;
    --toast-blocked-fg:     #B42318;
    --danger-text:          #B42318;
    --surface-menu:         #FFFFFF;
    --surface-dialog:       #FFFFFF;
    --surface-card:         #FFFFFF;
    --surface-tile:         #FFFFFF;
}
[data-theme="light"] .auth-screen { background: #f5f5f5; }
[data-theme="light"] .auth-card { background: white; }

/* ═══════════════ THEME: AMOLED ═══════════════ */
/* Ana yuzeyler (ray, kenar cubuklari, sohbet, baslik) GERCEK SIYAH; yukseltilmis
   yuzeyler (kart, menu, giris) cok koyu notr tonlar; ayrim kenarliklarla. */
[data-theme="amoled"] {
    --bg-primary:    #000000;
    --bg-secondary:  #000000;
    --bg-tertiary:   #000000;
    --bg-surface:    #0A0A0A;
    --bg-hover:      #161616;
    --bg-active:     #1F1F1F;
    --bg-floating:   #0D0D0D;
    --bg-input:      #0A0A0A;
    --border:        rgba(255, 255, 255, 0.06);
    --border-hover:  rgba(255, 255, 255, 0.10);
    --ui-floating:          #0D0D0D;
    --ui-floating-alt:      #0D0D0D;
    --ui-card-deep:         #0D0D0D;
    --ui-stage:             #000000;
    --ui-deep:              #0A0A0A;
    --ui-tertiary:          #0A0A0A;
    --ui-deep-alt:          #0A0A0A;
    --ui-secondary-alt:     #0D0D0D;
    --ui-secondary:         #121212;
    --ui-primary:           #0D0D0D;
    --ui-raised:            #121212;
    --ui-hover:             #1A1A1A;
    --ui-folder:            #1A1A1A;
    --ui-hover-alt:         #1C1C1C;
    --ui-active:            #242424;
    --ui-scroll-thumb:      #2A2A2A;
    --ui-scroll-track:      #0D0D0D;
    --bg-modifier-hover:    rgba(255, 255, 255, 0.08);
    --ui-folder-open-wrap:  rgba(255, 255, 255, 0.04);
    --ui-folder-open:       #1A1A1A;
    --ui-surface-hover:     #161616;
    --ui-menu-alt:          #0D0D0D;
    --ui-menu-navy:         #0D0D0D;
    --ui-gh-input:          #0A0A0A;
    --ui-gh-raised:         #121212;
    --ui-punish-bg:         #000000;
    --ui-force-bg:          #000000;
    --ui-btn-disabled:      #1A1A1A;
    --bg-primary-rgb:       0 0 0;
    --bg-secondary-rgb:     0 0 0;
    --bg-tertiary-rgb:      0 0 0;
    --bg-surface-rgb:       10 10 10;
    --ui-surface-deep-rgb:  5 5 5;
    --ui-catchup-rgb:       13 13 13;
    --surface-card-rgb:     13 13 13;
    --aurora-1:             #0B1235;
    --aurora-2:             #120D36;
    --aurora-3:             #190C2C;
    --aurora-4:             #0D1238;
    --aurora-5:             #06071A;
    --aurora-6:             #000000;
    --aurora-blob-a:        rgba(124, 132, 255, 0.35);
    --aurora-blob-b:        rgba(190, 110, 255, 0.30);
    --tooltip-bg:           #0D0D0D;
    --toast-success-bg:     #07140D;
    --toast-warning-bg:     #140F04;
    --toast-info-bg:        #050A14;
    --toast-blocked-bg:     #140708;
    --surface-menu:         #0D0D0D;
    --surface-dialog:       #0A0A0A;
    --surface-card:         #0D0D0D;
    --surface-tile:         #121212;
}
/* AMOLED: zemini --bg-primary/secondary (#000) olan YUZEN paneller siyah zemin +
   siyah golge/kenarlikla KAYBOLUR → ince acik kenarlik tasir (zemin siyah kalir:
   ic bolumleri ve avatar halkasi ayni tokeni kullanir; koyu/acik temada bu
   paneller zaten ayrisir). */
[data-theme="amoled"] .inbox-popup,
[data-theme="amoled"] .user-profile-popup,
[data-theme="amoled"] .audio-device-popup,
[data-theme="amoled"] .quick-switcher-modal {
    border: 1px solid var(--border-hover);
}
/* AMOLED: Ses ve Video ayarlarindaki giris/cikis slider track'i (--bg-input) kart
   zeminiyle (--bg-surface) AYNI renkti (#0A0A0A) → track gorunmuyordu. Yalniz bu iki
   slider (.vs-slider-wrap); Kanal Ayarlari .vc-slider kendi track rengini korur. */
[data-theme="amoled"] .vs-slider-wrap > .vs-slider {
    background: var(--bg-active);
}

/* ═══════════════ SERVER BADGE ═══════════════ */
.server-icon {
    position: relative; z-index: 1;
}
.server-badge {
    position: absolute;
    bottom: -2px; right: -2px;
    background: var(--dnd);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-primary);
    line-height: 1;
    z-index: 2;
}
/* Suppress server badges inside profile popups and user avatar wrappers */
#user-profile-popup .server-badge,
#profile-card .server-badge,
#profile-popup .server-badge,
.user-avatar-wrap .server-badge,
.upp-avatar-wrap .server-badge,
.pc-avatar-wrapper .server-badge,
.pp-avatar-wrapper .server-badge { display: none !important; }

/* Okunmamış kısa çizgi en DÜŞÜK öncelik (aktif > hover > okunmamış): yalnız seçili OLMAYAN,
   fare üzerinde OLMAYAN ikonda — koşulsuz hâli aynı özgüllükteki hover/aktif kurallarını eziyordu. */
.server-icon.has-unread:not(.active):not(:hover)::before { height: 8px; }
/* Only hide ::after for has-unread when NOT in folder-target mode */
.server-icon.has-unread:not(.folder-target)::after {
    display: none;
}
/* Folder unread indicator mirrors server-icon indicator — aynı öncelik: açık > hover > okunmamış */
.server-folder.has-unread:not(.open):not(:hover)::before { height: 8px; }

/* ─── Server overflow notification indicators (top/bottom of server rail) ─── */
.server-overflow-new {
    position: fixed;
    z-index: 210;
    width: 44px; height: 26px;
    border: none; border-radius: 13px;
    background: #ed4245; color: #fff;
    font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,.45);
    display: flex; align-items: center; justify-content: center;
    transition: background 0.1s;
    user-select: none;
}
.server-overflow-new.hidden { display: none; }
.server-overflow-new:hover { background: #c03537; }

/* Voice indicator on server icon
   SERVER-ICON-STATUS-PARITY-1 (5100 paritesi): hoparlör, kamera ve yayın varyantlarının
   hepsi TEK görsel dil — koyu yüzey (--bg-surface; saf siyah DEĞİL) + açık ikon
   (--text-primary); eski yeşil (--online) zemin KALDIRILDI. Konum/boyut/halka/z-index
   DEĞİŞMEDİ -> okunmamış çubuğu, mention rozeti ve hover/active davranışı etkilenmez. */
.server-voice-indicator {
    position: absolute;
    top: -3px; right: -3px;
    width: 20px; height: 20px;
    background: var(--bg-surface);
    color: var(--text-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-primary);
    z-index: 3;
    pointer-events: none;
}
/* Medya varyantı (kamera / yayın): yalnız glif ölçüsü sabitlenir; renk tabandan gelir. */
.server-voice-indicator.has-media svg { width: 11px; height: 11px; display: block; }

/* Davet duraklatma rozeti — ses rozetiyle AYNI görsel dil (20px daire + 2px halka).
   Konum SOL-ALT: sağ-üst ses/medya rozeti, sağ-alt mention rozeti ve sol kenar
   okunmamış çubuğu ile çakışmaz. */
.server-pause-indicator {
    position: absolute;
    bottom: -3px; left: -3px;
    width: 20px; height: 20px;
    background: var(--bg-surface);
    color: var(--text-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-primary);
    z-index: 3;
    pointer-events: none;
}
.server-pause-indicator svg { width: 11px; height: 11px; display: block; }

/* ═══════════════ ROLE-GROUPED MEMBERS ═══════════════ */
.members-role-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 16px 8px 4px;
}
.member-info-col {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.member-role-tag {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.8;
}
/* Member nameplate "Sesli aramada" line */
.member-voice-line {
    display: inline-flex; align-items: center; gap: 4px;
    /* "Sesli aramada" = yardımcı durum bilgisi: kullanıcı adı baskın kalsın diye yazı
       parlak değil; username'den biraz daha sönük, hafif cyan tonlu MUTED gri + daha
       hafif ağırlık. (İkon ayrıca yeşil — aşağıda.) */
    font-size: 11px; font-weight: 500; color: #7E99A1;
}
/* İkon yeşil/cyan accent (kendi currentColor'ı); metin parent'tan muted kalır */
.member-voice-line svg { flex-shrink: 0; color: var(--online); }

/* ─── Ses/yayın aktivite satırları (Karar #22) ─── */
/* Sol alt kendi paneli: aktifken status yazısının yerini alır (JS .activity-on toggle'ı) */
.user-activity-label {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 500; color: var(--online);
    line-height: 1.3; max-width: 100%; min-width: 0;
}
.user-activity-label svg { flex-shrink: 0; }
.user-activity-label .user-activity-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-details.activity-on .user-status-label { display: none; }
/* DM listesi: aktif aramanın karşı tarafında ad altı kompakt satır (member-voice-line tonu) */
.dm-activity-line {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 500; color: #7E99A1;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.dm-activity-line svg { flex-shrink: 0; color: var(--online); }
/* DM başlığı alt satırı aktivite gösterirken yeşil ton */
#chat-subtitle.dm-activity-subtitle { color: var(--online); }

/* ─── Profil popup "Katılım Tarihi": platform • sunucu çifti (Discord paritesi) ─── */
#pp-joined { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.pp-joined-item { display: inline-flex; align-items: center; gap: 5px; }
.pp-joined-icon {
    width: 16px; height: 16px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
}
/* VoidChat logosu yuvarlak-KARE (auth logosuyla aynı biçim) — daireye kırpılmaz */
.pp-joined-icon-app { border-radius: 4px; }
.pp-joined-icon-letter {
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 9px; font-weight: 700; color: #fff;
}
.pp-joined-sep { color: var(--text-muted); }

/* ─── Profile card/popup "Sesli aramada" voice card ─── */
.pc-voice-section { margin: 4px 0 2px; }
.pp-voice-section { margin-bottom: 10px; }
.pcv-label {
    display: flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
    color: var(--online); margin-bottom: 6px;
}
.pcv-card {
    display: flex; align-items: center; gap: 10px;
    background: rgb(var(--overlay-rgb) / 0.04);
    border: 1px solid var(--border);
    border-radius: 10px; padding: 9px 11px;
}
.pcv-ch-icon { flex-shrink: 0; color: var(--text-secondary); display: flex; }
.pcv-ch-info { flex: 1; min-width: 0; }
.pcv-server { font-size: 11px; color: var(--text-muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcv-channel { font-size: 13px; color: var(--text-primary); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcv-users { display: flex; align-items: center; flex-shrink: 0; }
.pcv-user { width: 22px; height: 22px; border-radius: 50%; margin-left: -6px; border: 2px solid var(--bg-surface); overflow: hidden; font-size: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; }
.pcv-user:first-child { margin-left: 0; }
.pcv-extra {
    width: 22px; height: 22px; border-radius: 50%; margin-left: -6px;
    border: 2px solid var(--bg-surface); background: var(--bg-hover);
    display: flex; align-items: center; justify-content: center;
    font-size: 9px; font-weight: 700; color: var(--text-secondary);
}
.pcv-join-btn {
    width: 100%; margin-top: 8px; padding: 8px 12px;
    background: var(--online); color: #fff; border: none; border-radius: 8px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: filter var(--transition), transform 0.08s ease;
}
.pcv-join-btn:hover { filter: brightness(1.08); }
.pcv-join-btn:active { transform: scale(0.98); }
/* ── "Yayın yapıyor" (streaming / screen-share) varyantı — dikey premium kart ── */
.pcv-label-live { color: var(--dnd); }                 /* küçük kart: kırmızı "Yayın yapıyor" */
.pcv-label-activity { color: var(--text-muted); }      /* popup: nötr "MEVCUT ETKİNLİK" eyebrow */
.pcv-card-stream {
    flex-direction: column; align-items: stretch; gap: 9px;
    background: rgb(var(--overlay-rgb) / 0.025);
    box-shadow: 0 1px 3px rgba(0,0,0,0.25), inset 0 1px 0 rgb(var(--overlay-rgb) / 0.03);
}
/* Koyu önizleme placeholder'ı — hafif kırmızı live ışıltı + ortalı yayın ikonu */
.pcv-stream-thumb {
    position: relative; width: 100%; height: 92px; border-radius: 9px; overflow: hidden;
    background:
        radial-gradient(120% 130% at 50% -10%, rgba(239,68,68,0.12), transparent 62%),
        linear-gradient(150deg, #0a0c12, #151a26);
    border: 1px solid rgba(255,255,255,0.06);
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.pcv-stream-thumb-icon { display: flex; color: var(--text-secondary); opacity: 0.5; }
/* Thumbnail köşesindeki "YAYINDA" canlı rozeti + nabız atan nokta */
.pcv-stream-live {
    position: absolute; top: 7px; left: 7px;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 6px 2px 5px; border-radius: 5px;
    background: var(--dnd); color: #fff;
    font-size: 9px; font-weight: 700; letter-spacing: .3px; line-height: 1;
    box-shadow: 0 2px 7px rgba(239,68,68,0.4);
}
.pcv-stream-live-dot {
    width: 5px; height: 5px; border-radius: 50%; background: #fff;
    animation: pcvLivePulse 1.5s ease-in-out infinite;
}
@keyframes pcvLivePulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.pcv-stream-body { display: flex; align-items: center; gap: 10px; }
.pcv-stream-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pcv-stream-kind {
    display: flex; align-items: center; gap: 4px; margin-top: 2px;
    font-size: 11px; font-weight: 600; color: var(--text-secondary);
}
.pcv-stream-kind svg { flex-shrink: 0; }
.pcv-stream-kind span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Per-section boyut: küçük kart kompakt, popup Aktivite daha ferah */
#pc-voice-section .pcv-stream-thumb { height: 64px; }
#pc-voice-section .pcv-stream-thumb-icon svg { width: 24px; height: 24px; }
#pp-voice-section .pcv-card-stream { padding: 11px; gap: 11px; }
#pp-voice-section .pcv-stream-thumb { height: 132px; }

/* ═══════════════ SEARCH CLICK-TO-JUMP ═══════════════ */
.search-result-clickable:hover {
    background: var(--bg-active);
    cursor: pointer;
}
.msg-highlight {
    animation: msgHighlight 2s ease;
}
@keyframes msgHighlight {
    0%, 30% { background: rgba(88, 101, 242, 0.15); }
    100% { background: transparent; }
}


/* ═══════════════ USER CONTEXT MENU ═══════════════ */
#user-ctx-menu {
    position: fixed;
    z-index: 500;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px;
    /* 5100 SABIT genislik sistemi: kutu shrink-to-fit DEGIL — kisa/uzun ad,
       owner/admin/normal uye, timeout aktif/pasif, Roller acik/kapali her
       senaryoda ayni olcu. max-width yalniz COK dar viewport guvenligi. */
    width: 220px;
    max-width: calc(100vw - 16px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    animation: ctxIn 0.12s ease;
}
/* Sunucu ses moderasyonu satirlari gorunurken (olculen en uzun etiket
   'Sunucu Sağırlaştırmasını Kaldır') → 256px. */
#user-ctx-menu.uctx-srvvoice { width: 256px; }
/* 'Kullanıcıya Zaman Aşımı Uygula' satiri gorunurken 290px; iki sinif birden
   aktifse kaynak SIRASI kazanir → 290px. */
#user-ctx-menu.uctx-wide { width: 290px; }
@keyframes ctxIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
#user-ctx-menu .ctx-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.1s;
    /* Sabit genislikte satir KIRILMAZ; ikon slotu sikismaz. */
    white-space: nowrap;
    overflow: hidden;
    text-align: left;
}
#user-ctx-menu .ctx-item > svg { flex-shrink: 0; }
/* Metin kabi: tasarsa ellipsis — menu genislemez (uzun kullanici adi dahil). */
#user-ctx-menu .ctx-item > span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Alt menu oku span'den SONRA gelir; esnememeli. */
#user-ctx-menu .ctx-item > .ctx-submenu-arrow { flex: 0 0 auto; margin-left: 4px; }
#user-ctx-menu .ctx-item:hover {
    background: var(--accent);
    color: white;
}
#user-ctx-menu .ctx-item.danger:hover {
    background: var(--dnd);
}
#user-ctx-menu .ctx-sep {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* ═══════════════ CONFIRM DIALOG ═══════════════ */
#generic-confirm-modal { z-index: 600; }
/* Kanal silme modalı (`#delete-channel-modal`) BU görsel dili paylaşır —
   ölçüler tek yerde tanımlıdır, kopyalanmaz. */
#generic-confirm-modal .modal-content,
#delete-channel-modal .modal-content {
    /* Onay diyaloğunun GERÇEK genişliği 440'dır: `#confirm-dialog-content`
       markup'ında satır içi `max-width:440px` taşır ve buradaki değeri hep ezer.
       Kanal modalinin aynı genişlikte olması için ortak değer 440'a hizalandı —
       onay diyaloğunun görünümü DEĞİŞMEZ (satır içi stil kazanmaya devam eder). */
    max-width: 440px;
    background: var(--surface-dialog, var(--ui-tertiary));
    border: 1px solid rgb(var(--overlay-rgb) / 0.08);
    border-radius: 14px;
    overflow: hidden;
    padding: 28px 28px 24px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.6);
    animation: confirmIn 0.2s ease;
}
@keyframes confirmIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}
#generic-confirm-modal .modal-content h2,
#delete-channel-modal .modal-content h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--ui-text-header);
    margin: 0 0 10px;
    line-height: 1.3;
}
#generic-confirm-modal .modal-content p,
#delete-channel-modal .modal-content p {
    color: var(--ui-text-muted-alt);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 24px;
}
#generic-confirm-modal .modal-actions,
#delete-channel-modal .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 0;
}
#generic-confirm-modal .btn-secondary,
#delete-channel-modal .btn-secondary {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    background: transparent;
    border: 1px solid rgb(var(--overlay-rgb) / 0.12);
    color: var(--ui-text-secondary);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
#generic-confirm-modal .btn-secondary:hover,
#delete-channel-modal .btn-secondary:hover {
    background: rgb(var(--overlay-rgb) / 0.06);
    border-color: rgb(var(--overlay-rgb) / 0.2);
    color: var(--ui-text-strong);
}
#generic-confirm-modal .btn-primary,
#delete-channel-modal .btn-danger {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    min-width: 96px;
    width: auto;
    margin: 0;
    transition: filter 0.15s, transform 0.1s, box-shadow 0.15s;
    letter-spacing: 0;
}
#generic-confirm-modal .btn-primary:hover,
#delete-channel-modal .btn-danger:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
#confirm-ok-btn {
    min-width: 96px;
}
#confirm-ok-btn.danger {
    background: var(--dnd);
}
#confirm-ok-btn.danger:hover {
    background: #d83c3e;
}

/* ════════════════ LEAVE SERVER MODAL ════════════════ */
.leave-server-modal .modal-content {
    max-width: 420px;
}
.leave-server-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.leave-server-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
    color: #f87171;
    background: rgba(248, 113, 113, 0.10);
    border: 1px solid rgba(248, 113, 113, 0.20);
    flex-shrink: 0;
}
.leave-server-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.25;
}
.leave-server-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 0;
    word-break: break-word;
}
.leave-server-subdesc {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 13px;
}
.leave-server-warning {
    margin-top: 16px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    background: rgba(127, 29, 29, 0.18);
    border: 1px solid rgba(248, 113, 113, 0.15);
    color: var(--danger-text, #fca5a5);
    font-size: 13px;
    line-height: 1.45;
    text-align: left;
    width: 100%;
}
.leave-server-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 22px;
    width: 100%;
}
.leave-server-danger-btn {
    flex-shrink: 0;
}

/* ════════════════ REMOVE FRIEND MODAL ════════════════ */
.rfm-content {
    position: relative;
    background: var(--surface-dialog, var(--ui-tertiary));
    border: 1px solid rgb(var(--overlay-rgb) / 0.08);
    border-radius: 14px;
    padding: 24px 24px 20px;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 16px 48px rgba(0,0,0,0.65);
    animation: confirmIn 0.18s ease;
}
.rfm-close {
    position: absolute;
    top: 12px; right: 12px;
    width: 28px; height: 28px;
    border-radius: 50%;
    border: none;
    background: rgb(var(--overlay-rgb) / 0.06);
    color: var(--ui-text-secondary);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.rfm-close:hover { background: rgba(237,66,69,0.2); color: #ed4245; }
.rfm-title {
    font-size: 18px; font-weight: 700;
    color: var(--ui-text-header);
    margin: 0 32px 10px 0;
    line-height: 1.3;
}
.rfm-text {
    font-size: 14px;
    color: var(--ui-text-muted-alt);
    line-height: 1.6;
    margin: 0 0 22px;
}
.rfm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.rfm-btn-cancel {
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 14px; font-weight: 600;
    background: transparent;
    border: 1px solid rgb(var(--overlay-rgb) / 0.12);
    color: var(--ui-text-secondary);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.rfm-btn-cancel:hover {
    background: rgb(var(--overlay-rgb) / 0.06);
    border-color: rgb(var(--overlay-rgb) / 0.2);
    color: var(--ui-text-strong);
}
.rfm-btn-danger {
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 14px; font-weight: 700;
    background: #ed4245;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: filter 0.15s, transform 0.1s;
}
.rfm-btn-danger:hover  { filter: brightness(1.12); }
.rfm-btn-danger:active { transform: scale(0.97); }

/* ════════════════ BLOCK USER MODAL ════════════════ */
.bum-content {
    position: relative;
    background: var(--surface-dialog, var(--ui-tertiary));
    border: 1px solid rgb(var(--overlay-rgb) / 0.08);
    border-radius: 14px;
    padding: 24px 24px 20px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 16px 48px rgba(0,0,0,0.65);
    animation: confirmIn 0.18s ease;
}
.bum-close {
    position: absolute;
    top: 12px; right: 12px;
    width: 28px; height: 28px;
    border-radius: 50%;
    border: none;
    background: rgb(var(--overlay-rgb) / 0.06);
    color: var(--ui-text-secondary);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.bum-close:hover { background: rgba(237,66,69,0.2); color: #ed4245; }
.bum-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgb(var(--overlay-rgb) / 0.07);
}
.bum-avatar-wrap {
    position: relative;
    margin-bottom: 12px;
}
.bum-avatar {
    width: 68px; height: 68px;
    border-radius: 50%;
    background: #5865f2;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; font-weight: 700;
    color: #fff;
    overflow: hidden;
}
.bum-block-badge {
    position: absolute;
    bottom: 1px; right: 1px;
    width: 22px; height: 22px;
    background: #ed4245;
    border-radius: 50%;
    border: 2px solid var(--ui-tertiary);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
}
.bum-title {
    font-size: 18px; font-weight: 700;
    color: var(--ui-text-header);
    margin: 0 0 5px;
    line-height: 1.3;
}
.bum-subtitle {
    font-size: 13px;
    color: var(--ui-text-muted-alt);
    margin: 0;
    line-height: 1.5;
}
.bum-effects {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}
.bum-effect-item {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    background: rgb(var(--overlay-rgb) / 0.04);
    border: 1px solid rgb(var(--overlay-rgb) / 0.05);
    border-radius: 8px;
    padding: 10px 12px;
}
.bum-effect-icon {
    flex-shrink: 0;
    width: 28px; height: 28px;
    background: rgba(88,101,242,0.15);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: #7289da;
    margin-top: 1px;
}
.bum-effect-label {
    font-size: 13px; font-weight: 600;
    color: var(--ui-text-bright);
    margin-bottom: 3px;
}
.bum-effect-desc {
    font-size: 12px;
    color: var(--ui-text-muted-alt);
    line-height: 1.5;
}
.bum-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.bum-btn-cancel {
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 14px; font-weight: 600;
    background: transparent;
    border: 1px solid rgb(var(--overlay-rgb) / 0.12);
    color: var(--ui-text-secondary);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.bum-btn-cancel:hover {
    background: rgb(var(--overlay-rgb) / 0.06);
    border-color: rgb(var(--overlay-rgb) / 0.2);
    color: var(--ui-text-strong);
}
.bum-btn-danger {
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 14px; font-weight: 700;
    background: #ed4245;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: filter 0.15s, transform 0.1s;
}
.bum-btn-danger:hover  { filter: brightness(1.12); }
.bum-btn-danger:active { transform: scale(0.97); }
.bum-btn-accent {
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 14px; font-weight: 700;
    background: var(--accent);
    border: none;
    color: #fff;
    cursor: pointer;
    transition: filter 0.15s, transform 0.1s;
}
.bum-btn-accent:hover  { filter: brightness(1.12); }
.bum-btn-accent:active { transform: scale(0.97); }

/* ════════════════ REPORT MODAL POLISH ════════════════ */
#report-modal .modal-content {
    background: var(--surface-dialog, var(--ui-tertiary));
    border: 1px solid rgb(var(--overlay-rgb) / 0.08);
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.65);
    padding: 24px;
}
#report-modal h2 {
    font-size: 18px; font-weight: 700;
    color: var(--ui-text-header);
    margin-bottom: 5px;
}
#report-modal .text-muted { font-size: 13px; color: var(--ui-text-muted-alt); }
#report-modal .modal-close {
    background: rgb(var(--overlay-rgb) / 0.06);
    border-radius: 50%;
    color: var(--ui-text-secondary);
    transition: background 0.15s, color 0.15s;
}
#report-modal .modal-close:hover { background: rgba(237,66,69,0.2); color: #ed4245; }
#report-modal .input-label {
    font-size: 11px; font-weight: 700;
    color: var(--ui-text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
#report-modal .input-field {
    background: var(--ui-secondary);
    border-color: rgb(var(--overlay-rgb) / 0.1);
    border-radius: 8px;
    color: var(--ui-text-bright);
}
#report-modal .input-field:focus { border-color: rgba(88,101,242,0.5); outline: none; }
#report-modal .btn-danger {
    background: #ed4245;
    border-radius: 8px;
    font-weight: 700;
    padding: 9px 20px;
    transition: filter 0.15s;
}
#report-modal .btn-danger:hover { filter: brightness(1.1); }
#report-modal .modal-actions { gap: 10px; }

/* ─── Kullanıcıyı Bildir: boyut + Sebep dropdown cilası (salt görünüm) ────
   Masaüstünde daha ferah bir form: modal-sm (380px) yerine 520px, iç boşluklar
   artırıldı; Açıklama alanının köşe tutamacı kaldırıldı; Sebep listesi projenin
   MEVCUT createCustomSelect bileşeniyle sarılır (native <select> değeri/validation
   AYNEN kalır, yalnız gizlenir). Kapsam #report-modal ile sınırlıdır. */
#report-modal .modal-content { max-width: 520px; padding: 28px 30px 26px; }
#report-modal h2 { font-size: 20px; margin-bottom: 6px; }
#report-modal .text-muted { line-height: 1.45; }
#report-modal .input-label { margin-bottom: 8px; display: block; }
#report-modal .input-field { padding: 11px 12px; font-size: 14px; }
#report-modal textarea.input-field { resize: none; min-height: 132px; line-height: 1.5; }
#report-modal #report-reason-select { display: none; }  /* değer + doğrulama için DOM'da kalır */
#report-modal .custom-select-wrap .custom-select-trigger {
    min-height: 44px; padding: 10px 40px 10px 12px;
    background: var(--ui-secondary); border: 1px solid rgb(var(--overlay-rgb) / 0.1); border-radius: 8px;
    color: var(--ui-text-bright); font-size: 14px;
}
#report-modal .custom-select-wrap .custom-select-trigger:hover { background: var(--ui-primary); border-color: rgb(var(--overlay-rgb) / 0.16); }
#report-modal .custom-select-wrap .custom-select-trigger:focus,
#report-modal .custom-select-wrap .custom-select-trigger.open {
    border-color: var(--brand); box-shadow: 0 0 0 2px rgba(76,110,245,0.18); background: var(--ui-primary);
}
#report-modal .custom-select-menu {
    background: var(--surface-menu, var(--ui-tertiary)); border: 1px solid rgb(var(--overlay-rgb) / 0.1); border-radius: 10px;
    padding: 6px; max-height: 320px; box-shadow: 0 12px 32px rgba(0,0,0,0.55);
    display: flex; flex-direction: column; gap: 2px;
}
#report-modal .custom-select-option {
    min-height: 38px; padding: 9px 12px; border-radius: 6px;
    font-size: 14px; color: var(--ui-text-normal); line-height: 1.3; flex-shrink: 0;
}
#report-modal .custom-select-option:hover,
#report-modal .custom-select-option:focus-visible { background: rgb(var(--overlay-rgb) / 0.07); color: var(--ui-text-strong); outline: none; }
#report-modal .custom-select-option.selected { background: rgba(76,110,245,0.16); color: var(--ui-text-strong); font-weight: 600; }
#report-modal .custom-select-option.selected .cs-check { stroke: var(--brand); }
#report-modal #report-evidence-btn {
    padding: 12px 14px; min-height: 46px; font-size: 13px; font-weight: 600;
    background: var(--ui-secondary); border: 1px dashed rgb(var(--overlay-rgb) / 0.16); border-radius: 8px; color: var(--ui-text-normal);
    display: flex; align-items: center; justify-content: center;
}
#report-modal #report-evidence-btn:hover { background: var(--ui-primary); border-color: rgb(var(--overlay-rgb) / 0.28); }
#report-modal .modal-actions .btn-secondary, #report-modal .modal-actions .btn-danger { min-width: 96px; padding: 9px 20px; }
/* Round 2: ortalanmış × düğmesi + odak halkası; alanlar modal genişliğinde */
#report-modal .modal-close {
    top: 14px; right: 14px; width: 32px; height: 32px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; line-height: 1;
}
#report-modal .modal-close:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
#report-modal .input-field { width: 100%; box-sizing: border-box; }
#report-modal .report-desc-counter { margin-top: 6px; font-size: 11px; color: var(--ui-text-faint); text-align: right; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
#report-modal .report-desc-counter.at-limit { color: var(--idle); }

/* ═══════════════ DM CALL FULLSCREEN ═══════════════ */
.dm-call-screen {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dm-call-screen-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    opacity: 0.98;
}
.dm-call-screen-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    animation: modalIn 0.3s ease;
}
.dm-call-screen-avatar {
    width: 120px; height: 120px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 48px; font-weight: 800;
    color: white;
    box-shadow: 0 0 40px rgba(88, 101, 242, 0.3);
    animation: callPulse 2s ease-in-out infinite;
}
@keyframes callPulse {
    0%, 100% { box-shadow: 0 0 40px rgba(88, 101, 242, 0.3); }
    50% { box-shadow: 0 0 60px rgba(88, 101, 242, 0.5); }
}
.dm-call-screen-name {
    font-size: 28px; font-weight: 800;
    color: white;
    margin: 0;
}
.dm-call-screen-status {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}
.dm-call-screen-timer {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    font-variant-numeric: tabular-nums;
}
.dm-call-screen-controls {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}
.dcs-ctrl-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 72px;
    border: none;
}
.dcs-ctrl-btn span {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.7;
}
.dcs-ctrl-btn:hover { background: rgba(255, 255, 255, 0.2); }
.dcs-ctrl-btn.active { background: rgba(255, 255, 255, 0.25); }
.dcs-end-btn { background: var(--dnd); }
.dcs-end-btn:hover { background: #d83c3e; }

/* ═══════════════ USER STATUS LABEL ═══════════════ */
.user-status-label {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.2;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ═══════════════ USER PROFILE POPUP (Discord-style) ═══════════════ */
.user-profile-popup {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    width: 300px;
    background: var(--bg-secondary);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.45);
    z-index: 200;
    overflow: visible;
    animation: uppSlideUp 0.18s ease-out;
}
@keyframes uppSlideUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes statusDurationIn {
    from { opacity: 0; transform: translateX(-6px); }
    to   { opacity: 1; transform: translateX(0); }
}
.upp-banner {
    height: 100px;
    border-radius: 8px 8px 0 0;
    position: relative;
}
.upp-body {
    padding: 0 12px 12px;
    position: relative;
    overflow: visible;
}
.upp-avatar-row {
    display: flex;
    align-items: flex-end;
    margin-top: -40px;
    margin-bottom: 8px;
    position: relative;
}
.upp-avatar-wrap {
    position: relative;
    display: inline-block;
}
.upp-avatar {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 34px;
    color: white;
    border: 5px solid var(--bg-secondary);
    cursor: pointer;
    overflow: hidden;
    position: relative;
}
/* Kullanıcı kartı avatarıyla AYNI hover karartması (.profile-card-avatar deseni) */
.upp-avatar::after {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    background: rgba(0,0,0,0); transition: background 0.2s ease; pointer-events: none;
}
.upp-avatar-wrap:hover .upp-avatar::after { background: rgba(0,0,0,0.3); }
.upp-status-dot {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid var(--bg-secondary);
}
.upp-badge-row {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.upp-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}
.upp-info-card {
    background: var(--bg-surface);
    border-radius: 8px;
    padding: 12px;
}
.upp-display-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}
.upp-username {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}
.upp-username-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}
.upp-pronouns {
    font-size: 13px;
    color: var(--text-muted);
    min-width: 0;
    word-break: break-word;
}
.upp-pronouns::before { content: "·"; margin: 0 5px 0 0; font-size: 26px; line-height: 0; position: relative; top: 3px; }
.upp-copy-name-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: background 0.12s, color 0.12s;
    flex-shrink: 0;
    padding: 0;
}
.upp-copy-name-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.upp-separator {
    height: 1px;
    background: var(--border);
    margin: 10px 0;
}
.upp-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.upp-about-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}
.upp-about-section:empty { display: none; }
.upp-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.upp-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: background 0.12s, color 0.12s;
    border: none;
    background: none;
    text-align: left;
}
.upp-menu-item:hover {
    background: var(--accent);
    color: white;
}
.upp-menu-item:hover svg { stroke: white; }
.upp-menu-chevron {
    margin-left: auto;
    opacity: 0.5;
}
.upp-menu-status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}
.upp-menu-edit-icon {
    opacity: 0.4;
    flex-shrink: 0;
}
.upp-menu-item:hover .upp-menu-edit-icon { opacity: 0.8; stroke: white; }

/* ── Submenu Trigger (shared for status & switch accounts) ── */
.upp-submenu-trigger {
    position: relative;
}
/* Hover köprüsü: tetikleyici (popup padding'i içinde) ile sağda açılan alt menü
   arasındaki ~28px ölü bölgede fare kaybolup menünün kapanmasını önler. Yalnızca
   ilgili alt menü açıkken (:not(.hidden)) görünür; görünmezdir ve alt menü
   (z-index 350) üstte kaldığından hiçbir tıklamayı engellemez. Mantık/JS değişmez. */
.upp-submenu-trigger:has(> .upp-status-submenu:not(.hidden))::after,
.upp-submenu-trigger:has(> .upp-switch-submenu:not(.hidden))::after {
    content: '';
    position: absolute;
    top: -20px;
    bottom: -20px;
    right: -44px;
    width: 44px;
    background: transparent;
}

/* ── Status Submenu (right side) ── */
.upp-status-submenu {
    position: fixed;
    width: 240px;
    max-height: calc(100vh - 32px);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    padding: 6px;
    z-index: 350;
    animation: uppSlideUp 0.12s ease-out;
}
.status-sub-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 8px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    transition: background 0.12s, color 0.12s;
    border: none;
    background: none;
    text-align: left;
    position: relative;
}
.status-sub-option:hover {
    background: var(--accent);
    color: white;
}
.status-sub-option:hover .status-sub-desc {
    color: rgba(255,255,255,0.7);
}
.status-sub-option.active-status {
    background: rgba(88,101,242,0.15);
}
.status-sub-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}
.status-sub-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.status-sub-label {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
}
.status-sub-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.3;
}
.status-sub-until {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
    font-weight: 400;
}
.status-sub-option:hover .status-sub-until,
.status-sub-trigger:hover > .status-sub-option .status-sub-until {
    color: rgba(255,255,255,0.6);
}

/* Status trigger until text */
.upp-status-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}
.upp-status-until {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}
.status-sub-chevron {
    margin-left: auto;
    opacity: 0.5;
    flex-shrink: 0;
    margin-top: 3px;
}

/* ── Status Duration Submenu ── */
.status-sub-trigger {
    position: relative;
}
/* Hover köprüsü (level-2): durum seçeneği ile sağda açılan süre menüsü arasındaki
   boşlukta fare kaybını önler. Yalnızca süre menüsü açıkken aktif, görünmez. */
.status-sub-trigger:has(> .status-duration-submenu:not(.hidden))::after {
    content: '';
    position: absolute;
    top: -16px;
    bottom: -16px;
    right: -28px;
    width: 28px;
    background: transparent;
}
.status-sub-trigger > .status-sub-option {
    width: 100%;
}
.status-sub-trigger:hover > .status-sub-option {
    background: var(--accent);
    color: white;
    transition: background 0.12s, color 0.12s;
}
.status-sub-trigger:hover > .status-sub-option .status-sub-desc {
    color: rgba(255,255,255,0.7);
}
.status-sub-trigger.active-status > .status-sub-option {
    background: rgba(88,101,242,0.15);
}
.status-duration-submenu {
    position: fixed;
    width: 180px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    padding: 6px;
    z-index: 370;
    animation: statusDurationIn 0.1s ease-out;
}
.status-duration-option {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    transition: background 0.12s, color 0.12s;
    border: none;
    background: none;
    text-align: left;
}
.status-duration-option:hover {
    background: var(--accent);
    color: white;
}

/* ── Switch Accounts Submenu ── */
.upp-switch-submenu {
    position: fixed;
    width: 240px;
    max-height: min(320px, calc(100vh - 32px));
    overflow-y: auto;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    padding: 6px;
    z-index: 350;
    animation: uppSlideUp 0.12s ease-out;
}
.upp-switch-account-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.12s;
}
.upp-switch-account-item:hover {
    background: var(--accent);
}
.upp-switch-account-item:hover .upp-switch-tag {
    color: rgba(255,255,255,0.7);
}
.upp-switch-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: white;
    flex-shrink: 0;
}
.upp-switch-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
}
.upp-switch-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.upp-switch-tag {
    font-size: 11px;
    color: var(--text-muted);
}
.upp-switch-check {
    margin-left: auto;
    color: var(--accent);
    flex-shrink: 0;
}
.upp-switch-empty {
    font-size: 12px;
    color: var(--text-muted);
    padding: 12px 8px;
    text-align: center;
}
.upp-switch-separator {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}
.upp-switch-manage-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    border: none;
    background: none;
    transition: background 0.12s, color 0.12s;
    text-align: left;
}
.upp-switch-manage-btn:hover {
    background: var(--accent);
    color: white;
}

/* ── Manage Accounts Modal ── */
.manage-accounts-content {
    max-width: 480px;
    padding: 0;
    max-height: calc(100vh - 80px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.ma-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 24px 12px;
}
.ma-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.ma-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin: 4px 0 0;
}
.ma-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 4px;
    transition: color 0.12s;
    flex-shrink: 0;
}
.ma-close-btn:hover {
    color: var(--text-primary);
}
.ma-accounts-list {
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}
.ma-account-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.ma-account-item:last-child {
    border-bottom: none;
}
.ma-account-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}
.ma-account-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}
.ma-account-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ma-account-active {
    font-size: 12px;
    color: #3BA55D;
    font-weight: 500;
}
.ma-account-tag {
    font-size: 12px;
    color: var(--text-muted);
}
.ma-account-dots {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 6px;
    border-radius: 4px;
    transition: background 0.12s, color 0.12s;
    flex-shrink: 0;
    position: relative;
}
.ma-account-dots:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
/* Konumlandırma JS'te (left/top; modal sarmalayıcısına eklenir, butona
   anchor'lanır) — liste altında yer yoksa butonun ÜSTÜNE flip eder.
   Bkz. app.js::_placeMaDotsMenu. */
.ma-dots-menu {
    position: absolute;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    min-width: 120px;
    z-index: 300;
    padding: 4px;
}
.ma-dots-menu-item {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--dnd);
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 4px;
    text-align: left;
}
.ma-dots-menu-item:hover {
    background: var(--dnd);
    color: white;
}
.ma-add-account-btn {
    display: block;
    width: calc(100% - 48px);
    margin: 12px 24px 20px;
    padding: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: background 0.12s, color 0.12s;
}
.ma-add-account-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* ── Add Account Modal ── */
.add-account-content {
    max-width: 460px;
    padding: 0;
    overflow: hidden;
}
.aa-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 28px 28px 20px;
    border-bottom: 1px solid var(--border);
}
.aa-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}
.aa-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 6px 0 0;
    line-height: 1.55;
    max-width: 340px;
}
.aa-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    flex-shrink: 0;
    margin-top: -2px;
}
.aa-close-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}
.aa-form {
    padding: 20px 28px 0;
}
.aa-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    margin-top: 18px;
}
.aa-label:first-child {
    margin-top: 0;
}
.aa-required {
    color: var(--dnd);
}
.aa-input {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid rgb(var(--overlay-rgb) / 0.08);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    box-sizing: border-box;
}
.aa-input::placeholder { color: var(--text-muted); }
.aa-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.aa-error {
    display: none;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(248, 113, 113, 0.28);
    border-radius: 8px;
    background: rgba(127, 29, 29, 0.22);
    color: var(--danger-text, #fecaca);
    font-size: 13px;
    line-height: 1.4;
}
.aa-error:not(:empty) { display: flex; }
.aa-error-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    color: #f87171;
}
.aa-error-msg { flex: 1; }
.aa-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 28px 24px;
    margin-top: 20px;
    border-top: 1px solid var(--border);
}
.aa-footer .btn-secondary {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 10px 4px;
    border-radius: var(--radius-sm);
    transition: color var(--transition);
}
.aa-footer .btn-secondary:hover {
    color: var(--text-primary);
    text-decoration: underline;
}
.aa-footer .btn-primary {
    width: auto;
    margin-top: 0;
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    letter-spacing: 0.2px;
}

/* ── Forgot Password Link (Add Account & Login) ── */
.aa-forgot-link {
    display: inline-block;
    font-size: 13px;
    color: var(--text-link);
    text-decoration: none;
    margin-top: 10px;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity var(--transition), color var(--transition);
}
.aa-forgot-link:hover {
    opacity: 1;
    text-decoration: underline;
}
.auth-forgot-link {
    display: inline-block;
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
    margin-top: 4px;
    cursor: pointer;
}
.auth-forgot-link:hover {
    text-decoration: underline;
}
.auth-optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-muted);
    font-size: 11px;
}

/* ── Forgot Password Modal ── */
#forgot-password-modal {
    z-index: 1100;
}
.forgot-password-content {
    max-width: 440px;
    padding: 0;
    position: relative;
    min-height: 380px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}
.fp-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 4px;
    transition: color 0.12s;
    z-index: 2;
}
.fp-close-btn:hover {
    color: var(--text-primary);
}
.fp-step {
    display: none;
}
.fp-step.active {
    display: block;
    min-height: 270px;
}
.fp-header {
    padding: 24px 24px 8px;
}
.fp-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.fp-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin: 6px 0 0;
    line-height: 1.4;
}
.fp-debug-code {
    font-size: 12px;
    color: var(--accent);
    margin: 6px 0 0;
    font-weight: 600;
}
.fp-form {
    padding: 12px 24px 0;
}
.fp-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
    margin-top: 14px;
}
.fp-label:first-child,
.fp-type-tabs + .fp-label {
    margin-top: 0;
}
.fp-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}
.fp-input::placeholder { color: var(--text-muted); }
/* Kod geçersizleşince alan ve Doğrula butonu GÖRSEL olarak da pasifleşir
   (yalnız `disabled` niteliği yeterli geri bildirim vermiyordu). */
.fp-input:disabled {
    opacity: .55;
    cursor: not-allowed;
}
#forgot-password-modal .btn-primary:disabled {
    opacity: .45;
    cursor: not-allowed;
    filter: grayscale(.5);
}
.fp-input:focus {
    border-color: rgba(6,182,212,0.6);
    box-shadow: 0 0 0 3px rgba(6,182,212,0.09), 0 0 0 5px rgba(139,92,246,0.06);
}
/* Step 2: code input gets wider tracking to feel like a digit field */
#fp-code {
    text-align: center;
    letter-spacing: 0.28em;
    font-size: 18px;
    font-weight: 600;
}
#fp-code::placeholder {
    letter-spacing: 0;
    font-size: 14px;
    font-weight: 400;
}
/* OTP-style verification code input */
#verify-code-input {
    display: block;
    margin: 8px auto 18px;
    max-width: 260px;
    width: min(100%, 260px);
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.28em;
    font-variant-numeric: tabular-nums;
    padding: 14px 16px;
}
.fp-error {
    display: none;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(248, 113, 113, 0.28);
    border-radius: 8px;
    background: rgba(127, 29, 29, 0.22);
    color: var(--danger-text, #fecaca);
    font-size: 13px;
    line-height: 1.4;
}
.fp-error:not(:empty) { display: flex; }
.fp-error-icon {
    /* İnce çizgili alert-circle 16x16 — metinle dikey hizalı, asla ezilmez */
    flex: 0 0 16px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    color: #f87171;   /* uyarı metniyle (#fecaca) uyumlu aynı kırmızı aile */
}
.fp-error-msg { min-width: 0; }

/* Kod geçersizleştiğinde açılan "yeni kod iste" alanı.
   Masaüstünde HER DURUMDA iki sütun: metin solda, buton sağda ve SABİT.
   `flex-wrap` bilinçli olarak YOK — sarmalı düzen, metin uzayınca (geri
   sayım ↔ "yeni kod isteyebilirsin") butonu alt satıra düşürüp modalda
   yerleşim sıçraması yaratıyordu. `min-height` de üç durum arasında
   satır yüksekliğini sabitler. */
.fp-resend {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    min-height: 40px;   /* = buton yüksekliği; durum değişince zıplamaz */
}
.fp-resend.hidden { display: none; }
/* Bölüm yalnız PROGRAMATİK olarak odaklanır (tabindex="-1" → Tab ile
   ulaşılamaz); odak halkası bağlam taşımak içindir, görsel olarak
   gösterilmez. Gerçek klavye odağı alan buton kendi halkasını korur. */
.fp-resend:focus { outline: none; }
.fp-resend-status {
    /* Sol sütun: kalan tüm genişliği alır, gerekirse KENDİ İÇİNDE sarar
       (min-width:0 olmadan flex öğesi içeriğinden küçülemez ve butonu
       taşırırdı) — ama butonu asla aşağı itmez. */
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;   /* geri sayım zıplamasın */
    overflow-wrap: anywhere;
    /* Sol sütun butonla AYNI yüksekliği rezerve eder: geri sayım metni
       iki satıra sarsa da (sütun 223px, metin ~238px) blok yüksekliği
       değişmez → üç durum arasında dikey sıçrama olmaz. Metin kutunun
       içinde dikey ortalanır. */
    display: flex;
    align-items: center;
    min-height: 40px;
}
.fp-resend-btn {
    /* Sağ sütun: sabit. Ne sıkışır ne büyür; disabled olunca da
       boyutu/konumu DEĞİŞMEZ (yalnız opaklık). */
    flex: 0 0 auto;
    white-space: nowrap;
}
.fp-resend-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}
@media (max-width: 480px) {
    /* Mobilde HER DURUMDA aynı alt alta düzen (sayaç varken de yokken de). */
    .fp-resend {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        min-height: 0;
    }
    .fp-resend-btn { width: 100%; }
    .fp-resend-status {
        text-align: center;
        justify-content: center;
        min-height: 0;   /* mobilde yükseklik rezervine gerek yok */
    }
}
.fp-error-msg { flex: 1; }
/* Forgot-password only: keep error slot in layout so the modal doesn't jump */
#forgot-password-modal .fp-error {
    display: flex;
    min-height: 44px;
    visibility: hidden;
}
#forgot-password-modal .fp-error:not(:empty) {
    visibility: visible;
}
.fp-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 24px 20px;
}
.fp-footer .btn-secondary {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    padding: 8px 4px;
}
.fp-footer .btn-secondary:hover {
    text-decoration: underline;
    color: var(--text-primary);
}
.fp-footer .btn-primary {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    background: var(--accent-grad);
}
.fp-type-tabs {
    display: flex;
    gap: 3px;
    margin-bottom: 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    padding: 3px;
}
.fp-type-tab {
    flex: 1;
    padding: 7px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.fp-type-tab.active {
    background: var(--bg-surface);
    color: var(--accent);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.fp-type-tab:hover:not(.active) {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

/* ── Recovery Settings Description ── */
.us-recovery-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 12px;
    line-height: 1.4;
}

/* ── Contact Row (Email/Phone with buttons) ── */
.us-contact-row {
    display: flex; flex-direction: column; gap: 12px;
}
.us-contact-item {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--bg-primary); border: 1px solid var(--border);
    border-radius: 8px; padding: 12px 16px;
}
.us-contact-info {
    display: flex; flex-direction: column; gap: 2px;
}
.us-contact-label {
    font-size: 11px; font-weight: 700; color: var(--text-muted);
    letter-spacing: 0.5px;
}
.us-contact-value {
    font-size: 14px; color: var(--text-primary); font-weight: 500;
}
.us-contact-actions {
    display: flex; align-items: center; gap: 10px;
}
.btn-sm {
    padding: 6px 16px; font-size: 13px; border-radius: 6px;
    white-space: nowrap;
}

.recovery-status-row {
    display: flex; gap: 16px; margin-bottom: 16px;
}
.recovery-status-item {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-primary); border: 1px solid var(--border);
    border-radius: 8px; padding: 10px 14px; flex: 1;
}
.recovery-status-label {
    font-size: 12px; font-weight: 600; color: var(--text-secondary);
}
.recovery-status-value {
    font-size: 11px; font-weight: 700; padding: 2px 8px;
    border-radius: 10px; margin-left: auto;
}
.recovery-status-value.verified {
    background: rgba(87, 242, 135, 0.15); color: var(--tint-green, #57f287);
}
.recovery-status-value.unverified {
    background: rgba(237, 66, 69, 0.15); color: #ED4245;
}

/* ── Password Strength Indicator ── */
.pw-strength {
    display: flex; align-items: center; gap: 8px; margin-top: 8px;
}
.pw-strength-bar {
    flex: 1; height: 4px; background: var(--bg-primary);
    border-radius: 2px; overflow: hidden;
}
.pw-strength-fill {
    height: 100%; width: 0; border-radius: 2px;
    transition: width 0.3s, background 0.3s;
}
.pw-strength-text {
    font-size: 11px; font-weight: 600; min-width: 50px; text-align: right;
}
.pw-rules {
    list-style: none; padding: 0; margin: 8px 0 0;
    display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
}
.pw-rules li {
    font-size: 11px; color: var(--text-muted);
    display: flex; align-items: center; gap: 4px;
}
.pw-rules li::before {
    content: '✕'; font-size: 10px; color: var(--dnd); font-weight: 700;
}
.pw-rules li.valid { color: var(--tint-green, #57f287); }
.pw-rules li.valid::before { content: '✓'; color: var(--tint-green, #57f287); }

/* ── Verify Modal ── */
#verify-modal { z-index: 1100; }
#verify-resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Delete Account Modal ── */
#delete-account-modal { z-index: 1100; }
/* P6-C1-D1-D takip — DOB kapisi ekranlarinda 'Hesabimi Sil' modali:
   `.force-password-screen` (DOB gate ekranlarinin yeniden kullandigi tam-ekran
   engelleyici) `position:fixed; z-index:10001`dir; `#delete-account-modal`
   ise 1100 ile AYNI stacking context'te (body) onun ALTINDA kaliyordu → modal
   acilsa da gorunmuyor/tiklanamiyordu. Kural YALNIZ bir DOB gate ekrani
   gorunurken devreye girer (kanal-ayarlari/generic-confirm icin kullanilan
   `body:has(...)` deseniyle ayni); diger tum yuzeylerde modal 1100'de kalir.
   DOM tasinmaz — modal zaten `#app` DISINDA, body seviyesindedir. */
body:has(#dob-gate-screen:not(.hidden)) #delete-account-modal,
body:has(#dob-blocked-screen:not(.hidden)) #delete-account-modal { z-index: 10002; }

/* ── H2/H5: DOB Gün / Ay / Yıl seciciler — DOB kapisi + KAYIT formu ORTAK ────
   Gorunen kontrol projenin `createCustomSelect` primitifidir (.custom-select-wrap /
   -trigger / -menu / -option); `.dob-row` kapsaminda gate'in input paletine
   (8px radius, saydam yuzey, #818cf8 odak) uydurulur — iki yuzeyde AYNI gorunum.
   KATMAN: DOB kapisinda `.force-password-screen` (fixed, 10001) kendi stacking
   context'ini kurar; menu (z-index, context ICINDE) gate icerigi uzerinde acilir
   ama body-seviyesindeki #delete-account-modal'in (10002, H1) ASLA ustune
   cikamaz. Kayit formunda `.auth-container` (z-index 1) context'i icinde form
   icerigi uzerinde acilir; `.auth-card`/form overflow KIRPMAZ. */
.dob-row { display: flex; gap: 10px; }
.dob-col { position: relative; min-width: 0; flex: 1 1 0; }
.dob-col-day { flex: 0.85 1 0; }
.dob-col-month { flex: 1.3 1 0; }
.dob-row .dob-select { display: none; }   /* native <select> = deger tasiyici */
.dob-row .custom-select-wrap .custom-select-trigger {
    padding: 11px 34px 11px 14px; border-radius: 8px; font-size: 14px;
    background: rgb(var(--overlay-rgb) / 0.05); border: 1px solid rgb(var(--overlay-rgb) / 0.1); color: var(--ui-text-header);
    box-shadow: none;
}
.dob-row .custom-select-wrap .custom-select-trigger:hover {
    background: rgb(var(--overlay-rgb) / 0.07); border-color: rgb(var(--overlay-rgb) / 0.18);
}
.dob-row .custom-select-wrap .custom-select-trigger:focus,
.dob-row .custom-select-wrap .custom-select-trigger.open {
    border-color: #818cf8; background: rgb(var(--overlay-rgb) / 0.07);
    box-shadow: 0 0 0 2px rgba(129,140,248,0.18); outline: none;
}
.dob-row .dob-col.dob-empty .custom-select-trigger { color: #8b93a7; }   /* placeholder: Gün / Ay / Yıl */
.dob-row .custom-select-menu {
    max-height: 224px; z-index: 20;            /* icinde bulundugu context ICINDE; 10002'nin altinda kalir */
    background: var(--surface-menu, var(--ui-menu-navy)); border: 1px solid rgb(var(--overlay-rgb) / 0.1); border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.55);
    scrollbar-width: thin; scrollbar-color: rgb(var(--overlay-rgb) / 0.16) transparent;
}
.dob-row .custom-select-menu::-webkit-scrollbar { width: 6px; }
.dob-row .custom-select-menu::-webkit-scrollbar-thumb { background: rgb(var(--overlay-rgb) / 0.14); border-radius: 3px; }
.dob-row .custom-select-option { font-size: 14px; padding: 9px 12px; border-radius: 6px; color: var(--ui-text-soft-2); }
.dob-row .custom-select-option:hover { background: rgba(129,140,248,0.14); color: var(--ui-text-header); }
.dob-row .custom-select-option.selected { background: rgba(129,140,248,0.18); color: var(--tint-indigo, #c7d2fe); }
/* Kayit formu: .input-group etiket/ipucu ritmi korunur; hint satiri satirin altinda */
#reg-dob-row + .auth-optional { display: block; margin-top: 8px; }
@media (max-width: 420px) { .dob-row { flex-wrap: wrap; } .dob-col { flex: 1 1 100%; } }
#restore-account-modal { z-index: 1200; }
.us-delete-account-card { border: 1px solid rgba(237,66,69,0.3); }
#da-resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
#da-confirm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ═══════════════ AUDIO DEVICE POPUPS (Mic & Speaker) ═══════════════ */
.audio-device-popup {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    width: 260px;
    background: var(--bg-secondary);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.45);
    z-index: 200;
    padding: 14px;
    animation: uppSlideUp 0.18s ease-out;
}
.adp-section {
    margin-bottom: 12px;
}
.adp-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.adp-device-name {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.adp-device-select {
    width: 100%;
    padding: 6px 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    margin-top: 4px;
}
.adp-device-select:focus {
    border-color: var(--accent);
}
.adp-slider-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.adp-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-hover);
    outline: none;
    cursor: pointer;
}
.adp-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.adp-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.adp-slider-input::-webkit-slider-runnable-track {
    background: linear-gradient(to right, var(--accent) var(--val, 100%), var(--bg-hover) var(--val, 100%));
    height: 6px;
    border-radius: 3px;
}
.adp-slider-output::-webkit-slider-runnable-track {
    background: linear-gradient(to right, var(--accent) var(--val, 100%), var(--bg-hover) var(--val, 100%));
    height: 6px;
    border-radius: 3px;
}
.adp-separator {
    height: 1px;
    background: var(--border);
    margin: 10px 0;
}
.adp-voice-settings-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: background 0.12s, color 0.12s;
    border: none;
    background: none;
    text-align: left;
}
.adp-voice-settings-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.adp-voice-settings-btn svg {
    opacity: 0.6;
}

/* ═══════════════ DM CALL AREA (Discord-style tile view) ═══════════════ */
.dm-call-area {
    display: flex;
    flex-direction: column;
    background: var(--ui-tertiary);
    border-bottom: 1px solid rgb(var(--overlay-rgb) / 0.06);
    flex-shrink: 0;
    overflow: visible;
    animation: dcaSlideIn 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
/* Opacity-only: layout settles in a single frame so scrollTop can be set correctly */
@keyframes dcaSlideIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Top bar: status + timer ── */
.dca-topbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 7px 16px 3px;
    flex-shrink: 0;
}
/* DM-CALL-TOPBAR-CLEANUP-1: DM arama alanının üst-ortasındaki durum şeridi HİÇBİR durumda gösterilmez ("Aranıyor...",
   "Gelen (Görüntülü) Arama...", "AKTİF ARAMA + süre", "Tek Başına" + süre, "Devam Eden Arama"). Yalnız görsel sunum: öğeler
   ve app.js'in durum metni / süre sayacı mantığı DURUR; süre sol alt arama panelinde (#dm-call-timer) sürer. */
.dm-call-area .dca-topbar {
    display: none;
}
.dca-status {
    font-size: 12px;
    font-weight: 500;
    color: var(--online);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.dca-timer {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

/* ── Tiles container ── */
.dca-tiles {
    display: flex;
    gap: 8px;
    padding: 6px 16px 4px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}
/* Solo/alone state: single tile centered, wider */
.dca-tiles.dca-tiles-solo {
    justify-content: center;
}
.dca-tiles.dca-tiles-solo .dca-tile {
    width: clamp(180px, 34vw, 280px);
}
/* DM-CALL-MEDIA-GRID-PARITY-1 — video katmanı (kamera ya da ekran yayını varken, `has-video`): ses lobisi ızgarasıyla AYNI dil.
   Her görünür karo 16:9; genişlik `--dca-w` (app.js `_fitDMCallTiles` — lobi `_fitVoiceLobbyTiles` algoritması: sahneyi doldurur,
   ≤ %15 kayıpta daha çok sütun); karolar ortalanır, gerekirse alt satıra sarar. Katılımcı karosu (avatar / kamera) ile EKRAN
   karosu AYRI karolardır; odak / köşe (PiP) düzeni YOK. Bant yüksekliği SABİT (karo boyundan bağımsız): çubuk yalnız video katmanı
   açılıp kapanınca boyutlanır (Karar #31 / #108 dip sabitleme tek yeniden boyutlanma görür). DM-CALL-COMPACT-HEADER-1: üst sınır
   480 → 410 px (Discord DM araması kadar kompakt; başlık şeridiyle birlikte 460 px) — yukarı açılan kalite menüsünün TAM hâli
   (Yayını Durdur / Değiştir + 8 seçenek, 379-381 px) başlık şeridine uzanır ve araç çubuğunun altında kalır. Alt pay = üst pay +
   başlık şeridi (8 + 49 px): karolar başlık şeridi + bandın oluşturduğu birleşik alanın TAM ortasında durur, şeride girmez ve
   fareyle açılan kontrol bandı karoların ad plakalarını örtmez.
   DM-CALL-MEDIA-LAYOUT-FLASH-1: video katmanında bant ve karolar BOYUT GEÇİŞİ YAPMAZ (`transition: none` — ses lobisi karosu gibi):
   karo boyu yalnız bant + karo sayısının sonucudur (`--dca-w`, app.js aynı görevde yazar) → medya açıldığı İLK karede son kompakt
   düzen çizilir. Eskiden temel kuralların geçişi (`.dca-tile` genişlik, `.dca-tiles` min-height) ilk kareyi bayat `--dca-w` /
   320 px yedeğiyle çizip son boya kaydırıyordu: ekran yayını başlarken karolar büyüyüp iki satıra sarıyor, bandın dışına taşıyor,
   sonra küçülerek geri dönüyordu (Tam Ekran'dan çıkışta da). Tam Ekran köşe karosu kendi geçişini AYNEN kullanır (daha özgül kural).
   DM-CALL-MEDIA-CLOSE-LAYOUT-1: kapanış yönü (son medya kapanır, video → yalnız ses) da ANINDA — geçişi SONRAKİ stilin kuralı belirler,
   o yüzden yalnız-ses temel kurallarında (`.dca-tiles`, `.dca-tile`) da boyut geçişi YOK: eskiden `min-height` 320 → 160 geçişi bandı
   tutarken kontrol satırı akışa dönüyor (dar pencerede alan +70 px taşıyordu), karo genişliği `--dca-w`'den kayarken yükseklik 158 px'e
   sıçrıyordu (613×158 yassı karolar). `min-height` yalnız-ses düzeninde SABİT; karo boyu yalnız katılımcı sayısına bağlı (tek / iki karo). */
.dm-call-area.has-video .dca-tiles {
    height: clamp(260px, 38vw, 410px);
    min-height: 320px;
    flex-wrap: wrap;
    align-content: center;
    padding: 8px 16px 57px;
    overflow: hidden;
    transition: none;
}

/* ── Individual tile ── */
.dca-tile {
    flex: 0 0 auto;
    width: clamp(160px, 28vw, 240px);
    height: clamp(110px, 18vw, 158px);
    position: relative;
    border-radius: 10px;
    background: var(--surface-tile, var(--ui-secondary));
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dm-call-area.has-video .dca-tiles .dca-tile {
    flex: 0 0 auto;
    width: var(--dca-w, 320px);
    height: auto;
    aspect-ratio: 16 / 9;
    min-height: 0;
    transition: none;
}
/* Karar #105 — role-based VISUAL order: caller LEFT, callee RIGHT on both clients.
   The tile elements keep their me/peer identity; only the flex order follows the call role
   (classes set in updateDMChatCallBar). Solo (one tile) is unaffected. DM-CALL-MEDIA-GRID-PARITY-1: a SCREEN tile carries
   its owner's role class → equal order, DOM order decides (participant tile, then its screen tile): caller's pair first. */
.dca-tiles .dca-tile.dca-role-caller { order: 0; }
.dca-tiles .dca-tile.dca-role-callee { order: 1; }

/* Video fills the tile */
.dca-tile-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    z-index: 1;
}

/* Avatar initial shown when no video */
.dca-tile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: white;
    user-select: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    z-index: 2;
    transition: box-shadow 0.2s, transform 0.2s;
    flex-shrink: 0;
}
/* Speaking glow on avatar — shared accent (same ring on every voice surface) */
.dca-tile.speaking .dca-tile-avatar {
    box-shadow: 0 0 0 3px var(--accent),
                0 0 12px rgba(6, 182, 212, 0.45),
                0 4px 16px rgba(0,0,0,0.5);
    transform: scale(1.06);
}
/* Speaking border on tile video */
.dca-tile.speaking .dca-tile-video {
    outline: 3px solid var(--accent);
    outline-offset: -3px;
}

/* Name nameplate at bottom of tile */
.dca-tile-nameplate {
    position: absolute;
    bottom: 6px;
    left: 8px;
    z-index: 3;
    background: rgba(0,0,0,0.55);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    pointer-events: none;
    max-width: calc(100% - 16px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    backdrop-filter: blur(2px);
}

/* ── Focus/PiP layout: focused media fills the panel, every other tile is a small corner overlay ── */
/* DM-CALL-MEDIA-FOCUS-PARITY-1: odak düzeni (app.js `_dmCallFocusSync`) normal görünümde medya karosuna TIKLAMAYLA, Tam Ekran'da
   varsayılan olarak (ekran yayını ANA) — aşağıdaki DM-CALL-SCREEN-FULLSCREEN-1 kuralları ikisinde de AYNEN. Normal görünümde bandın
   yüksekliği / payı video ızgarasıyla AYNI (daha özgül `.has-video` bant kuralı) → odağa girip çıkmak arama alanının boyunu DEĞİŞTİRMEZ. */
.dca-tiles.stream-focus {
    position: relative;
    height: clamp(260px, 38vw, 480px);
    min-height: 260px;
    padding: 0 clamp(16px, 3.5vw, 56px);
    gap: 0;
    overflow: hidden;
    background: #111214;
}
/* Main tile — fills entire panel (respects inline padding from parent) */
.dca-tiles.stream-focus .dca-tile.stream-main {
    position: absolute;
    inset: 0 clamp(16px, 3.5vw, 56px);
    flex: none;
    width: auto;
    height: 100%;
    border-radius: 8px;
    min-height: unset;
    z-index: 1;
    overflow: hidden;
}
/* Stream-focused main video: contain so screen shares are never cropped.
   16:9 cameras fill the space without visible bars; other aspect ratios letterbox. */
.dca-tiles.stream-focus .dca-tile.stream-main .dca-tile-video {
    object-fit: contain;
    background: #111214;
    border-radius: 8px;
}
/* PiP tile — small corner overlay */
.dca-tiles.stream-focus .dca-tile.stream-pip {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 144px;
    height: 90px;
    flex: none;
    min-height: unset;
    border-radius: 8px;
    z-index: 10;
    border: 2px solid rgba(255,255,255,0.18);
    box-shadow: 0 4px 20px rgba(0,0,0,0.75);
    overflow: hidden;
    background: #1e1f22;
}
.dca-tiles.stream-focus .dca-tile.stream-pip .dca-tile-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
    font-weight: 700;
}
.dca-tiles.stream-focus .dca-tile.stream-pip .dca-tile-nameplate {
    font-size: 10px;
    padding: 1px 5px;
    bottom: 3px;
    left: 4px;
}
/* Speaking ring still works in pip */
.dca-tiles.stream-focus .dca-tile.stream-pip.speaking .dca-tile-avatar {
    box-shadow: 0 0 0 2px var(--accent);
    transform: scale(1.05);
}
/* DM-CALL-MEDIA-FOCUS-PARITY-1: odak düzeninde yalnız ana karo + köşe şeridindeki AKTİF MEDYA karoları çizilir (aktif medya kaybolmaz);
   ana / köşe olmayan karo — medyasız kullanıcının avatar karosu — çizilmez (normal görünüm ve Tam Ekran; çıkışta aynı öğeyle ızgaraya
   döner). Izgara karosunun 16:9 oranı odak karolarına uygulanmaz (ana karo alanı doldurur). */
.dca-tiles.stream-focus .dca-tile:not(.stream-main):not(.stream-pip) {
    display: none;
}
.dca-tiles.stream-focus .dca-tile.stream-main,
.dca-tiles.stream-focus .dca-tile.stream-pip {
    aspect-ratio: auto;
}
/* DM-CALL-MEDIA-FOCUS-PARITY-1 — köşe şeridi (yalnız aktif medya karoları) sağ altta YAN YANA (144 px + 8 px aralık; köşeden sola sıra
   app.js'te: `dca-pip-1`, `dca-pip-2`). "Üyeleri Gizle" (`members-hidden`) şeridi çizmez — ana karo AYNEN, medyalar bağlı kalır. Normal görünümde
   bant zemini tema yüzeyidir (ızgara gibi; koyu medya zemini yalnız Tam Ekran'da). Odaklanabilir (medya gösteren) karo imleçle belli
   olur (ses lobisi gibi); avatar karosu odak açmaz. Köşe karosunda (144 × 90) duraklama katmanı yalnız ikon + başlık. */
.dca-tiles.stream-focus .dca-tile.stream-pip.dca-pip-1 { right: 164px; }
.dca-tiles.stream-focus .dca-tile.stream-pip.dca-pip-2 { right: 316px; }
/* DM-CALL-FOCUS-VISUAL-PARITY-1: "Üyeleri Gizle" köşe şeridini YALNIZ normal görünümde çizmez; Tam Ekran'da gizleme medyaları kaldırmaz —
   alttaki ses lobisi şeridi yerine bu köşe düzeni gösterilir (aşağıda `dca-voice-strip`). */
.dm-call-area:not(.dca-fullscreen) .dca-tiles.stream-focus.members-hidden .dca-tile.stream-pip { display: none; }
.dm-call-area:not(.dca-fullscreen) .dca-tiles.stream-focus { background: transparent; }
.dm-call-area.has-video .dca-tile:has(> .dca-tile-video:not(.hidden)) { cursor: pointer; }
.dca-tiles.stream-focus .dca-tile.stream-pip .voice-stream-paused .vsp-sub { display: none; }
/* ── DM-CALL-FOCUS-VISUAL-PARITY-1 — TAM EKRAN + üyeler görünür (`dca-voice-strip`): ses lobisi odak görünümü ──
   Yalnız Tam Ekran'da, şeritte en az bir aktif medya varken ve üyeler gizli DEĞİLKEN (app.js `_dmCallFocusSync`); normal görünüm ve Tam
   Ekran'da "Üyeleri Gizle" yukarıdaki köşe düzenidir. ANA karo (`stream-main`) üstte, kalan alana 16:9 SIĞAR ve ortalanır (ses lobisi
   odak karosu formülü — container birimleri, ölçüm / JS yok); altında ortada "Üyeleri Gizle / Göster" hapı; en altta ORTALANMIŞ şerit =
   ana dışındaki AKTİF medya karoları (`stream-pip`; sıra ızgarayla AYNI: rol + DOM sırası). Şerit karosu `clamp(128px, 22cqh, 192px)` (ses
   lobisi şerit formülü; çok dar pencerede üç karo sığacak kadar küçülür). Paylar: üst 44 px (sağ üstte kalite rozeti — ses lobisi odak
   başlığı), alt 76 px = fareyle açılan kontrol bandının yeri (düğmeler alttan 10–70 px; bu kipte bant kutusu 76 px) → bant şeridi / hapı
   örtmez, tıklamayı yutmaz; köşe kalkışı (62 px) bu kipte UYGULANMAZ. Zemin pencerenin tema yüzeyi (ses lobisi Tam Ekran'ı gibi). Şerit
   karosu ses lobisi şerit karosunun dilinde: 12 px köşe, sol üstte tür etiketi ("Kamera" / "Ekran" — ses lobisi `voice-tile-badges` +
   `voice-tile-type-badge`; karo `vtile` container'ı → ses lobisinin küçük karo ölçüleri AYNEN), ad plakasında medya ikonu (ses lobisinin
   kamera glifi / ortak ekran glifi) + ses lobisi küçük karo plakası. Karolar yeniden kurulmaz / taşınmaz (yalnız sınıf + CSS) →
   <video> / srcObject AYNEN. */
.dm-call-area .dca-tiles.stream-focus.dca-voice-strip {
    container: dcafocus / size;
    /* şerit karosu genişliği — çocuklarda bu kabın birimleriyle çözülür; DM-CALL-FULLSCREEN-MEMBERS-1: şeritte ana karonun vekili de var →
       en çok dört karo (vekil + üç aktif medya) tek satıra sığar */
    --dca-sw: min(clamp(128px, 22cqh, 192px), calc((100cqw - 24px) / 4));
    padding: 44px 16px 76px;
    gap: 30px 8px;
    flex-wrap: wrap;
    align-content: flex-start;
    background: transparent;
}
.dm-call-area .dca-tiles.stream-focus.dca-voice-strip > .dca-tile.stream-main {
    --dca-fa: calc(100cqh - 30px - var(--dca-sw) * 9 / 16);
    --dca-fw: min(100cqw, calc(var(--dca-fa) * 16 / 9));
    position: relative;
    inset: auto;
    flex: 0 0 auto;
    order: -1;
    width: var(--dca-fw);
    height: auto;
    aspect-ratio: 16 / 9;
    margin: calc((var(--dca-fa) - var(--dca-fw) * 9 / 16) / 2) calc((100cqw - var(--dca-fw)) / 2);
    border: 2px solid rgb(var(--overlay-rgb) / 0.1);
    border-radius: 12px;
}
.dm-call-area .dca-tiles.stream-focus.dca-voice-strip > .dca-tile.stream-pip {
    position: relative;
    inset: auto;
    flex: 0 0 auto;
    width: var(--dca-sw);
    height: auto;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 12px;
    box-shadow: none;
    background: var(--surface-tile, var(--ui-secondary));
    z-index: auto;
    container: vtile / inline-size;
}
.dm-call-area .dca-tiles.stream-focus.dca-voice-strip > .dca-tile.stream-pip .dca-tile-nameplate {
    bottom: 5px;
    left: 5px;
    max-width: calc(100% - 10px);
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: none;
    font-size: 11px;
    line-height: 14px;
    font-weight: 600;
}
.dca-tile .dca-tile-badges { display: none; }
.dm-call-area .dca-tiles.stream-focus.dca-voice-strip > .dca-tile.stream-pip .dca-tile-badges { display: flex; }
/* DM-SCREEN-QUALITY-PLACEMENT-1 — ızgarada (odak YOK) KENDİ ekran karomun sol üstünde kalite + FPS: ses lobisi ızgara karosunun AYNI rozeti
   (`.voice-tile-badges` konumu + `.voice-tile-quality-badge`). Odakta karoda tekrarlanmaz (normal görünüm: DM başlığı; Tam Ekran: sağ üst). */
.dca-tile .dca-quality-badges { display: none; }
.dca-tiles:not(.stream-focus) .dca-tile .dca-quality-badges:has(> .voice-tile-quality-badge:not(:empty)) { display: flex; }
.dca-tile-nameplate .dca-tile-cam-icon { display: none; }
.dm-call-area .dca-tiles.stream-focus.dca-voice-strip > .dca-tile.stream-pip .dca-tile-cam-icon { display: inline-block; }
/* DM-CALL-AUDIO-STATUS-1 — katılımcı karosunda (ve Tam Ekran şeridindeki vekilinde) ses lobisi karosunun AYNI ses durumu ikonu: sağ altta
   `.voice-tile-icons` > `.voice-tile-status` (plaka / glif / renk — her temada medya üstünde okunur — ses lobisinden; şerit karosunda ses
   lobisinin küçük karo ölçüsü `vtile` kabından). Video (z 1) ve halka (z 2) ÜSTÜNDE, ad plakasıyla aynı katmanda ve satırda; ikon varken ad
   plakası ikona taşmaz. Köşe karosunda (144 × 90) ses lobisinin küçük ölçüsü, köşe ad plakasıyla hizalı. Ekran karosu ikon TAŞIMAZ (kap yok). */
.dca-tile > .dca-tile-icons { z-index: 3; bottom: 6px; pointer-events: none; }
.dca-tile:has(> .dca-tile-icons > .voice-tile-status) .dca-tile-nameplate { max-width: calc(100% - 48px); }
.dm-call-area .dca-tiles.stream-focus.dca-voice-strip > .dca-tile.stream-pip > .dca-tile-icons { bottom: 5px; right: 5px; }
.dm-call-area .dca-tiles.stream-focus.dca-voice-strip > .dca-tile.stream-pip:has(> .dca-tile-icons > .voice-tile-status) .dca-tile-nameplate { max-width: calc(100% - 36px); }
.dca-tiles.stream-focus:not(.dca-voice-strip) .dca-tile.stream-pip > .dca-tile-icons { bottom: 3px; right: 4px; gap: 3px; }
.dca-tiles.stream-focus:not(.dca-voice-strip) .dca-tile.stream-pip .voice-tile-status { width: 20px; height: 20px; border-radius: 6px; }
.dca-tiles.stream-focus:not(.dca-voice-strip) .dca-tile.stream-pip .voice-tile-status .voice-status-icon { width: 13px; height: 13px; }
.dca-tiles.stream-focus:not(.dca-voice-strip) .dca-tile.stream-pip:has(> .dca-tile-icons > .voice-tile-status) .dca-tile-nameplate { max-width: calc(100% - 32px); }
/* DM-CALL-FULLSCREEN-MEMBERS-1 — şeritte ANA karonun vekili (`#dca-tile-focus-ref`; görünürlük / tür / yer app.js `_dmCallFocusRefSync`):
   şerit karosunun AYNI kuralları (`stream-pip`), ortada ses lobisi vekilinin ikonu (`.voice-tile-ref-icon` — kamera vekilinde kamera, yayın
   vekilinde ekran glifi), ad plakasında aynı tür glifi. Video yok → imleç / tıklama yok. */
.dca-tile-focus-ref[data-ref-type="screen"] .dca-ref-cam,
.dca-tile-focus-ref:not([data-ref-type="screen"]) .dca-ref-scr { display: none; }
/* DM-CALL-FULLSCREEN-MEMBERS-2 — şeritte kamerası kapalı katılımcının AVATAR karosu (`dca-pip-avatar`; app.js `_dmCallFocusSync`): ses lobisi
   kullanıcı karosu gibi tür etiketi / kamera glifi YOK (yalnız medya karolarında), avatar ses lobisi karosunun ölçüsünde (karo genişliğiyle
   ölçeklenir); konuşma halkası ve çalma halkası (Karar #104 — `.dca-tile-ring`) AYNEN. */
.dm-call-area .dca-tiles.stream-focus.dca-voice-strip > .dca-tile.stream-pip.dca-pip-avatar .dca-tile-badges,
.dm-call-area .dca-tiles.stream-focus.dca-voice-strip > .dca-tile.stream-pip.dca-pip-avatar .dca-tile-cam-icon { display: none; }
.dm-call-area .dca-tiles.stream-focus.dca-voice-strip > .dca-tile.stream-pip.dca-pip-avatar .dca-tile-avatar {
    width: clamp(40px, 20cqw, 96px);
    height: clamp(40px, 20cqw, 96px);
    font-size: clamp(16px, 8cqw, 38px);
}
/* Odaktaki KENDİ ekran yayınımın kalite + FPS rozeti ("720p 30 FPS"): ses lobisi odak başlığıyla AYNI rozet (`.voice-tile-quality-badge`),
   sağ üstte — normal görünümde bandın köşesi, Tam Ekran'da üst payın ortası. Yalnız gösterim (tıklama altındaki karoya geçer).
   DM-SCREEN-VIEWERS-1: Tam Ekran'da rozetin SOLUNDA izleyici yığını (ses lobisi `.voice-focus-header` sırası ve aralığı). */
.dca-focus-header {
    position: absolute;
    top: 8px;
    right: 16px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}
.dm-call-area.dca-fullscreen .dca-focus-header { top: 12px; }
/* DM-SCREEN-QUALITY-PLACEMENT-1 — normal görünümün odağında rozet ANA yayın karosunun sağ üst köşesinde: karonun yatay payı
   (`inset: 0 clamp(16px, 3.5vw, 56px)`) + karo rozetleriyle / ad plakasıyla AYNI 8 px iç boşluk → her pencere boyunda karonun köşesine
   hizalı; geniş pencerede yayının yan boşluğunda kalır (görüntüyü örtmez). Tam Ekran konumu AYNEN. */
.dm-call-area:not(.dca-fullscreen) .dca-tiles.stream-focus .dca-focus-header { top: 8px; right: calc(clamp(16px, 3.5vw, 56px) + 8px); }
/* DM-CALL-FULLSCREEN-HEADER-1 — Tam Ekran'ın sol üst başlığı: ses lobisi başlığının (`.voice-lobby-title`) yeri / yazı dili; YALNIZ Tam
   Ekran'da (normal görünümde DM başlığı görünür). Ekran yayını bilgisi ad ile aynı satırda, uzun metin üç noktayla kısalır. */
.dca-tiles .dca-fs-title { display: none; }
.dm-call-area.dca-fullscreen .dca-fs-title { display: flex; }
.dca-fs-title .dca-fs-title-sep { color: var(--text-secondary); flex-shrink: 0; }
.dca-fs-title .dca-fs-title-stream { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
/* DM-CALL-MEDIA-GRID-PARITY-1 — EKRAN karosu (`#dca-tile-me-screen` / `#dca-tile-peer-screen`): yayın KIRPILMAZ (contain, koyu
   letterbox — medya katmanı); konuşma / çalma halkası almaz (yalnız katılımcı karosu). Ad plakasında adın solunda ses lobisi yayın
   karosuyla AYNI ekran paylaşımı ikonu (VOICE-STREAM-TILE-IDENTITY-1 dili). */
.dca-tile.dca-tile-screen .dca-tile-video {
    object-fit: contain;
    background: #111214;
}
.dca-tile-name-icon {
    display: inline-block;
    width: 1.15em;
    height: 1.15em;
    margin-right: 0.4em;
    vertical-align: -0.2em;
}
.dca-tile-name-icon svg { display: block; width: 100%; height: 100%; }
/* DM-CALL-RINGING-SCREEN-OFFER-1 — karşı tarafın ekran karosu track'siz: `dca-screen-offer` (katılmadan önce yayın teklifi — Discord "Yayını
   İzle" kartı) ve `dca-screen-wait` (teklif varken katıldım, yayın henüz gelmedi). Zemin yayının letterbox medya yüzeyi (track gelince renk
   değişmez), ad plakası AYNEN (ekran ikonu + ad). Teklifte ortada ses lobisinin "Yayını İzle" düğmesi (`.voice-tile-watch-btn` görünüm /
   hover / odak AYNEN); diğer hâllerde çizilmez. */
.dca-tile.dca-screen-offer,
.dca-tile.dca-screen-wait { background: #111214; }
.dca-tile .dca-screen-watch-btn { display: none; }
.dca-tile.dca-screen-offer .dca-screen-watch-btn { display: inline-flex; }

/* Ringing pulse rings — Karar #104: on whichever tile is the CALLEE (peer tile in the caller's
   view, own tile in the callee's view); .ringing is assigned by role in updateDMChatCallBar. */
.dca-tile-ring {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    border-radius: 8px;
}
.dca-tile.ringing .dca-tile-ring::before,
.dca-tile.ringing .dca-tile-ring::after {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 2px solid var(--online);
    opacity: 0;
    animation: dcaTileRing 1.8s ease-out infinite;
}
.dca-tile.ringing .dca-tile-ring::after {
    animation-delay: 0.8s;
}
@keyframes dcaTileRing {
    0%   { transform: scale(0.9); opacity: 0.7; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* ── Controls bar ── */
.dca-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 6px 16px 10px;
    flex-shrink: 0;
    position: relative;
}

/* ── Button groups — rounded-square, not pill ── */
.dca-ctrl-group {
    display: flex;
    align-items: center;
    gap: 4px;
    border-radius: 10px;
    padding: 4px 6px;
    background: rgb(var(--overlay-rgb) / 0.05);
    border: 1px solid rgb(var(--overlay-rgb) / 0.07);
}
/* End-call group: extra left separation + red tint */
.dca-ctrl-group-end {
    margin-left: 4px;
    padding: 4px;
    background: rgba(237,66,69,0.1);
    border-color: rgba(237,66,69,0.18);
}

/* Icon-only square-rounded buttons */
.dca-ctrl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgb(var(--overlay-rgb) / 0.08);
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.14s, box-shadow 0.15s;
    flex-shrink: 0;
}
.dca-ctrl-btn:hover:not(:disabled) {
    background: rgb(var(--overlay-rgb) / 0.16);
    color: var(--text-primary);
    transform: scale(1.08);
}
.dca-ctrl-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
/* Press / click feedback */
.dca-ctrl-btn:active:not(:disabled) {
    transform: scale(0.92);
    transition-duration: 80ms;
}
/* Active — blurple highlight with glow ring */
.dca-ctrl-btn.active {
    background: rgba(88,101,242,0.3);
    color: #8fa0ff;
    box-shadow: 0 0 0 2px rgba(88,101,242,0.5);
}
.dca-ctrl-btn.active:hover:not(:disabled) {
    background: rgba(88,101,242,0.45);
    color: var(--tint-indigo, #b0c0ff);
}
/* Muted state — red tint */
.dca-ctrl-btn.muted {
    background: rgba(237,66,69,0.22);
    color: #f04747;
    box-shadow: 0 0 0 1.5px rgba(237,66,69,0.35);
}
.dca-ctrl-btn.muted:hover:not(:disabled) {
    background: rgba(237,66,69,0.38);
    color: #ff7070;
}
/* End call — prominent solid red, rounded square */
.dca-end-call-btn {
    background: var(--dnd) !important;
    color: white !important;
    width: 44px;
    height: 44px;
    border-radius: 10px;
}
.dca-end-call-btn:hover:not(:disabled) {
    background: #d83c3e !important;
    transform: scale(1.1);
    box-shadow: 0 4px 14px rgba(237,66,69,0.45) !important;
}
.dca-end-call-btn:active:not(:disabled) {
    background: #c0302f !important;
    transform: scale(0.92) !important;
    transition-duration: 80ms;
}

/* ── PRE-JOIN state (callee, incoming call ringing, not joined yet) ──
   `.dm-call-area.dca-prejoin` swaps the joined-call control row for exactly
   three ICON-ONLY actions (Karar #101): join with video / join with voice /
   reject. Round, compact (44px) Discord-like buttons; the glyphs are the DM
   header call icons and the label lives ONLY in the shared tooltip. Joined
   controls (mic/camera/screen/end) are NOT in the DOM flow in this state. */
.dca-prejoin-controls {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 8px 16px 14px;
    flex-shrink: 0;
}
.dm-call-area.dca-prejoin .dca-controls { display: none; }
.dm-call-area.dca-prejoin .dca-prejoin-controls { display: flex; }
/* Karar #101: arayan tek kaldı, aranan katılmadı → yalnız iki katılma ikonu (reddedilecek çalma yok) */
.dm-call-area.dca-joinable .dca-reject-btn { display: none; }
.dca-join-btn,
.dca-reject-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    padding: 0;
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s, transform 0.14s, box-shadow 0.15s;
    flex-shrink: 0;
}
/* Karar #102: 56px yuvarlak ikon düğmeleri — glifler aynı (başlık ikonları), yalnız daha büyük çizilir */
.dca-join-btn .dca-btn-icon,
.dca-reject-btn .dca-btn-icon { display: block; width: 26px; height: 26px; }
.dca-reject-btn .dca-btn-icon { width: 22px; height: 22px; }
.dca-join-btn:focus-visible,
.dca-reject-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dca-join-btn { background: var(--online); }
.dca-join-btn:hover { background: #0ea371; transform: scale(1.06); box-shadow: 0 4px 14px rgba(16,185,129,0.35); }
.dca-join-btn:active { transform: scale(0.95); transition-duration: 80ms; }
.dca-reject-btn { background: var(--dnd); }
.dca-reject-btn:hover { background: #d83c3e; transform: scale(1.06); box-shadow: 0 4px 14px rgba(237,66,69,0.45); }
.dca-reject-btn:active { transform: scale(0.94); transition-duration: 80ms; }

/* ── Overlay (has-video) enhancements: Discord-like square groups with blur ── */
.dm-call-area.has-video .dca-ctrl-group {
    background: rgba(8,8,10,0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.13);
    box-shadow: 0 2px 14px rgba(0,0,0,0.5),
                inset 0 1px 0 rgba(255,255,255,0.06);
    padding: 5px 8px;
    border-radius: 12px;
}
.dm-call-area.has-video .dca-ctrl-group-end {
    margin-left: 8px;
    padding: 5px;
    background: rgba(20,6,6,0.78);
    border-color: rgba(237,66,69,0.3);
    box-shadow: 0 2px 14px rgba(0,0,0,0.5),
                0 0 0 1px rgba(237,66,69,0.12) inset;
    border-radius: 12px;
}
/* Slightly larger buttons in overlay context */
.dm-call-area.has-video .dca-ctrl-btn {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}
.dm-call-area.has-video .dca-ctrl-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.2);
    color: white;
    transform: translateY(-2px) scale(1.08);
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}
.dm-call-area.has-video .dca-ctrl-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.92);
}
/* Overlay active state — more vivid blurple glow */
.dm-call-area.has-video .dca-ctrl-btn.active {
    background: rgba(88,101,242,0.42);
    color: #aabbff;
    box-shadow: 0 0 0 2px rgba(88,101,242,0.65),
                0 4px 14px rgba(88,101,242,0.3);
}
/* DM-CALL-ACTIVE-HOVER-1: etkin (kamera açık / yayında) düğme video katmanında hover'da da mor kalır — genel katman hover'ı (yukarıda)
   etkin tonu eziyordu (zemin beyaz-alfa, halka koyu gölgeye dönüyordu). Ton split okunun etkin hover'ıyla AYNI; transform BURADA
   yazılmaz → büyüme / kalkma genel hover'dan, split yarılarında `transform: none` AYNEN gelir. */
.dm-call-area.has-video .dca-ctrl-btn.active:hover:not(:disabled) {
    background: rgba(88,101,242,0.55);
    color: white;
    box-shadow: 0 0 0 2px rgba(88,101,242,0.65),
                0 4px 14px rgba(88,101,242,0.3);
}
/* Overlay muted state — vivid red warning */
.dm-call-area.has-video .dca-ctrl-btn.muted {
    background: rgba(237,66,69,0.32);
    color: #ff7070;
    box-shadow: 0 0 0 2px rgba(237,66,69,0.5),
                0 4px 12px rgba(237,66,69,0.2);
}
/* DM-CALL-MUTED-HOVER-1: susturulmuş mikrofon video katmanında hover'da da kırmızı kalır — genel katman hover'ı (yukarıda) susturulmuş
   tonu eziyordu (zemin beyaz-alfa, ikon beyaz, kırmızı halka koyu gölgeye dönüyordu). Hover'da kırmızı hafifçe yoğunlaşır (etkin hover'ın
   mor adımıyla aynı), ikon ve halka AYNEN; transform BURADA yazılmaz → kalkma / büyüme genel hover'dan AYNEN gelir. */
.dm-call-area.has-video .dca-ctrl-btn.muted:hover:not(:disabled) {
    background: rgba(237,66,69,0.45);
    color: #ff7070;
    box-shadow: 0 0 0 2px rgba(237,66,69,0.5),
                0 4px 12px rgba(237,66,69,0.2);
}
/* End call in overlay — larger, with red glow, rounded square */
.dm-call-area.has-video .dca-end-call-btn {
    width: 48px;
    height: 48px;
    border-radius: 10px;
}
.dm-call-area.has-video .dca-end-call-btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.08) !important;
    box-shadow: 0 6px 18px rgba(237,66,69,0.55) !important;
}

/* ── DM-CALL-SPLIT-MENUS-1: kamera + ekran paylaşımı SPLIT düğmeleri (Discord paritesi) ──
   Sol yarı ANA eylem (`.dca-ctrl-btn` aç / kapat — davranış AYNEN), sağ yarı ok (`.dca-split-arrow`) → menü. Ok görünürken iki yarı TEK
   gövde: ana düğmenin sağ köşeleri düz, ok aynı yükseklikte 2 px ayraçla bitişik; yarılar büyüme / kalkma (scale / translate) YAPMAZ
   (ayrışmaz, açık menünün çapası oynamaz); etkin durumda (kamera açık / yayında) ok ana düğmenin tonunu alır. Ok yalnız menüsü açılabilirken
   çizilir (devre dışı ok yer KAPLAMAZ — ekran oku yayın yokken); menü açıkken ok ters döner (aria-expanded). */
.dca-split {
    position: relative;
    display: flex;
    align-items: center;
}
.dca-split-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 40px;
    margin-left: 2px;
    padding: 0;
    border: none;
    border-radius: 0 10px 10px 0;
    background: rgb(var(--overlay-rgb) / 0.08);
    color: var(--text-secondary);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.dca-split-arrow:disabled { display: none; }
.dca-split-arrow svg { display: block; transition: transform 0.15s ease; }
.dca-split-arrow[aria-expanded="true"] svg { transform: rotate(180deg); }
.dca-split-arrow:hover,
.dca-split-arrow[aria-expanded="true"] {
    background: rgb(var(--overlay-rgb) / 0.16);
    color: var(--text-primary);
}
.dca-split:has(> .dca-split-arrow:not(:disabled)) > .dca-ctrl-btn { border-radius: 10px 0 0 10px; }
.dm-call-area .dca-split:has(> .dca-split-arrow:not(:disabled)) > .dca-ctrl-btn:is(:hover, :active):not(:disabled) { transform: none; }
.dca-split > .dca-ctrl-btn.active + .dca-split-arrow {
    background: rgba(88,101,242,0.3);
    color: #8fa0ff;
    box-shadow: 0 0 0 2px rgba(88,101,242,0.5);
}
.dca-split > .dca-ctrl-btn.active + .dca-split-arrow:is(:hover, [aria-expanded="true"]) {
    background: rgba(88,101,242,0.45);
    color: var(--tint-indigo, #b0c0ff);
}

/* Split menüleri (`.dca-menu`: kamera + yayın). DM-SCREEN-QUALITY-MENU-VIEWPORT-1 kuralı iki menüde AYNEN: kabın (split) ortasına hizalı,
   varsayılan YUKARI; `_dcaMenuPlace` açılışta ve pencere boyutu değişince ölçer — yukarıda yer yoksa AŞAĞI (`.dca-menu-down`), ikisinde de
   yoksa yukarıda kalıp görünüm alanına kaydırılır (`--dca-menu-dy`), yatayda kenarlara (`--dca-menu-dx`). Alt menü (`.dca-submenu`)
   menünün SAĞINDA (yer yoksa SOLUNDA — `.dca-submenu-left`), ilk öğesi tetikleyiciyle hizalı (`--dca-sub-top`, `_dcaSubmenuPlace`).
   Yüzey / metin tema tokenlarından (koyu / açık / AMOLED); kaydırma / yeni katman YOK. */
.dca-menu {
    position: absolute;
    bottom: calc(100% + 10px - var(--dca-menu-dy, 0px));
    left: calc(50% + var(--dca-menu-dx, 0px));
    transform: translateX(-50%);
    min-width: 220px;
    max-width: 280px;
    padding: 6px;
    background: var(--surface-menu, var(--ui-floating));
    border: 1px solid rgb(var(--overlay-rgb) / 0.1);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    text-align: left;
    z-index: 500;
    animation: qmenuIn 0.15s ease;
}
@keyframes qmenuIn {
    from { opacity: 0; transform: translateX(-50%) translateY(6px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.dca-menu.dca-menu-down {
    bottom: auto;
    top: calc(100% + 10px - var(--dca-menu-dy, 0px));
}
.dca-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 34px;
    padding: 6px 8px;
    border: none;
    border-radius: 4px;
    background: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
}
.dca-menu-item:hover:not(:disabled),
.dca-menu-item:focus-visible,
.dca-menu-sub-trigger[aria-expanded="true"] {
    background: rgb(var(--overlay-rgb) / 0.08);
    color: var(--ui-text-strong);
}
.dca-menu-item:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.dca-menu-item:disabled { color: var(--ui-text-faint); cursor: default; }
.dca-menu-item > svg { flex-shrink: 0; }
.dca-menu-item-danger { color: var(--dnd); }
.dca-menu-item-danger:hover:not(:disabled),
.dca-menu-item-danger:focus-visible {
    background: rgba(237,66,69,0.12);
    color: var(--dnd);
}
.dca-menu-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dca-menu-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.dca-menu-sub {
    font-size: 12px;
    font-weight: 400;
    color: var(--ui-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dca-menu-sub:empty { display: none; }
.dca-menu-chevron { flex-shrink: 0; margin-left: auto; color: var(--ui-text-muted); }
.dca-menu-divider {
    height: 1px;
    margin: 4px 6px;
    background: rgb(var(--overlay-rgb) / 0.08);
}
.dca-submenu {
    position: absolute;
    top: var(--dca-sub-top, 0px);
    left: calc(100% + 4px);
    min-width: 200px;
    max-width: 300px;
    padding: 6px;
    background: var(--surface-menu, var(--ui-floating));
    border: 1px solid rgb(var(--overlay-rgb) / 0.1);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    animation: dcaSubIn 0.12s ease;
}
.dca-submenu.dca-submenu-left { left: auto; right: calc(100% + 4px); }
@keyframes dcaSubIn { from { opacity: 0; } to { opacity: 1; } }
/* Kamera cihazı satırı: kamera ikonu + ad + radyo (işaretli `.checked` — çaldırma menüsü `.camera-menu-radio` ile aynı dil; satır ayrıca
   aria-checked taşır) */
.dca-menu-radio {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-left: auto;
    border: 2px solid var(--ui-text-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dca-menu-radio.checked { border-color: #5865f2; background: #5865f2; }
.dca-menu-radio.checked::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
}
.dca-qmenu-section {
    padding: 6px 12px 3px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.dca-qmenu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.1s;
}
.dca-qmenu-item:hover {
    background: rgb(var(--overlay-rgb) / 0.07);
    color: var(--text-primary);
}
.dca-qmenu-item input[type="radio"] { accent-color: #5865f2; }
/* STREAM-QUALITY-PAYWALL-UI-1: DM kalite menüsünde kilitli seçenek (60 FPS / 1080p / 1440p / Kaynak) — Server Voice ile
   AYNI dil: soluk, not-allowed, hover tepkisi YOK, "Yakında" rozeti (`.stream-soon-badge`). */
.dca-qmenu-item.dca-qmenu-locked,
.dca-qmenu-item.dca-qmenu-locked:hover { color: var(--ui-text-faint); background: none; cursor: not-allowed; }
.dca-qmenu-item.dca-qmenu-locked input[type="radio"] { cursor: not-allowed; }

/* ── Controls overlay when media (camera / screen share) is active ──────────
   Controls become absolutely positioned over the bottom of the video area.
   Shown on hover; hidden (with soft animation) when mouse leaves the area.   */
.dm-call-area.has-video .dca-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    /* Gradient background so buttons stay readable over any video content */
    padding: 28px 16px 10px;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.72));
    /* Hidden by default */
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
}
/* Reveal on hover (includes hovering over the buttons themselves). DM-CALL-COMPACT-HEADER-1 (kontrol bandı paritesi): fareyle tıklanan
   düğmenin odağı bandı TUTMAZ (`:focus-within` değil); KLAVYE odağı (`:focus-visible`) ve AÇIK split menüsü
   (yayın / kamera — DM-CALL-SPLIT-MENUS-1) tutar (fare ayrılınca menü kapanmaz, bantla birlikte görünür kalır). Tam Ekran'daki köşe
   karosu kalkışı AYNI tetikleri kullanır. DM başlığı ise HER ZAMAN görünür (DM-CALL-HEADER-ALWAYS-VISIBLE-1). */
.dm-call-area.has-video:hover .dca-controls,
.dm-call-area.has-video:has(:focus-visible) .dca-controls,
.dm-call-area.has-video:has(.dca-menu:not(.hidden)) .dca-controls,
.dm-call-area.has-video.controls-visible .dca-controls {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
/* Split menüleri video katmanında: z-index karonun üstünde */
.dm-call-area.has-video .dca-menu {
    z-index: 100;
}
/* DM-CALL-SPLIT-MENUS-1: video katmanında split oku ana düğmeyle AYNI boy / zemin dili (44 px, beyaz-alfa, etkinde canlı mor) */
.dm-call-area.has-video .dca-split-arrow {
    height: 44px;
    background: rgba(255,255,255,0.1);
}
.dm-call-area.has-video .dca-split-arrow:hover,
.dm-call-area.has-video .dca-split-arrow[aria-expanded="true"] {
    background: rgba(255,255,255,0.2);
    color: white;
}
.dm-call-area.has-video .dca-split > .dca-ctrl-btn.active + .dca-split-arrow {
    background: rgba(88,101,242,0.42);
    color: #aabbff;
    box-shadow: 0 0 0 2px rgba(88,101,242,0.65),
                0 4px 14px rgba(88,101,242,0.3);
}
.dm-call-area.has-video .dca-split > .dca-ctrl-btn.active + .dca-split-arrow:is(:hover, [aria-expanded="true"]) {
    background: rgba(88,101,242,0.55);
    color: white;
}

/* ── DM-CALL-COMPACT-HEADER-1: video katmanında DM başlığı + arama alanı TEK alan (Discord DM araması paritesi) ──
   Kamera / ekran yayını varken (`has-video`) DM başlığı (`#main-chat-header`: avatar, ad, durum, pin, arama) arama alanıyla birleşir:
   • Arama alanının zemini başlığın ARKASINA uzar (`::before`, yükseklik `.chat-header` ile AYNI 49 px); başlığın kendi zemini, alt
     çizgisi ve bulanıklığı kalkar → tek yüzey. Başlık AKIŞTA kalır: hiçbir öğenin yeri / boyu değişmez (karo sığdırma, sohbet kabı,
     Tam Ekran yer tutucusu, dip sabitleme gözlemcisi AYNI ölçüleri görür).
   • DM-CALL-HEADER-ALWAYS-VISIBLE-1: başlığın içeriği (avatar, ad, durum, pin, arama, diğer eylemler) HER ZAMAN görünür — fare arama
     alanında olmasa da; opaklık / görünürlük kuralı YOK. Gizlenip görünen YALNIZ alttaki kontrol bandıdır (fare · klavye odağı ·
     açık split menüsü — yukarıdaki kural AYNEN); başlığa gelmek kontrol bandını da gösterir (tek alan).
   • Başlık kutusu tıklamayı GEÇİRİR (çocukları alır): boş başlık şeridi arama alanına aittir → kalite menüsünün şeride uzanan üst
     kısmı görünür ve tıklanır.
   Video yokken (yalnız ses) başlık DEĞİŞMEZ; Tam Ekran'da şerit çizilmez (çubuk pencereyi kaplar). Koşul yalnız GÖRÜNÜR DM arama
   çubuğunun video katmanı → sunucu görünümü / ses kanalı lobisi / arkadaşlar etkilenmez. */
.dm-call-area.has-video:not(.dca-fullscreen)::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 49px;
    background: inherit;
}
.chat-members-wrapper:has(#dm-chat-call-bar.has-video:not(.hidden)) #main-chat-header {
    background: transparent;
    border-bottom-color: transparent;
    backdrop-filter: none;
    pointer-events: none;
}
.chat-members-wrapper:has(#dm-chat-call-bar.has-video:not(.hidden)) #main-chat-header > * {
    pointer-events: auto;
}
.chat-members-wrapper:has(#main-chat-header:hover) .dm-call-area.has-video .dca-controls {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ── DM-CALL-SCREEN-FULLSCREEN-1: Tam Ekran ──
   Düğme: kontrol satırının SAĞ ucunda, ses lobisi Tam Ekran düğmesiyle aynı 34 px / 8 px köşe dili. Medyaya BAĞLI DEĞİL — aramanın tam
   görünümü + katılım yeter (DM-CALL-VOICE-FULLSCREEN-1): video katmanında (has-video) ikon video üstü gradyanda beyaz, katman yokken tema rengi. top / bottom
   VERİLMEZ: mutlak konumlu flex çocuğunun statik konumu düğmeyi grupların orta çizgisine hizalar.
   Mod: uygulama içi tam pencere (Fullscreen API YOK — ses lobisi Tam Ekran'ıyla aynı). Katman 250: kalıcı yerleşimin (ray,
   kenar çubukları, araç çubuğu ≤ 210) ÜSTÜNDE; profil kartı 300, menü 310, modal 600, gelen arama 700, balon / pencere
   düğmeleri 9999 ÜSTTE kalır. Sohbet kabı yerinde kalır: çubuğun akıştaki yeri `.dca-fs-spacer` ile tutulur (app.js). */
.dca-fullscreen-btn {
    position: absolute;
    right: 16px;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.dca-fullscreen-btn:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
}
/* DM-CALL-VOICE-FULLSCREEN-1 — düğme yalnız sesli aramada da var: video katmanı yokken kontrol satırı tema zeminindedir → ikon tema
   renginde (video üstü beyaz ikon yalnız video katmanında / Tam Ekran'da). */
.dm-call-area:not(.has-video) .dca-fullscreen-btn { color: var(--text-secondary); }
.dm-call-area:not(.has-video) .dca-fullscreen-btn:hover { background: rgb(var(--overlay-rgb) / 0.08); color: var(--text-primary); }
/* DM-SCREEN-STREAM-VOLUME-1 — izlenen uzak yayının sesi: ses lobisi bileşeninin (`.voice-lobby-stream-vol` + `.vlsv-*`) AYNISI, yalnız yer ve
   ikon rengi DM'e uyar. Tam Ekran düğmesinin 8 px SOLU (16 + 34 + 8 = 58 px — ses lobisiyle aynı ölçü, `right` ortak kuraldan); top /
   transform VERİLMEZ: mutlak konumlu flex çocuğunun statik konumu kontrolü grupların orta çizgisine hizalar (Tam Ekran düğmesi gibi; video
   katmanında bandın üst payı alt payından büyüktür). Kontrol yalnız karşı tarafın yayını gösterilirken → hep video katmanında: ikon Tam
   Ekran düğmesinin video üstü beyaz dilinde. */
.dca-controls .dca-stream-vol {
    top: auto;
    transform: none;
}
.dca-controls .dca-stream-vol .vlsv-btn { color: rgba(255,255,255,0.85); }
.dca-controls .dca-stream-vol .vlsv-btn:hover,
.dca-controls .dca-stream-vol.is-dragging .vlsv-btn {
    background: rgba(255,255,255,0.14);
    color: #fff;
}
/* DM-CALL-MEDIA-FOCUS-PARITY-1 — "Üyeleri Gizle / Göster": ses lobisi düğmesiyle (`.voice-lobby-members-toggle`) AYNI hap — 22 px yükseklik,
   12 px yatay pay, tam yuvarlak, ok (14 px) + kişiler (16 px) ikonu, 4 px aralık; ok yönü durumu gösterir (gizliyken yukarı). DM'de hap
   HER ZAMAN medyanın üstünde yüzer → ses lobisinin yayın üstü dili (koyu yarı saydam zemin + beyaz ikon). Yer — ses lobisinde odaklı yayın
   ile şeridin ARASINDA, gizliyken şeridin yerinde: köşe şeridinin ORTASINDA, köşe karolarının 6 px üstünde (12 + 90 + 6 = 108 px); gizliyken
   şeridin yerinde (12 px). Yatay merkez şerit boyundan: 1 karo 12 + 72 = 84 px, 2 karo 12 + 148 = 160 px, 3 karo 12 + 224 = 236 px
   (`dca-strip-2` / `-3`; `translate` ile ortalanır). Kontrol bandına BAĞLI DEĞİL (fare dışarıdayken de görünür); bant görünürken köşe
   karolarıyla birlikte 62 px kalkar (aşağıdaki kural) ve bandın (z 20) üstünde tıklanır. */
.dca-members-toggle {
    position: absolute;
    right: 84px;
    bottom: 108px;
    translate: 50% 0;
    z-index: 21;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 22px;
    padding: 0 12px;
    border: none;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 180ms ease;
}
.dca-members-toggle:hover { background: rgba(0, 0, 0, 0.75); }
.dca-tiles.stream-focus.dca-strip-2 .dca-members-toggle { right: 160px; }
.dca-tiles.stream-focus.dca-strip-3 .dca-members-toggle { right: 236px; }
/* DM-CALL-FOCUS-VISUAL-PARITY-1: gizliyken şeridin yerine inme YALNIZ normal görünümde — Tam Ekran'da gizlemek köşe karolarını gösterir,
   hap onların üstünde kalır ("Üyeleri Göster" → alttaki ses lobisi şeridi). */
.dm-call-area:not(.dca-fullscreen) .dca-tiles.stream-focus.members-hidden .dca-members-toggle { bottom: 12px; }
/* DM-CALL-FULLSCREEN-MEMBERS-1: Tam Ekran'da gizliyken köşe karosu YOKSA (tek medya — şeritte yalnız ana karonun vekili vardı) hap ses lobisi
   gibi altta ORTADA, şeridin yerinde (12 px); kontrol bandı görününce aşağıdaki köşe kalkışıyla (62 px) düğmelerin üstüne çıkar. */
.dm-call-area.dca-fullscreen .dca-tiles.stream-focus.members-hidden:not(:has(> .dca-tile.stream-pip)) .dca-members-toggle {
    left: 50%;
    right: auto;
    bottom: 12px;
    translate: -50% 0;
}
/* Tam Ekran + üyeler görünür (`dca-voice-strip`): hap ses lobisi düğmesinin yerinde ve renginde — ana karo ile alttaki şeridin ARASINDA,
   yatayda ortalı (şerit karolarının 4 px üstü: alt pay 76 + şerit karosu yüksekliği + 4), sahne üstü tema renkleri; bandın altındaki
   katmanda (açık split menüleri üstünde). */
.dm-call-area .dca-tiles.stream-focus.dca-voice-strip .dca-members-toggle {
    left: 50%;
    right: auto;
    bottom: calc(76px + var(--dca-sw, 128px) * 9 / 16 + 4px);
    translate: -50% 0;
    z-index: 3;
    background: rgb(var(--overlay-rgb) / 0.1);
    color: var(--text-secondary);
    transition: background 0.15s ease, color 0.15s ease;   /* ses lobisi hapının geçişi: kalkış yok → transform geçişi de yok (kip değişiminde kaymaz) */
}
.dm-call-area .dca-tiles.stream-focus.dca-voice-strip .dca-members-toggle:hover {
    background: rgb(var(--overlay-rgb) / 0.18);
    color: var(--text-primary);
}
.dca-members-toggle svg { display: block; flex-shrink: 0; }
.dca-members-toggle .vlm-chevron { transition: transform 0.15s ease; }
.dca-members-toggle[aria-expanded="false"] .vlm-chevron { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) {
    .dca-members-toggle .vlm-chevron { transition: none; }
}
/* Kontrol bandı görünürken (fare üstünde / klavye odağı) bant sahnenin altını kaplar (Tam Ekran düğmesi sağ alt köşede) → köşe
   karoları (PiP) bandın ÜSTÜNE kalkar, bant / düğme karoların üstüne binmez (bantla aynı 180 ms geçiş). DM-CALL-COMPACT-HEADER-1:
   tetikler kontrol bandının göster kuralıyla AYNI (fare / klavye odağı / açık split menüsü; normal görünümde başlığa gelmek de) → bant
   görünür ⇔ karo kalkık; fare pencereden çıkınca (odak fareyle tıklanan düğmede kalsa da) ikisi birlikte iner.
   DM-CALL-MEDIA-FOCUS-PARITY-1: köşe karosu artık normal görünümün odak düzeninde de var (yalnız kamera dahil) → kalkış Tam Ekran
   düğmesine BAĞLI DEĞİL, her odak düzeninde (62 px AYNEN). Geçiş YALNIZ kalkış (transform): ızgaradan köşeye geçen karonun genişliği
   enterpole edilseydi yükseklik (16:9 `auto`) sıçradığından ilk karelerde yassı bir şerit çizilirdi.
   DM-CALL-FOCUS-VISUAL-PARITY-1: Tam Ekran'ın ses lobisi şeridi kipinde (`dca-voice-strip`) şerit bandın yerinde değil → kalkış YOK; kalkış
   geçişi de YOK (şerit karosu ızgara karosunun `transition: none`unu alır) → kalkık köşe karosu şeride geçerken kaymaz, ilk karede yerinde. */
.dm-call-area .dca-tiles.stream-focus:not(.dca-voice-strip) .dca-tile.stream-pip {
    transition: transform 180ms ease;
}
.dm-call-area.has-video:is(:hover, .controls-visible) .dca-tiles.stream-focus:not(.dca-voice-strip) .dca-tile.stream-pip,
.dm-call-area.has-video:has(:focus-visible) .dca-tiles.stream-focus:not(.dca-voice-strip) .dca-tile.stream-pip,
.dm-call-area.has-video:has(.dca-menu:not(.hidden)) .dca-tiles.stream-focus:not(.dca-voice-strip) .dca-tile.stream-pip,
.chat-members-wrapper:has(#main-chat-header:hover) .dm-call-area.has-video .dca-tiles.stream-focus:not(.dca-voice-strip) .dca-tile.stream-pip {
    transform: translateY(-62px);
}
/* "Üyeleri Gizle / Göster" hapı köşe şeridiyle BİRLİKTE kalkar (aynı tetikler, aynı 62 px) → şeridin üstünde / yerinde kalır. */
.dm-call-area.has-video:is(:hover, .controls-visible) .dca-tiles.stream-focus:not(.dca-voice-strip) .dca-members-toggle,
.dm-call-area.has-video:has(:focus-visible) .dca-tiles.stream-focus:not(.dca-voice-strip) .dca-members-toggle,
.dm-call-area.has-video:has(.dca-menu:not(.hidden)) .dca-tiles.stream-focus:not(.dca-voice-strip) .dca-members-toggle,
.chat-members-wrapper:has(#main-chat-header:hover) .dm-call-area.has-video .dca-tiles.stream-focus:not(.dca-voice-strip) .dca-members-toggle {
    transform: translateY(-62px);
}
/* Tam Ekran'ın ses lobisi şeridi kipinde kontrol bandının kutusu YALNIZ düğme şeridi kadar (6 + 60 + 10 = 76 px = şeridin alt payı): açılan
   bant şeridi / hapı örtmez, üstlerindeki tıklamayı yutmaz. Düğmeler / Tam Ekran düğmesi / split menüleri YERİNDE; köşe düzeninde AYNEN. */
.dm-call-area.has-video:has(> .dca-tiles.stream-focus.dca-voice-strip) .dca-controls {
    padding-top: 6px;
}
.dm-call-area.dca-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 250;
    background: var(--bg-primary);
    border-bottom: none;
}
.dm-call-area.dca-fullscreen .dca-tiles.stream-focus {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
}
/* DM-CALL-VOICE-FULLSCREEN-1 — medyasız Tam Ekran (yalnız ses / çalarken yalnız arayan): katılımcılar video katmanının 16:9 avatar
   karolarıyla (`_fitDMCallTiles`) pencereyi doldurur; üst pay başlığa (44), alt pay kontrol bandına (76) ayrılır (Tam Ekran şerit
   kipiyle AYNI paylar). Çalma halkası (Karar #104) karonun kendi kuralıyla AYNEN. */
.dm-call-area.dca-fullscreen .dca-tiles:not(.stream-focus) {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    padding: 44px 16px 76px;
}
.dca-fs-spacer {
    flex: 0 0 auto;
}

/* ═══════════════ CALL SYSTEM MESSAGE ═══════════════ */
.system-call-msg {
    /* Normal mesaj hizası: .message ile aynı yatay padding (8px); ikon 40px'lik
       avatar sütununu kaplar (SVG içeriği preserveAspectRatio ile 16px kalıp
       ortalanır) + aynı 14px sütun boşluğu → metin normal mesaj metniyle
       (8+40+14=62px) aynı x'te başlar. */
    display: flex;
    align-items: center;
    gap: 0;
    padding: 3px 8px;
    font-size: 13px;
    color: var(--text-muted);
    user-select: text;
}
.system-call-msg .call-msg-icon {
    width: 40px;
    margin-right: 14px;
    color: #3ba55c;
    flex-shrink: 0;
    opacity: 0.9;
}
.system-call-msg .call-msg-author {
    color: var(--text);
    font-weight: 600;
    flex-shrink: 0;
    background: none;
    border: 0;
    padding: 0;
    margin-right: 5px; /* ad ↔ metin boşluğu (eski flex gap'in yerine) */
    font: inherit;
    cursor: pointer;
}
.system-call-msg .call-msg-author:hover {
    text-decoration: underline;
}
.system-call-msg .call-msg-text {
    color: var(--text-secondary);
}
.system-call-msg .call-msg-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 4px;
    opacity: 0.7;
}

/* ─── Two-Factor Authentication ──────────────────────────────────────── */

#twofa-login-modal { z-index: 1100; }
.twofa-modal {
    max-width: 480px;
    width: 90vw;
}
/* Doğrula/Giriş Yap ile İptal butonları AYNI yükseklikte olmalı.
   Tek fark, `.btn-primary`'nin giriş formu için konan `margin-top: 4px`'iydi:
   modal aksiyon satırında birincil butonu 4px aşağı kaydırıp kısaltıyordu.
   Sıfırlandığında `.modal-actions`'ın flex `align-items: stretch` varsayılanı
   yükseklikleri kendiliğinden eşitler → sabit yükseklik de, kutu modelini
   zorlayan şeffaf kenarlık da GEREKMEZ. (Şeffaf kenarlık gradyan zeminde
   1px'lik açık hale bırakıp rengi bozuyordu.)
   (`#pin-confirm-modal` için aynı `margin-top` düzeltmesi mevcut.) */
.twofa-modal .modal-actions .btn-primary {
    margin-top: 0;
}
.twofa-modal .input-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}
.twofa-modal h3 {
    margin: 0 0 16px;
    font-size: 20px;
    color: var(--text-primary);
}
.twofa-modal h4 {
    margin: 0;
    color: var(--text-primary);
}
.twofa-step-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}
.twofa-qr-container {
    display: flex;
    justify-content: center;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 16px;
}
.twofa-qr-img {
    width: 200px;
    height: 200px;
    image-rendering: pixelated;
}
.twofa-secret-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-radius: 6px;
    margin-bottom: 4px;
}
.twofa-secret-label {
    color: var(--text-secondary);
    font-size: 12px;
    white-space: nowrap;
}
.twofa-secret-code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    color: var(--text-primary);
    letter-spacing: 1.5px;
    word-break: break-all;
    flex: 1;
}
.twofa-copy-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
}
.twofa-copy-btn:hover {
    color: var(--text-primary);
    background: rgb(var(--overlay-rgb) / 0.08);
}
.twofa-success-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}
.twofa-backup-title {
    text-align: center;
    font-size: 18px;
    margin-bottom: 12px;
    color: #43b581;
}
.twofa-backup-warning {
    display: flex;
    /* Metin sarınca ikon ilk satırda kalsın (ortalanıp aşağı kaymasın). */
    align-items: flex-start;
    gap: 10px;
    padding: 11px 14px;
    background: rgba(250, 166, 26, 0.12);
    border: 1px solid rgba(250, 166, 26, 0.3);
    border-radius: 8px;
    color: var(--tint-amber, #faa61a);
    font-size: 13px;
    line-height: 1.45;
    margin-bottom: 16px;
}

/* İnce çizgili (stroke) uyarı ikonu — index.html'deki diğer ikonlarla aynı
   dil. Küçülmemesi için flex-basis sabit; 1px optik düzeltme metnin ilk
   satırının x-yüksekliğiyle hizalar. */
.twofa-warning-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin-top: 1px;
}
.twofa-backup-codes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}
.twofa-backup-code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 15px;
    letter-spacing: 2px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    padding: 8px 12px;
    border-radius: 4px;
    text-align: center;
    user-select: all;
}
.twofa-backup-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}
.twofa-backup-actions .btn-secondary {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    padding: 6px 14px;
}
.twofa-status-info {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.twofa-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}
.twofa-status-badge.twofa-active {
    background: rgba(67, 181, 129, 0.15);
    color: #43b581;
}
.twofa-backup-remaining {
    color: var(--text-secondary);
    font-size: 13px;
}
.twofa-login-alt {
    text-align: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}
.twofa-login-alt a {
    color: var(--link-color, #00aff4);
    font-size: 13px;
    text-decoration: none;
}
.twofa-login-alt a:hover {
    text-decoration: underline;
}
.twofa-info-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}
.twofa-info-title {
    text-align: center;
    font-size: 18px;
    margin: 0 0 10px;
    color: var(--text-primary);
}
.twofa-info-apps {
    margin-bottom: 14px;
}
.twofa-info-apps-label,
.twofa-info-steps-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.twofa-info-app-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.twofa-info-app {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-primary);
}
.twofa-info-steps {
    margin-bottom: 16px;
}
.twofa-info-step-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 14px;
    color: var(--text-secondary);
}
.twofa-info-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}
.dm-ccb-end {
    color: var(--dnd);
}
.dm-ccb-end:hover {
    background: rgba(237, 66, 69, 0.2);
    color: var(--dnd);
}

/* ═══════════════════════════════════════════════════════════════
   VOICE CHANNEL FULL VIEW (2nd click on voice channel)
   ═══════════════════════════════════════════════════════════════ */
.voice-lobby {
    display: flex;
    flex-direction: column;
    background: var(--ui-stage);
    flex: 1;
    overflow: hidden;
}
.voice-lobby.hidden { display: none; }

.voice-lobby-stage {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    overflow-y: auto;
}
/* VOICE-LOBBY-UNIFIED-GRID: bağlı karo ızgarası / odak görünümü lobi başlığının ve sohbet düğmesinin
   ALTINDAN başlar (dolduran ızgara üst köşelere uzanır; başlık karoya binmez). Boş ve önizleme
   sahneleri kendi dolgusunu korur. */
.voice-lobby-stage:not(.empty):not(.vlobby-empty-stage) { padding-top: 56px; }
.voice-lobby-stage.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: var(--text-muted);
    font-size: 14px;
    gap: 8px;
}
.voice-lobby-stage.empty .empty-icon {
    width: 64px; height: 64px; border-radius: 50%;
    background: rgb(var(--overlay-rgb) / 0.04);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
}
/* Empty voice channel (left voice, no one here): full-bleed ANIMATED gradient over the whole
   stage. Applied ONLY when renderVoiceLobby adds .vlobby-empty-stage (not-connected + empty);
   an occupied channel keeps the normal dark lobby with user tiles. */
.voice-lobby-stage.vlobby-empty-stage {
    position: relative;
    overflow: hidden;
    /* Big multi-stop gradient that visibly SWEEPS via background-position (reliable in WebView). */
    background: linear-gradient(125deg,
        var(--aurora-1) 0%, var(--aurora-2) 22%, var(--aurora-3) 42%, var(--aurora-4) 62%, var(--aurora-5) 82%, var(--aurora-6) 100%);
    background-size: 300% 300%;
    animation: vlobbyAurora 16s ease-in-out infinite alternate;
}
/* Two large blurred "aurora blobs" that travel diagonally + breathe — clearly visible motion.
   Both sit at z-index:0, below the z-index:1 foreground content (.vlobby-empty). */
.voice-lobby-stage.vlobby-empty-stage::before,
.voice-lobby-stage.vlobby-empty-stage::after {
    content: '';
    position: absolute;
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(55px);
    will-change: transform, opacity;
}
.voice-lobby-stage.vlobby-empty-stage::before {
    width: 58%; height: 58%;
    left: -12%; bottom: -14%;
    background: radial-gradient(circle, var(--aurora-blob-a), transparent 66%);
    animation: vlobbyBlobA 12s ease-in-out infinite alternate;
}
.voice-lobby-stage.vlobby-empty-stage::after {
    width: 52%; height: 52%;
    right: -10%; top: -12%;
    background: radial-gradient(circle, var(--aurora-blob-b), transparent 66%);
    animation: vlobbyBlobB 15s ease-in-out infinite alternate;
}
@keyframes vlobbyAurora {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 50% 100%; }
}
@keyframes vlobbyBlobA {
    0%   { transform: translate3d(0, 0, 0) scale(1);    opacity: 0.65; }
    100% { transform: translate3d(48%, -34%, 0) scale(1.25); opacity: 1; }
}
@keyframes vlobbyBlobB {
    0%   { transform: translate3d(0, 0, 0) scale(1.1);  opacity: 0.9; }
    100% { transform: translate3d(-42%, 40%, 0) scale(0.9); opacity: 0.55; }
}
/* Respect reduced-motion, but keep a gentle aurora sweep instead of going fully static. */
@media (prefers-reduced-motion: reduce) {
    .voice-lobby-stage.vlobby-empty-stage {
        animation: vlobbyAurora 30s ease-in-out infinite alternate;
    }
    .voice-lobby-stage.vlobby-empty-stage::before {
        animation: vlobbyPulse 8s ease-in-out infinite alternate;
    }
    .voice-lobby-stage.vlobby-empty-stage::after {
        animation: vlobbyPulse 11s ease-in-out infinite alternate;
    }
}
@keyframes vlobbyPulse {
    0%   { opacity: 0.6; }
    100% { opacity: 1; }
}
/* Centered foreground content above the gradient. */
.vlobby-empty {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    text-align: center;
    text-shadow: 0 1px 12px rgb(var(--text-glow-rgb) / 0.35);
}
.vlobby-empty-icon {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--aurora-icon-bg);
    display: flex; align-items: center; justify-content: center;
    color: var(--aurora-icon-fg); margin-bottom: 4px;
}
.vlobby-empty-title { font-size: 24px; font-weight: 700; color: var(--aurora-fg); }
.vlobby-empty-sub { font-size: 14px; line-height: 1.5; color: var(--aurora-fg-soft); margin-bottom: 10px; }
.vlobby-empty-join {
    padding: 10px 24px; border-radius: 10px; border: none;
    background: var(--aurora-btn-bg); color: var(--aurora-btn-fg); font-weight: 600; font-size: 14px;
    cursor: pointer; transition: opacity var(--transition);
}
.vlobby-empty-join:hover { opacity: 0.9; }

/* Spectator preview: NOT connected but the channel HAS users → Discord-style colorful join screen
   (avatar tiles row + channel name + "X kişi sesli sohbette" + Katıl). Reuses .vlobby-empty-* text/button. */
.vlobby-preview {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    text-align: center;
    text-shadow: 0 1px 12px rgb(var(--text-glow-rgb) / 0.35);
}
.vlp-tiles { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 6px; max-width: 600px; }
.vlp-tile {
    width: 120px; height: 92px; border-radius: 14px;
    background: var(--aurora-tile-bg);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}
.vlp-tile img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; }
.vlp-initial {
    width: 54px; height: 54px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 22px;
}
.vlp-more { color: var(--aurora-more-fg); font-weight: 700; font-size: 18px; }

/* User tile in voice view */
.voice-tile {
    position: relative;
    /* Genişlik JS auto-fit ile (_fitVoiceLobbyTiles → --vt-w): tüm katılımcılar stage'e (W×H)
       sığacak şekilde dinamik küçülür. Değişken yoksa (ör. ilk layout) güvenli varsayılana düşer.
       Odak görünümü / alt şerit kendi genişliğini daha yüksek özgüllükle ezer.
       VOICE-LOBBY-UNIFIED-GRID: 16:9 (Discord); karo içeriği karonun KENDİ genişliğine göre
       ölçeklenir (container query `vtile`: avatar, teklif kartı, plakalar). */
    width: var(--vt-w, min(420px, 100%));
    aspect-ratio: 16 / 9;
    container: vtile / inline-size;
    background: var(--surface-tile, var(--ui-secondary));
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
/* Tıklanabilir karolar (odak / izleme) imleçle belli olur; üzerine gelince ince bir çerçeve
   (konuşma halkası her zaman öncelikli). */
.voice-tile[data-tile-type="screen"],
.voice-tile[data-tile-type="camera"],
.voice-tile[data-tile-type="screen-offer"] { cursor: pointer; }
.voice-tile:not(.speaking):hover { border-color: rgb(var(--overlay-rgb) / 0.16); }
/* Speaking indicator — accent color glow around tile */
.voice-tile.speaking {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent), 0 0 12px rgba(6, 182, 212, 0.4);
}
.voice-tile-avatar {
    /* VOICE-LOBBY-UNIFIED-GRID: karo genişliğiyle ölçeklenir (küçük karoda 40 px, büyükte 96 px). */
    width: clamp(40px, 20cqw, 96px); height: clamp(40px, 20cqw, 96px);
    flex-shrink: 0;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: clamp(16px, 8cqw, 38px); font-weight: 700;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    transition: box-shadow 0.2s;
}
.voice-tile.speaking .voice-tile-avatar {
    box-shadow: 0 0 0 3px var(--accent), 0 4px 16px rgba(6, 182, 212, 0.5);
}
.voice-tile video {
    width: 100%; height: 100%;
    object-fit: cover;
    background: #000;
}
/* VOICE-LOBBY-UNIFIED-GRID: ekran yayını KIRPILMAZ (Discord) — tüm ekran görünür, kalan alan siyah;
   odaktaki karo (kamera dahil) de tam kareyi gösterir. */
.voice-tile[data-tile-type="screen"] video,
.voice-lobby-stage.focus-mode .voice-tile.focused video { object-fit: contain; }
/* Karo plakaları (ad / rozet / sayaç / ikon) medya üstünde okunur kalan ortak koyu yarı saydam dili paylaşır
   (backdrop-filter YOK — her video karesinde yeniden bulanıklaştırma maliyeti). */
.voice-tile-name {
    position: absolute;
    bottom: 8px; left: 8px;
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 16px;
    font-weight: 600;
    color: #fff;
    max-width: calc(100% - 72px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* VOICE-STREAM-TILE-IDENTITY-1: yayın karosunun ad plakasında adın SOLUNDAKİ ekran paylaşımı ikonu — metin renginde, yazı
   boyutuyla ölçeklenir (kompakt plakada da); ad sığmazsa yalnız ad kısalır (…), ikon görünür kalır. */
.voice-tile-name-icon {
    display: inline-block;
    width: 1.15em; height: 1.15em;
    margin-right: 0.4em;
    vertical-align: -0.2em;
}
.voice-tile-name-icon svg { display: block; width: 100%; height: 100%; }
.voice-tile-icons {
    position: absolute;
    bottom: 8px; right: 8px;
    display: flex; gap: 4px;
}
.voice-tile-icon {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
}
.voice-tile-icon svg { width: 12px; height: 12px; }

/* VOICE-LOBBY-UNIFIED-GRID: sol üst rozet kümesi — LIVE + tür etiketi ("Ekran" / "Kamera") yan yana;
   sağ üstteki izleyici sayacıyla artık ÇAKIŞMAZ. */
.voice-tile-badges {
    position: absolute;
    top: 8px; left: 8px;
    z-index: 3;
    display: flex; align-items: center; gap: 6px;
    max-width: calc(100% - 76px);
    pointer-events: none;
}
/* LIVE badge on voice tile — nabız atan nokta + hap biçimi */
.voice-tile-live-badge {
    display: inline-flex; align-items: center; gap: 5px;
    flex-shrink: 0;
    background: var(--dnd);
    color: #fff;
    font-size: 11px;
    line-height: 14px;
    font-weight: 800;
    padding: 3px 8px 3px 7px;
    border-radius: 999px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.voice-tile-live-badge::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: voice-live-pulse 1.6s ease-in-out infinite;
}
@keyframes voice-live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
    .voice-tile-live-badge::before { animation: none; }
}

/* Viewer count on tile (yalnız yayın karosunda) */
.voice-tile-viewers {
    position: absolute;
    top: 8px; right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 12px;
    line-height: 14px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    display: flex; align-items: center; gap: 4px;
    z-index: 2;
}
.voice-tile-viewers svg { display: inline-block; vertical-align: middle; }

/* Focus View layout — VOICE-LOBBY-UNIFIED-GRID (Discord) + VOICE-FOCUS-MEMBERS-TOGGLE-1: odaklı karo
   `.voice-lobby-focus-area`da kalan alana 16:9 SIĞAR (ortalı; karo yayını sarar, yanlarda siyah bant
   bırakmaz); DİĞER tüm karolar (katılımcılar + yayınlar) altta TEK yatay, kaydırılabilir
   `.voice-lobby-strip`tedir; ikisinin ARASINDA üyeleri gizle / göster düğmesi durur. Şerit gizlenince
   (`members-hidden`) boşalan alanı odaklı karo kullanır. Boyutlar container birimleriyle (ölçüm / JS yok). */
.voice-lobby-stage.focus-mode {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 4px;
    padding: 16px 16px 6px;
    /* şerit karoları sahne YÜKSEKLİĞİYLE ölçeklenir (cqh) */
    container: vstage / size;
}
/* Odakta başlık boşluğu daha dar (lobi başlığı 36 px'te biter): düğme satırının yüksekliği yayından DEĞİL
   buradan ve alt dolgudan karşılanır → üyeler görünürken yayın eski boyutunun altına düşmez. */
.voice-lobby-stage.focus-mode:not(.empty):not(.vlobby-empty-stage) { padding-top: 44px; }
.voice-lobby-focus-area {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* odaklı karo bu kutunun genişliğine VE yüksekliğine sığar */
    container: vfocus / size;
}
.voice-lobby-stage.focus-mode .voice-tile.focused {
    flex: 0 0 auto;
    width: min(100cqw, calc(100cqh * 16 / 9));
    border: 2px solid rgb(var(--overlay-rgb) / 0.1);
}
/* Üyeleri gizle / göster — ince hap düğme; ok yönü durumu gösterir (gizliyken yukarı). */
.voice-lobby-members-toggle {
    flex: 0 0 auto;
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 22px;
    padding: 0 12px;
    border: none;
    border-radius: 999px;
    background: rgb(var(--overlay-rgb) / 0.1);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.voice-lobby-members-toggle:hover {
    background: rgb(var(--overlay-rgb) / 0.18);
    color: var(--text-primary);
}
.voice-lobby-members-toggle svg { display: block; flex-shrink: 0; }
.voice-lobby-members-toggle .vlm-chevron { transition: transform 0.15s ease; }
.voice-lobby-stage.members-hidden .voice-lobby-members-toggle .vlm-chevron { transform: rotate(180deg); }
.voice-lobby-stage.members-hidden .voice-lobby-strip { display: none; }
/* VOICE-FOCUS-HIDDEN-FILL-1 — üyeler GİZLİYKEN odaklı yayın TAM TAŞMALI (full-bleed): sahne ses bölmesinin (lobi) TAMAMINI
   kaplar; üst başlık bandı ve alt denetim çubuğu ayrı yükseklik TÜKETMEZ, yayının ÜZERİNDE katman olur (Discord). Yayın
   bölmenin en büyük 16:9 ölçüsüne oturur (oran korunur — germe / kırpma YOK; çerçeve / köşe yuvarlama yok); sohbet paneli
   açıksa bölme panelin solunda biter. Katmanlar yayının üstünde: başlık + rozetler + izleyiciler + sohbet düğmesi z-index 10,
   alt çubuk z-index 5; okunurluk için üstte / altta siyah geçiş. "Üyeleri Göster" yayının üzerinde, alt çubuğun 8 px ÜSTÜNDE
   yüzer. Karonun plakaları (ad, durum ikonu, rozetler) katmanların altında kalmasın diye karo katmanlarla ne kadar kesişiyorsa
   o kadar içeri alınır. Üyeler GÖRÜNÜRKEN düzen AYNEN (yalnız `members-hidden`). Sabitler: alt çubuk 72 px (14 + 44 + 14),
   başlık bandı 46 px (sohbet düğmesi üst 12 + 34). */
.voice-lobby-stage.focus-mode.members-hidden:not(.empty):not(.vlobby-empty-stage) {
    position: relative;
    padding: 0;
    margin-bottom: -72px;
}
.voice-lobby.voice-fullscreen .voice-lobby-stage.focus-mode.members-hidden { height: auto; }
.voice-lobby-stage.focus-mode.members-hidden .voice-tile.focused { border-width: 0; border-radius: 0; }
.voice-lobby-stage.focus-mode.members-hidden::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 72px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
    pointer-events: none;
    z-index: 2;
}
.voice-lobby:has(> .voice-lobby-stage.focus-mode.members-hidden) > .voice-lobby-bar {
    z-index: 5;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
}
.voice-lobby-stage.focus-mode.members-hidden .voice-lobby-members-toggle {
    position: absolute;
    left: 50%;
    bottom: 80px;
    transform: translateX(-50%);
    z-index: 3;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
}
.voice-lobby-stage.focus-mode.members-hidden .voice-lobby-members-toggle:hover { background: rgba(0, 0, 0, 0.75); }
/* 100cqw = karonun genişliği (vtile, inline-size), 100cqh = odak alanının yüksekliği (vfocus, size); karo 16:9, dikeyde ortalı →
   karonun alt çubuğa / başlık bandına taşan payı = (karo yüksekliği − alan yüksekliği) / 2 + bant. */
.voice-lobby-stage.focus-mode.members-hidden .voice-tile.focused .voice-tile-name,
.voice-lobby-stage.focus-mode.members-hidden .voice-tile.focused .voice-tile-icons {
    bottom: calc(8px + max(0px, (100cqw * 9 / 16 - 100cqh) / 2 + 72px));
}
.voice-lobby-stage.focus-mode.members-hidden .voice-tile.focused .voice-tile-badges {
    top: calc(8px + max(0px, (100cqw * 9 / 16 - 100cqh) / 2 + 46px));
}
.voice-lobby-stage.focus-mode.members-hidden .voice-tile.focused .voice-tile-watch-btn.watching {
    bottom: calc(40px + max(0px, (100cqw * 9 / 16 - 100cqh) / 2 + 72px));
}
@media (prefers-reduced-motion: reduce) {
    .voice-lobby-members-toggle .vlm-chevron { transition: none; }
}
.voice-lobby-strip {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: safe center;
    overflow-x: auto;
    overflow-y: hidden;
    /* konuşma halkası (2 px gölge) şerit kenarında kırpılmasın */
    padding: 3px;
    scrollbar-width: thin;
}
/* Şerit karoları sahne yüksekliğiyle ölçeklenir (küçük pencerede 128, büyükte 192 px — yayınla orantılı);
   sığmazsa önce 128 px'e kadar daralır (dar pencerede kırpılmasın), yine sığmazsa şerit kayar. */
.voice-lobby-strip .voice-tile {
    flex: 0 1 clamp(128px, 22cqh, 192px);
    min-width: 128px;
    aspect-ratio: 16 / 9;
}

/* Sidebar LIVE badge */
.voice-live-badge {
    background: #ed4245;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 2px;
    letter-spacing: 0.3px;
    margin-left: 4px;
    flex-shrink: 0;
}

/* Sidebar stream icon */
.voice-stream-icon {
    width: 14px; height: 14px;
    color: #ed4245;
    margin-left: 2px;
    flex-shrink: 0;
}

/* Watch stream button in sidebar */
.voice-watch-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 4px;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.15s;
    margin-left: auto;
    flex-shrink: 0;
}
.voice-channel-user:hover .voice-watch-btn { opacity: 1; }
.voice-watch-btn:hover { background: rgb(var(--overlay-rgb) / 0.1); }

/* Streaming user highlight */
.voice-channel-user.streaming { background: rgba(237, 66, 69, 0.08); border-radius: 4px; }

/* Stream quality picker modal (Discord-style) */
.stream-quality-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
}
.stream-quality-content {
    background: var(--bg-secondary, #2b2d31);
    border-radius: 12px;
    padding: 0;
    width: 420px;
    max-width: 90vw;
    color: var(--ui-text-strong);
    position: relative;
    overflow: hidden;
}
.sqm-close {
    position: absolute;
    top: 12px; right: 12px;
    background: none; border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 4px;
    z-index: 1;
}
.sqm-close:hover { color: var(--ui-text-strong); background: rgb(var(--overlay-rgb) / 0.1); }
.sqm-header {
    text-align: center;
    padding: 32px 24px 20px;
    background: linear-gradient(135deg, rgba(88,101,242,0.15), rgba(88,101,242,0.05));
}
.sqm-header .sqm-icon {
    color: var(--accent, #5865f2);
    margin-bottom: 8px;
}
.sqm-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}
.sqm-subtitle {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}
.sqm-section {
    padding: 12px 24px;
}
.sqm-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 8px;
}
.sqm-channel-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgb(var(--overlay-rgb) / 0.04);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
}
.sqm-channel-info svg { color: var(--text-muted); flex-shrink: 0; }
.sqm-track-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sqm-change-btn {
    background: rgb(var(--overlay-rgb) / 0.1);
    border: none;
    color: var(--ui-text-strong);
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    transition: background 0.15s;
}
.sqm-change-btn:hover { background: rgb(var(--overlay-rgb) / 0.18); }
.sqm-quality-row {
    display: flex;
    gap: 8px;
}
.sqm-pills {
    display: flex;
    gap: 6px;
    flex: 1;
}
.sqm-pill {
    flex: 1;
    padding: 8px 4px;
    background: rgb(var(--overlay-rgb) / 0.06);
    border: 2px solid transparent;
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    transition: all 0.15s;
}
.sqm-pill:hover { background: rgb(var(--overlay-rgb) / 0.1); }
.sqm-pill.active {
    background: var(--accent, #5865f2);
    border-color: var(--accent, #5865f2);
    color: #fff;
}
/* STREAM-QUALITY-PAYWALL-UI-1: kilitli üst kademe (1080p / 60 FPS) — görünür ama SEÇİLEMEZ (`disabled`); hover / active
   tepkisi YOK. "Yakında" rozeti ileride premium olacağını sezdirir; yayın içi alt menüde de aynı rozet. */
.sqm-pill.sqm-pill-locked {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    background: rgb(var(--overlay-rgb) / 0.03);
    border: 2px dashed rgb(var(--overlay-rgb) / 0.1);
    color: var(--ui-text-faint);
    cursor: not-allowed;
}
.sqm-pill.sqm-pill-locked:hover { background: rgb(var(--overlay-rgb) / 0.03); }
.stream-soon-badge {
    display: inline-flex; align-items: center;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 10px; font-weight: 700; line-height: 14px; letter-spacing: 0.2px;
    white-space: nowrap;
    color: var(--tint-violet, #c4b5fd);
    background: rgba(139, 92, 246, 0.16);
    border: 1px solid rgba(139, 92, 246, 0.35);
}
.sqm-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 16px 24px;
    background: rgb(0 0 0 / calc(0.15 * var(--shade-k)));
}
.sqm-btn-cancel {
    background: transparent;
    border: none;
    color: var(--ui-text-secondary);
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}
.sqm-btn-cancel:hover { text-decoration: underline; }
.sqm-btn-go-live {
    background: #3ba55c;
    border: none;
    color: #fff;
    padding: 10px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.15s;
}
.sqm-btn-go-live:hover { background: #2d8d4e; }

/* ── Voice lobby top bar (chat button top-right) ── */
.voice-lobby-top-bar {
    position: absolute;
    top: 12px; right: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}
/* VOICE-FOCUS-STREAM-PARITY-2 — odaktaki YAYININ sağ üst başlığı (sohbet düğmesinin solunda):
   [izleyiciler] [kalite + FPS — yalnız kendi yayınım] [YAYINDA]. Rozetler karo rozetleriyle AYNI sınıflar. */
.voice-focus-header {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.voice-focus-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
/* İzleyiciler: avatar yığını; üzerine gelince / klavye odağında liste (yalnız CSS — durum / dinleyici yok). */
.voice-focus-viewers {
    position: relative;
    display: flex;
    flex-shrink: 0;
    pointer-events: auto;   /* DM-SCREEN-VIEWERS-1: tıklamayı geçiren DM Tam Ekran başlığında da liste açılır */
}
.voice-focus-viewers-btn {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 4px 0 10px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    cursor: default;
}
.voice-focus-viewers-btn:hover { background: rgb(var(--overlay-rgb) / 0.08); }
.voice-focus-viewer-avatar {
    width: 22px; height: 22px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: white;   /* baş harf renkli avatar zemininde — .voice-tile-avatar ile aynı */
}
.voice-focus-viewer-avatar .avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.voice-focus-viewers-btn .voice-focus-viewer-avatar {
    margin-left: -6px;
    box-shadow: 0 0 0 2px var(--ui-stage);
}
.voice-focus-viewers-more {
    margin-left: 4px;
    font-size: 12px;
    font-weight: 600;
}
.voice-focus-viewers-panel {
    display: none;
    position: absolute;
    top: 100%; right: 0;
    /* düğme ile kart arasındaki boşluk panelin kendisidir — fare karta geçerken liste kapanmaz */
    padding-top: 8px;
    z-index: 20;
}
.voice-focus-viewers:hover .voice-focus-viewers-panel,
.voice-focus-viewers:focus-within .voice-focus-viewers-panel { display: block; }
.voice-focus-viewers-card {
    min-width: 180px;
    max-width: 260px;
    max-height: 320px;
    overflow-y: auto;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}
.voice-focus-viewers-title {
    margin-bottom: 8px;
    font-size: 11px;
    line-height: 14px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    white-space: nowrap;
}
.voice-focus-viewer-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
    line-height: 16px;
    color: var(--text-primary);
}
.voice-focus-viewer-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Small voice-channel title in the lobby (top-left) — shown since the text-channel
   header (#main-chat-header) is hidden while the lobby is active. */
.voice-lobby-title {
    position: absolute;
    top: 14px; left: 16px;
    z-index: 10;
    display: flex; align-items: center; gap: 8px;
    max-width: 60%;
    font-size: 15px; font-weight: 600;
    color: var(--text-primary);
    pointer-events: none;
    text-shadow: 0 1px 8px rgb(var(--text-glow-rgb) / 0.45);
}
.voice-lobby-title svg { width: 18px; height: 18px; opacity: 0.9; flex-shrink: 0; }
.voice-lobby-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Voice fullscreen mode ── */
.voice-lobby.voice-fullscreen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 5000;
    border-radius: 0;
    background: var(--bg-primary, #1e1f22);
}
.voice-lobby.voice-fullscreen .voice-lobby-stage {
    height: calc(100vh - 72px);
}
/* VOICE-EXPANDED-CHAT-PARITY-1 — genişletilmiş görünümde kanal sohbeti AÇIKSA pencereyi lobi tek başına değil, lobi ile
   sağ sohbet panelini ZATEN yan yana dizen ortak kap (.chat-members-content) kaplar: sohbet görünür kalır ve lobi
   kalan genişliğe normal görünümdeki AYNI esnek düzenle uyar (panel genişliği sürükleme, en dar lobi sınırı, köşe /
   boşluk). Sohbet KAPALIYKEN bu kurallar eşleşmez → lobi yukarıdaki tam ekran kuralında AYNEN kalır. Yalnız yerleşim:
   sohbet DOM'u / ses oturumu / medya DEĞİŞMEZ. Katman, sohbetin kendi üst katmanlarının (mesaj menüsü 310, profil
   kartı 300, modal 600, görsel büyütme 700) ALTINDA, kalıcı yerleşimin (ray, kenar çubukları, araç çubuğu) ÜSTÜNDE. */
.chat-members-content:has(.voice-lobby.voice-fullscreen):has(> #voice-chat-sidebar:not(.hidden)) {
    position: fixed;
    inset: 0;
    z-index: 250;
    background: var(--bg-primary);
}
.chat-members-content:has(> #voice-chat-sidebar:not(.hidden)) .voice-lobby.voice-fullscreen {
    position: static;
    z-index: auto;
}

/* ── Streamer overlay (hover controls on own streaming tile) ── */
.streamer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 5;
}
.voice-tile:hover .streamer-overlay { opacity: 1; }
.streamer-overlay-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    transition: background 0.15s;
}
.streamer-overlay-btn:hover { background: rgba(255,255,255,0.25); }
.streamer-overlay-stop {
    background: rgba(237,66,69,0.8);
}
.streamer-overlay-stop:hover { background: rgba(237,66,69,1); }

/* ── Floating voice mini-player ── */
.voice-mini-player {
    position: fixed;
    /* STREAM-MINI-PLAYER-PERSISTENCE-1: varsayılan sağ alt (JS `_applyMiniPlayerCorner` köşeyi satır içi yazar);
       küçük pencerede görünüm alanını aşmaz (genişlik ve 16:9 yükseklik birlikte kelepçelenir: alt 124 + üst 16 px).
       --vmp-w JS'teki alt kelepçe (composer büyürken üst kenar) için de kullanılır. */
    --vmp-w: min(280px, calc(100vw - 32px), calc((100vh - 140px) * 16 / 9));
    bottom: 124px;
    right: 16px;
    width: var(--vmp-w);
    background: var(--bg-tertiary, #1e1f22);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    /* Uygulama yüzeyinin ÜSTÜNDE, açılır katmanların ALTINDA (pins / mention / seçim listesi 100, menüler 200–370,
       Kullanıcı Ayarları 500, modallar 600, Gelen Kutusu 2000…): eskiden 4000 ile bunların hepsini örtüyordu. */
    z-index: 90;
    overflow: hidden;
    cursor: grab;
    user-select: none;
}
.voice-mini-player.dragging { cursor: grabbing; opacity: 0.85; }
.vmp-preview {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vmp-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.vmp-icon {
    color: var(--text-muted);
}
/* Overlay: channel name at top, buttons at bottom-right */
.vmp-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
}
.voice-mini-player:hover .vmp-overlay { opacity: 1; }
/* STREAM-MINI-OWNER-CONTROL-TOOLTIPS-1: klavyeyle yayıncı düğmesine gelinince katman da görünür (hover ile aynı) — balon
   görünmeyen bir düğmeyi göstermesin. Yalnız :focus-visible: fare tıklamasıyla gelen odak katmanı açık TUTMAZ. */
.voice-mini-player:has(.vmp-overlay-btn:focus-visible) .vmp-overlay { opacity: 1; }
.vmp-channel-link {
    pointer-events: auto;
    cursor: pointer;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
    background: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vmp-channel-link:hover { text-decoration: underline; }
.vmp-overlay-btns {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    padding: 6px 8px;
    background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
    pointer-events: auto;
}
.vmp-overlay-btn {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.vmp-overlay-btn:hover { background: rgba(0,0,0,0.75); }
/* Legacy classes kept for compat */
.vmp-info { display: none; }
.vmp-controls { display: none; }
.vmp-btn { display: none; }

/* ── Voice chat emoji button ── */
.voice-chat-emoji-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    border-radius: 4px;
    transition: color 0.15s;
}
.voice-chat-emoji-btn:hover { color: var(--text-primary); }

/* DM call video (screen share) */
.dm-call-video {
    width: 100%;
    max-height: 60vh;
    border-radius: 8px;
    margin: 12px 0;
    background: #000;
    object-fit: contain;
}

/* Bottom action bar (centered) */
.voice-lobby-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: rgb(0 0 0 / calc(0.35 * var(--shade-k)));
    flex-shrink: 0;
    position: relative;
}
.voice-lobby-bar-spacer {
    display: none;
}
/* Viewing a voice lobby you are NOT connected to: hide controls, show a Join button. */
.voice-lobby-bar.not-connected .voice-lobby-action-btn,
.voice-lobby-bar.not-connected #voice-lobby-expand-btn,
.voice-lobby-bar.not-connected .voice-lobby-bar-spacer { display: none; }
.voice-lobby-join-btn {
    display: none;
    padding: 9px 20px; border-radius: 8px; border: none;
    background: #fff; color: #1e2024; font-weight: 600; font-size: 14px;
    cursor: pointer; transition: opacity var(--transition);
}
.voice-lobby-bar.not-connected .voice-lobby-join-btn { display: inline-flex; align-items: center; }
.voice-lobby-join-btn:hover { opacity: 0.9; }

/* Circular Discord-style action buttons */
.voice-lobby-action-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ui-secondary);
    border: none;
    color: var(--ui-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}
.voice-lobby-action-btn:hover {
    background: var(--ui-active);
    color: var(--ui-text-strong);
}
.voice-lobby-action-btn.active {
    background: #fff;
    color: #2b2d31;
}
.voice-lobby-action-btn.active:hover {
    background: #d9d9d9;
}
/* When mic btn is active (muted), use slight red tint */
#voice-lobby-mic-btn.active {
    background: #fff;
    color: #2b2d31;
}
.voice-lobby-disconnect-btn {
    background: #ed4245 !important;
    color: #fff !important;
}
.voice-lobby-disconnect-btn:hover {
    background: #c03537 !important;
}

/* Small utility buttons (chat toggle, etc.) at right side of bar */
.voice-lobby-util-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}
/* Position expand button to bottom-right of lobby bar */
.voice-lobby-bar .voice-lobby-util-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}
.voice-lobby-util-btn:hover {
    background: rgb(var(--overlay-rgb) / 0.08);
    color: var(--text-primary);
}
.voice-lobby-util-btn.active {
    color: var(--text-primary);
}
/* VOICE-FOCUSED-STREAM-VOLUME-1 — odaktaki İZLENEN uzak yayının ses kontrolü: alt çubukta Tam Ekran düğmesinin 8 px SOLUNDA
   (16 + 34 + 8 = 58 px). Dikey kaydırıcı yalnız fare üstündeyken, klavye odağında ya da sürüklerken açılır; alt dolgu düğme ile
   pencere arasında fareyi düşürmez. Üyeler gizliyken alt çubuk yayının ÜSTÜNDE katman olduğundan kontrol de yayının üstünde
   kalır. Kaydırıcı dili sağ tık "Yayın Ses Seviyesi" ile aynı (`--vol` dolgusu, beyaz tutamak). */
.voice-lobby-stream-vol {
    position: absolute;
    right: 58px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    --vol: 100%;
}
.vlsv-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.vlsv-btn:hover,
.voice-lobby-stream-vol.is-dragging .vlsv-btn {
    background: rgb(var(--overlay-rgb) / 0.08);
    color: var(--text-primary);
}
/* Gizliyken `display: none` DEĞİL: kaydırıcı Tab sırasında kalır (düğmeden Tab ile geçilince görünür olur); görünmezken fareyi
   yakalamaz. */
.vlsv-pop {
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%);
    padding-bottom: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
}
.voice-lobby-stream-vol:hover .vlsv-pop,
.voice-lobby-stream-vol:has(:focus-visible) .vlsv-pop,
.voice-lobby-stream-vol.is-dragging .vlsv-pop { opacity: 1; pointer-events: auto; }
.vlsv-pop-card {
    display: flex;
    justify-content: center;
    width: 36px;
    padding: 12px 0;
    background: var(--bg-floating, #111214);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
/* Dikey: en altta 0, en üstte %100 (writing-mode + rtl); dolgu alttan yukarı. */
.vlsv-slider {
    writing-mode: vertical-lr;
    direction: rtl;
    width: 6px;
    height: 96px;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to top,
        var(--accent) 0 var(--vol), var(--bg-primary) var(--vol) 100%);
    border-radius: 999px;
    outline: none;
    cursor: pointer;
}
.vlsv-slider::-webkit-slider-runnable-track {
    width: 6px; border-radius: 999px; background: transparent;
}
.vlsv-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px; height: 14px;
    margin-left: -4px;             /* VOICE-FOCUSED-STREAM-VOLUME-2: 6 px çizgi üzerinde YATAY ortalama (dikey kaydırıcının çapraz ekseni yatay) */
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,.45);
    cursor: pointer;
}
.vlsv-slider::-moz-range-track {
    width: 6px; border-radius: 999px; background: transparent;
}
.vlsv-slider::-moz-range-thumb {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,.45);
    cursor: pointer;
}
.vlsv-slider:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Ses kanali breadcrumb'i: '#' yerine mevcut hoparlor SVG'si (13px metinle hizali). */
.toolbar-breadcrumb-voice {
    display: inline-flex;
    align-items: center;
    vertical-align: -2px;
    margin-right: 4px;
    opacity: 0.85;
}
.toolbar-breadcrumb-voice svg { width: 14px; height: 14px; }

/* ── Stream Settings Menu (context menu on screen share button) ── */
.stream-settings-menu {
    position: fixed;
    background: var(--bg-floating, #111214);
    border-radius: 8px;
    padding: 6px;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    z-index: 9999;
    animation: ssm-in 0.12s ease-out;
    /* STREAM-QUALITY-PAYWALL-UI-1: açık "Yayın Kalitesi" paneliyle görünür alandan uzun olursa kaydırılır (seçenekler erişilir) */
    max-height: calc(100vh - 16px);
    overflow-y: auto;
}
@keyframes ssm-in { from { opacity: 0; transform: translateY(6px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.ssm-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-secondary, #b5bac1);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}
.ssm-item:hover { background: rgb(var(--overlay-rgb) / 0.06); color: var(--ui-text-strong); }
.ssm-item-danger { color: #ed4245; }
.ssm-item-danger:hover { background: rgba(237,66,69,0.12); color: #ed4245; }
.ssm-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.ssm-item-expandable { position: relative; }
.ssm-arrow { margin-left: auto; font-size: 10px; color: var(--text-muted); }
.ssm-sub-panel {
    padding: 6px 10px 10px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
}
.ssm-sub-hidden { display: none; }
.ssm-sub-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin: 6px 0 4px;
}
.ssm-sub-options { display: flex; flex-direction: column; gap: 2px; }
.ssm-sub-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border-radius: 3px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}
.ssm-sub-option:hover { background: rgb(var(--overlay-rgb) / 0.06); }
.ssm-radio {
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.ssm-sub-option.active .ssm-radio {
    border-color: var(--accent, #5865f2);
}
.ssm-sub-option.active .ssm-radio::after {
    content: '';
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent, #5865f2);
}
/* STREAM-QUALITY-PAYWALL-UI-1: yayın içi alt menüde kilitli seçenek — soluk, not-allowed, hover YOK; radyo yerine rozet. */
.ssm-sub-option.ssm-sub-locked { color: var(--ui-text-faint); cursor: not-allowed; }
.ssm-sub-option.ssm-sub-locked:hover { background: none; }

/* ── Voice Tile Enter Animation ── */
@keyframes voice-tile-enter {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}
.voice-tile-enter {
    animation: voice-tile-enter 0.25s ease-out;
}

/* ── Voice Tile Type Badge (Ekran/Kamera label) — rozet kümesinde LIVE'ın yanında ── */
.voice-tile-type-badge {
    min-width: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 11px;
    line-height: 14px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* VOICE-FOCUS-STREAM-PARITY-2: kendi yayınımın kalite + FPS rozeti ("720p 30 FPS") — YAYINDA rozetinin hemen
   önünde; tür etiketiyle aynı koyu plaka dili (medya üstünde okunur). Uzak yayında çizilmez. */
.voice-tile-quality-badge {
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 11px;
    line-height: 14px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    letter-spacing: 0.2px;
    white-space: nowrap;
}
/* Odaktaki yayının durumu (YAYINDA / kalite / izleyiciler) lobinin sağ üst başlığındadır → büyük karonun
   içinde TEKRARLANMAZ (tür etiketi "Ekran" / "Kamera" kalır). */
.voice-lobby-focus-area .voice-tile.focused .voice-tile-live-badge,
.voice-lobby-focus-area .voice-tile.focused .voice-tile-quality-badge,
.voice-lobby-focus-area .voice-tile.focused .voice-tile-viewers { display: none; }
/* Odak vekili (şeritte odaktaki karonun yeri): yayın vekilinde görüntü yerine ekran ikonu; tıklanınca odak kalkar. */
.voice-tile[data-tile-type="focus-ref"] { cursor: pointer; }
.voice-tile-ref-icon {
    width: clamp(24px, 22cqw, 56px);
    height: clamp(24px, 22cqw, 56px);
    flex-shrink: 0;
    color: var(--text-muted);
}
.voice-tile-ref-icon svg { width: 100%; height: 100%; display: block; }
/* VOICE-LOBBY-MEMBER-STATUS-ICONS-1 — ses lobisinde kullanıcı karosunun TEK ses durumu ikonu (sağır > yerel
   susturma > mikrofon kapalı; ızgara, odak alanı ve üyeler şeridinde AYNI): ad plakasıyla aynı koyu plaka dili (her
   temada medya üstünde okunur), küçük köşeli kutu + sade açık glif. Glif ve durum sınıfı ses kanalı kullanıcı
   satırından gelir (`.voice-status-icon-*`): kendi / yerel durum nötr, sunucu zorlaması kırmızı. Ad plakası sol altta
   kalır — ikon adı örtmez. Ölçü ad plakasıyla birlikte ölçeklenir (büyük karo 24 px, ≤ 240 px karo 20 px). */
.voice-tile-status {
    width: 24px; height: 24px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
}
.voice-tile-status .voice-status-icon { width: 14px; height: 14px; color: inherit; opacity: 1; }
.voice-tile-status .voice-status-icon.voice-status-icon-server { color: var(--dnd); }

/* ── VOICE-WATCH-1: "Yayını İzle" / "İzlemeyi Durdur" ──────────────── */
/* VOICE-LOBBY-UNIFIED-GRID: TEKLIF kartında (`screen-offer`) buton avatar + açıklamanın ALTINDA,
   kartın tek birincil eylemidir (beyaz hap + göz ikonu). IZLERKEN tile'da video vardır; buton
   alta çekilir ve yalnız hover/focus'ta belirir — görüntünün üstünü kalıcı kapatmasın. */
.voice-tile-watch-btn {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    line-height: 16px;
    font-weight: 700;
    padding: 9px 18px 9px 14px;
    border-radius: 999px;
    color: #0b0d12;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
    white-space: nowrap;
    max-width: calc(100% - 24px);
    overflow: hidden;
    transition: background .12s ease, transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.voice-tile-watch-btn::before {
    content: '';
    width: 16px; height: 16px;
    flex-shrink: 0;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.voice-tile-watch-btn:not(.watching):hover {
    background: #e9eef6;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}
.voice-tile-watch-btn:not(.watching):active { transform: scale(0.97); }
.voice-tile-watch-btn:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
.voice-tile-watch-btn.watching {
    position: absolute;
    left: 50%;
    /* ad plakası / ikon satırının ÜSTÜNDE — uzun adla ya da çok ikonla çakışmaz */
    bottom: 40px;
    transform: translateX(-50%);
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    box-shadow: none;
    font-size: 12px;
    padding: 7px 14px 7px 11px;
    opacity: 0;
    pointer-events: none;
}
.voice-tile-watch-btn.watching::before {
    width: 14px; height: 14px;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
}
.voice-tile:hover .voice-tile-watch-btn.watching,
.voice-tile-watch-btn.watching:focus-visible {
    opacity: 1;
    pointer-events: auto;
}
.voice-tile-watch-btn.watching:hover { background: var(--dnd); }

/* VOICE-LOBBY-UNIFIED-GRID — "Yayını İzle" TEKLIF kartı (Discord yayın kartı): yayıncının
   avatarından bulanık, karartılmış zemin (her temada koyu medya yüzeyi; beyaz metin okunur) +
   ortada avatar, "Ekranını paylaşıyor" açıklaması ve birincil düğme; sol üstte LIVE, sol altta
   ad plakası. Akış / thumbnail YOK — izlenmeyen yayın çizilmez / abone edilmez. */
.voice-tile[data-tile-type="screen-offer"] {
    flex-direction: column;
    gap: 10px;
    isolation: isolate;
    background: #000;
}
.voice-tile-offer-bg {
    position: absolute;
    inset: -32px;
    z-index: -1;
    filter: blur(28px) brightness(0.55) saturate(0.85);
    font-size: 0;
    color: transparent;
    pointer-events: none;
}
.voice-tile-offer-bg .avatar-img { border-radius: 0; }
/* Zeminin üstünde, içeriğin altında hafif vinyet: kenarlar koyulaşır, orta (avatar + düğme) öne çıkar. */
.voice-tile[data-tile-type="screen-offer"]::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(120% 95% at 50% 40%, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.5) 100%);
    pointer-events: none;
}
.voice-tile[data-tile-type="screen-offer"] .voice-tile-avatar {
    width: clamp(36px, 15cqw, 72px); height: clamp(36px, 15cqw, 72px);
    font-size: clamp(14px, 6cqw, 28px);
}
.voice-tile[data-tile-type="screen-offer"]:not(.speaking) .voice-tile-avatar {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14), 0 6px 18px rgba(0, 0, 0, 0.45);
}
.voice-tile-offer-caption {
    max-width: calc(100% - 24px);
    font-size: 13px;
    line-height: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.voice-tile[data-tile-type="screen-offer"]:not(.speaking):hover { border-color: rgba(255, 255, 255, 0.22); }

/* VOICE-LOBBY-UNIFIED-GRID: karo boyutuna göre sadeleşme (`vtile` = karonun KENDİ genişliği):
   küçük karoda (çok kişi / alt şerit / dar pencere) önce açıklama, sonra teklif avatarı düşer —
   teklif kartının ortası LIVE rozetine ve ad plakasına binmez; plakalar küçülür. */
@container vtile (max-width: 400px) {
    .voice-tile-offer-caption { display: none; }
}
@container vtile (max-width: 300px) {
    .voice-tile[data-tile-type="screen-offer"] .voice-tile-avatar { display: none; }
}
@container vtile (max-width: 240px) {
    .voice-tile-watch-btn { font-size: 11px; line-height: 14px; gap: 5px; padding: 5px 11px 5px 9px; }
    .voice-tile-watch-btn.watching { bottom: 28px; }
    .voice-tile-watch-btn::before { width: 12px; height: 12px; }
    .voice-tile-badges { top: 5px; left: 5px; gap: 4px; }
    .voice-tile-live-badge { font-size: 9px; line-height: 12px; gap: 4px; padding: 2px 6px 2px 5px; }
    .voice-tile-live-badge::before { width: 5px; height: 5px; }
    .voice-tile-type-badge { font-size: 9px; line-height: 12px; padding: 2px 6px; }
    .voice-tile-quality-badge { font-size: 9px; line-height: 12px; padding: 2px 6px; }
    /* VOICE-FOCUS-STREAM-PARITY-2: küçük karoda kalite + YAYINDA çifti tüm üst satırı kullanır; izleyici sayacına yer
       kalmaz (izleyiciler odak başlığında / büyük karoda görünür). */
    .voice-tile-badges.has-quality { max-width: calc(100% - 10px); }
    .voice-tile-badges.has-quality ~ .voice-tile-viewers { display: none; }
    .voice-tile-viewers { top: 5px; right: 5px; font-size: 10px; line-height: 12px; padding: 2px 6px; }
    .voice-tile-viewers svg { width: 11px; height: 11px; }
    .voice-tile-name { bottom: 5px; left: 5px; font-size: 11px; line-height: 14px; padding: 2px 7px; border-radius: 6px; max-width: calc(100% - 56px); }
    .voice-tile-icons { bottom: 5px; right: 5px; gap: 3px; }
    .voice-tile-icon { width: 20px; height: 20px; }
    .voice-tile-icon svg { width: 10px; height: 10px; }
    .voice-tile-status { width: 20px; height: 20px; border-radius: 6px; }
    .voice-tile-status .voice-status-icon { width: 13px; height: 13px; }
}
/* En küçük şerit karosunda (dar pencere) kalite rozeti sığmaz → yalnız YAYINDA kalır. */
@container vtile (max-width: 148px) {
    .voice-tile-quality-badge { display: none; }
}

/* ── Voice Channel Timer (sidebar) ── */
.voice-channel-timer {
    font-size: 10px;
    color: var(--text-muted);
    margin-left: auto;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

/* ── Speaking Glow (sidebar user) ── */
.voice-channel-user.speaking .voice-channel-avatar {
    box-shadow: 0 0 0 2px #3ba55c, 0 0 8px rgba(59,165,92,0.4);
    border-radius: 50%;
}

/* ── Mic Test Popup ── */
.mic-test-popup {
    position: fixed;
    width: 320px;
    background: var(--bg-floating, #111214);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    z-index: 9999;
    padding: 16px;
    animation: ssm-in 0.15s ease-out;
}
.mtp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.mtp-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ui-text-strong);
}
.mtp-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
}
.mtp-close:hover { color: var(--ui-text-strong); background: rgb(var(--overlay-rgb) / 0.1); }
.mtp-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 14px;
}
.mtp-section {
    margin-bottom: 12px;
}
.mtp-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.mtp-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    /* Satır artık label DEĞİL: toggle yalnız butonun (slider) üzerinde değişir,
       soldaki metne/boşluğa tıklamak hiçbir şey yapmaz. */
    cursor: default;
    padding: 6px 0;
}
/* Label yalnız butonu sarar → tıklama/hover alanı = slider'ın kendisi */
.mtp-toggle-wrap { display: inline-flex; align-items: center; cursor: pointer; flex-shrink: 0; }
.mtp-toggle { display: none; }
.mtp-toggle-slider {
    width: 36px;
    height: 20px;
    background: #4f545c;
    border-radius: 10px;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}
.mtp-toggle-slider::after {
    content: '';
    width: 16px; height: 16px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px; left: 2px;
    transition: transform 0.2s;
}
.mtp-toggle:checked + .mtp-toggle-slider {
    background: #3ba55c;
}
.mtp-toggle:checked + .mtp-toggle-slider::after {
    transform: translateX(16px);
}
.mtp-test-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.mtp-test-btn {
    background: var(--accent, #5865f2);
    border: none;
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.mtp-test-btn:hover { background: #4752c4; }
.mtp-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 24px;
    flex: 1;
}
.mtp-bars span {
    flex: 1;
    height: 3px;
    background: #4f545c;
    border-radius: 2px;
    transition: height 0.08s ease;
}
.mtp-bars span.active { background: var(--accent, #5865f2); }
.mtp-bars span.high { background: #3ba55c; }
.mtp-status {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ═══════════════════════════════════════════════════════════════
   VOICE CHAT SIDEBAR (right panel for text chat in voice)
   ═══════════════════════════════════════════════════════════════ */
.voice-chat-sidebar {
    width: 440px;
    min-width: 440px; /* JS VCHAT_MIN_W ile eşleşir */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    /* Docked to the RIGHT window edge: right side flush/square (no rounding, no right gap),
       LEFT side rounded — facing the voice lobby across a small gap. Full height. */
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-top: none; /* üstteki bar zaten alt çizgiye sahip → çift/üst üste binen çizgi olmasın */
    border-radius: 14px 0 0 14px;
    height: 100%;
    margin: 0 0 0 5px;
    overflow: hidden;
    position: relative;
    z-index: 2;
    box-shadow: -6px 0 20px rgba(0, 0, 0, 0.28);
}
.voice-chat-sidebar.hidden { display: none; }
/* User-draggable width: invisible grab strip on the panel's LEFT edge (col-resize cursor only,
   no colored cue — Discord-style invisible handle). */
.voice-chat-resize-handle {
    position: absolute;
    left: 0;
    top: 0;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    z-index: 5;
}
/* While dragging: force resize cursor everywhere + kill text selection. */
body.resizing-vchat,
body.resizing-vchat * {
    cursor: col-resize !important;
    user-select: none !important;
}
/* Compact Discord-like header: voice icon + channel name + close X (fixed 49px) */
.voice-chat-sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 49px;
    min-height: 49px;
    padding: 0 10px 0 16px;
    border-bottom: 1px solid var(--border);
    background: rgb(0 0 0 / calc(0.12 * var(--shade-k)));
    color: var(--text-primary);
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}
.voice-chat-sidebar-header svg { color: var(--text-muted); flex-shrink: 0; }
.voice-chat-sidebar-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.voice-chat-sidebar-close {
    width: 30px; height: 30px;
    border: none; background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}
.voice-chat-sidebar-close:hover {
    color: var(--text-primary);
    background: rgb(var(--overlay-rgb) / 0.06);
}
/* Host for the RELOCATED real chat. Flex column: #messages-container (flex:1, scrolls) on top,
   composer (#message-input-area) pinned at the bottom. The relocated bars (catch-up, jump-to-
   present, typing) keep their own flow inside this column. */
.voice-chat-sidebar-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
/* Relocated message list fills the available height and scrolls (parity with main chat). */
.voice-chat-sidebar-body > #messages-container {
    flex: 1;
    min-height: 0;
}
.voice-chat-sidebar-body > #messages-container.hidden { display: none; }
/* Relocated composer + bars never shrink away. */
.voice-chat-sidebar-body > #message-input-area,
.voice-chat-sidebar-body > #channel-unread-catchup-bar,
.voice-chat-sidebar-body > #typing-indicator { flex-shrink: 0; }
/* Mention autocomplete is absolute-positioned inside #message-input-area → it already anchors
   correctly within the panel (no override needed). Tighten composer side padding for the narrow
   panel so the input pill isn't cramped. */
.voice-chat-sidebar-body > #message-input-area { padding-left: 12px; padding-right: 12px; }
/* Dar taşınmış sohbet: YATAY kaydırma çubuğu KESİNLİKLE çıkmasın. Medya/ek/embed'ler zaten
   responsive min(cap,100%) cap'leriyle panele sığar; bu, kalan geniş içerik (uzun kod, ileride
   eklenecek embed vb.) yatay taşarsa scrollbar yerine kırpılsın diye güvenlik ağıdır. Yalnız
   panele scope'ludur — ana sohbet etkilenmez. (.messages-container overflow-y:auto zaten var;
   overflow-x'i açıkça hidden yaparak spec'in 'visible→auto' hesabını bastırır.) */
.voice-chat-sidebar-body > #messages-container { overflow-x: hidden; }
.voice-chat-sidebar-body .msg-attachment audio { max-width: 100%; }
/* Boş kanal "hoş geldin" aksiyonları — YALNIZ dar ses-sohbet panelinde kompakt 2+1.
   Ana metin kanalındaki empty-state ölçüleri (.start-state-* varsayılanları) DEĞİŞMEZ:
   kural mevcut `.voice-chat-sidebar-body` scope'una bağlıdır, global buton CSS'i değil.
   Düzen: üstte 2 buton yan yana + altta 1 buton ortada — üçü de AYNI genişlikte,
   çünkü hepsi `calc(50% - gap/2)` esasını paylaşır (3. buton flex-wrap ile alt satıra
   düşer ve justify-content:center ile ortalanır; ayrı genişlik/`:nth-child` hilesi yok).
   AKIŞKAN: genişlik panelin iç genişliğine göre büyüyüp küçülür (sabit px width yok).
   FALLBACK: satıra iki buton gerçekten sığmayacak kadar daralınca (min-width eşiği)
   otomatik 1+1+1 olur; min-width `min(174px, 100%)` olduğu için dar kutuda bile
   TAŞMA/yatay scroll oluşmaz. 174px = en uzun etiketin ölçülen doğal genişliği →
   2 sütun modunda etiket kırpılmaz. */
.voice-chat-sidebar-body .channel-start-state {
    padding-left: 16px;
    padding-right: 16px;
}
.voice-chat-sidebar-body .start-state-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    width: 100%;
    max-width: min(100%, 420px);
    margin: 6px auto 0;
    gap: 6px;
}
.voice-chat-sidebar-body .start-state-card {
    --ss-icon-box: 18px;   /* panel kompakt: kutu da kucuk */
    flex: 0 1 calc(50% - 3px);
    min-width: min(174px, 100%);
    justify-content: center;
    padding: 7px 10px;
    gap: 6px;
    border-radius: 8px;
    font-size: 12px;
}
.voice-chat-sidebar-body .start-state-card-icon { font-size: 14px; }
.voice-chat-sidebar-body .start-state-card > span:not(.start-state-card-icon) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ═══════════════════════════════════════════════════════════════
   VOICE PANEL — Video / Screen buttons row
   ═══════════════════════════════════════════════════════════════ */
.voice-panel-media-row {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgb(var(--overlay-rgb) / 0.06);
}
.voice-media-btn {
    flex: 1;
    display: flex; align-items: center; justify-content: center;
    gap: 6px;
    padding: 7px 8px;
    border: none;
    border-radius: 10px;
    background: rgb(var(--overlay-rgb) / 0.06);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}
.voice-media-btn:hover {
    background: rgb(var(--overlay-rgb) / 0.12);
    color: var(--text-primary);
}
.voice-media-btn.active {
    background: rgba(88, 101, 242, 0.25);
    color: var(--accent);
}
.voice-media-btn svg { flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════
   CHANNEL HOVER ICONS (Discord-style: 3 icons on hover)
   ═══════════════════════════════════════════════════════════════ */
.channel-hover-actions,
.voice-channel-hover-actions {
    display: none;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    margin-left: auto;
}
.channel-item:hover .channel-hover-actions,
.voice-channel-header:hover .voice-channel-hover-actions {
    display: flex;
}
.channel-hover-btn {
    /* 5100 sunumu: 22 -> 20 (dokunma alani kullanilabilir kalir, glif 14px
       sabit; satir 32px oldugundan yukseklik ETKILENMEZ). */
    width: 20px; height: 20px;
    border: none; background: transparent;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    transition: color 0.15s ease, background 0.15s ease;
    padding: 0;
}
.channel-hover-btn:hover {
    color: var(--text-primary);
    background: rgb(var(--overlay-rgb) / 0.06);
}
.channel-hover-btn.danger:hover {
    color: var(--dnd);
    background: rgba(239, 68, 68, 0.12);
}
.channel-hover-btn svg { width: 14px; height: 14px; }

/* When channel is muted, show muted bell perma-visible */
.channel-item.muted .channel-name,
.voice-channel-item.muted .voice-channel-name {
    color: var(--text-muted);
    opacity: 0.6;
}
.channel-item.muted .channel-hover-actions .ch-mute-btn,
.voice-channel-item.muted .voice-channel-hover-actions .ch-mute-btn {
    color: var(--text-secondary);
    opacity: 1;
}

/* Channel settings popover menu */
.channel-settings-menu {
    position: fixed;
    z-index: 9999;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    padding: 6px;
    min-width: 200px;
}
.channel-settings-menu.hidden { display: none; }
.channel-settings-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 13px;
    transition: background 0.15s ease, color 0.15s ease;
    border: none; background: transparent; width: 100%; text-align: left;
}
.channel-settings-item:hover {
    background: var(--accent);
    color: #fff;
}
.channel-settings-item.danger {
    color: var(--dnd);
}
.channel-settings-item.danger:hover {
    background: var(--dnd);
    color: #fff;
}
.channel-settings-sep {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}
.channel-settings-item svg { width: 16px; height: 16px; flex-shrink: 0; }


/* ═══════════════ CONTEXT MENU VOLUME CONTROL ═══════════════ */
.uctx-volume-section {
    position: relative;            /* surukleme balonu bu kutuya gore konumlanir */
    padding: 8px 12px 12px;
    --vol: 100%;                   /* JS (_uctxVolumePaint) yazar: track'in DOLU kismi */
}
.uctx-volume-label {
    display: flex; align-items: center;
    font-size: 12px; font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
/* Tek parca track: dolu kisim accent, kalan notr — iki katman degil tek gradyan */
.uctx-volume-slider {
    display: block;
    width: 100%;
    height: 6px;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right,
        var(--accent) 0 var(--vol), var(--bg-primary) var(--vol) 100%);
    border-radius: 999px;
    outline: none;
    cursor: pointer;
}
.uctx-volume-slider::-webkit-slider-runnable-track {
    height: 6px; border-radius: 999px; background: transparent;
}
.uctx-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px; height: 14px;
    margin-top: -4px;              /* 6px track uzerinde dikey ortalama */
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,.45);
    cursor: pointer;
    transition: transform var(--transition);
}
.uctx-volume-slider::-moz-range-track {
    height: 6px; border-radius: 999px; background: transparent;
}
.uctx-volume-slider::-moz-range-thumb {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,.45);
    cursor: pointer;
}
.uctx-volume-slider:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.uctx-volume-section.is-dragging .uctx-volume-slider::-webkit-slider-thumb { transform: scale(1.08); }
/* Surukleme balonu: KALICI etiket degil — yalniz .is-dragging iken gorunur. */
.uctx-volume-value {
    position: absolute;
    bottom: calc(100% - 22px);
    transform: translateX(-50%);
    padding: 3px 7px;
    font-size: 11px; font-weight: 600; line-height: 1;
    color: var(--text-primary);
    background: var(--bg-floating, var(--bg-surface));
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    white-space: nowrap;
    opacity: 0; visibility: hidden;
    transition: opacity var(--transition);
    pointer-events: none;
    z-index: 2;
}
.uctx-volume-section.is-dragging .uctx-volume-value { opacity: 1; visibility: visible; }

/* ─── User ctx menu: disabled items, "Yakında" tag ─────────────────────────── */
.ctx-disabled {
    opacity: 0.45;
    cursor: not-allowed !important;
    pointer-events: auto; /* keep so click handler can show toast */
}
.ctx-disabled:hover { background: transparent !important; color: var(--text-muted) !important; }
.ctx-soon-tag {
    margin-left: auto;
    font-size: 10px;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border-radius: 3px;
    padding: 1px 5px;
    letter-spacing: .3px;
}
/* ─── User ctx menu: active/checked voice items ─────────────────────────────── */
/* Real DOM span - button::after webview flex duzeninde calismiyor */
#user-ctx-menu .ctx-item .ctx-check-icon {
    margin-left: auto;
    padding-left: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent, #5865f2);
    opacity: 0;
    flex-shrink: 0;
    transition: opacity 0.1s;
}
#user-ctx-menu .ctx-item.ctx-active .ctx-check-icon {
    opacity: 1;
}
/* ── 5100: ses toggle satirlari — Discord duzeni (metin solda, checkbox sagda).
   Checkbox gorseli Roller alt menusuyle AYNI dildir (.ctx-role-checkbox /
   .ctx-role-check); isaret bu menude .ctx-active sinifiyla tasinir. */
#user-ctx-menu .ctx-voice-toggle > span:first-child { flex: 1; min-width: 0; }
/* flex sifirlanmali: .ctx-role-checkbox da bir .ctx-item > span oldugundan
   yukaridaki flex:1 kurali 20px kutuyu buyutuyordu (5100'de olculdu). */
#user-ctx-menu .ctx-voice-toggle .ctx-role-checkbox { flex: 0 0 auto; margin-left: auto; }
#user-ctx-menu .ctx-voice-toggle .ctx-role-check { opacity: 0; transition: opacity .1s; }
#user-ctx-menu .ctx-voice-toggle.ctx-active .ctx-role-check { opacity: 1; }
#user-ctx-menu .ctx-voice-toggle.ctx-active .ctx-role-checkbox {
    background: var(--brand);
    border-color: var(--brand);
}
/* Sunucu moderasyonu satirlari DAIMA danger renginde; checkbox kendi rengini
   tanimlar (kirmizi sizmaz). */
#user-ctx-menu .ctx-item.ctx-server-voice {
    color: var(--dnd, #ed4245);
}
#user-ctx-menu .ctx-item.ctx-server-voice:hover {
    background: var(--dnd, #ed4245);
    color: white;
}
#user-ctx-menu .ctx-item.ctx-server-voice:hover .ctx-role-checkbox {
    border-color: rgba(255, 255, 255, 0.85);
}
#user-ctx-menu .ctx-item.ctx-server-voice.ctx-active:hover .ctx-role-checkbox {
    border-color: var(--brand);
}
/* Destructive moderasyon ogeleri: ORTAK .ctx-delete token'i — #user-ctx-menu
   .ctx-item ozgullugu global kurali ezdiginden per-id esitleme gerekir. */
#user-ctx-menu #uctx-timeout.ctx-delete,
#user-ctx-menu #uctx-kick.ctx-delete,
#user-ctx-menu #uctx-ban.ctx-delete {
    color: var(--dnd, #ed4245);
}
#user-ctx-menu #uctx-timeout.ctx-delete:hover,
#user-ctx-menu #uctx-timeout.ctx-delete:focus-visible,
#user-ctx-menu #uctx-kick.ctx-delete:hover,
#user-ctx-menu #uctx-kick.ctx-delete:focus-visible,
#user-ctx-menu #uctx-ban.ctx-delete:hover,
#user-ctx-menu #uctx-ban.ctx-delete:focus-visible {
    background: var(--dnd, #ed4245);
    color: white;
}
/* ─── User ctx menu: Roller submenu ─────────────────────────────────────────── */
.uctx-roles-section { position: relative; }
.ctx-submenu-trigger {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px; font-size: 13px;
    color: var(--text-secondary); border-radius: 4px;
    cursor: pointer; transition: background var(--transition);
}
.ctx-submenu-trigger:hover { background: var(--accent); color: white; }
.ctx-submenu-arrow { margin-left: auto; flex-shrink: 0; }
.ctx-submenu {
    display: none;
    position: absolute;
    left: 100%; top: 0;
    min-width: 200px; max-width: 260px;
    background: var(--bg-surface); /* ana .context-menu ile AYNI zemin token'ı */
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0,0,0,.45);
    padding: 4px 0;
    z-index: 10001;
    max-height: 240px;
    overflow-y: auto;
}
/* Open submenu on hover of trigger or when submenu itself is hovered */
.uctx-roles-section:hover .ctx-submenu,
.uctx-roles-section.is-pinned .ctx-submenu { display: block; }
.ctx-submenu-loading {
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text-muted);
}
/* Roller alt menüsü satırı (Batch 3A görsel polisaj): solda renk noktası,
   ortada ad (ellipsis), sağda SABİT genişlikte onay slotu → adlar farklı
   uzunlukta olsa da onay işaretleri AYNI hizada durur ve işaretli/işaretsiz
   geçişinde satır ZIPLAMAZ. Rol/hiyerarşi/atama mantığı DEĞİŞMEDİ. */
.ctx-submenu-item {
    display: flex; align-items: center; gap: 10px;
    min-height: 36px; box-sizing: border-box;      /* 5100 olcusu */
    padding: 6px 8px; margin: 0 4px; font-size: 14px; font-weight: 500;
    color: var(--text-secondary);
    border-radius: 4px;
}
/* KOK NEDEN DUZELTMESI: alt menu ogeleri main'de `.ctx-item` sinifini da tasir ve
   `.ctx-item { width: 100% }` yuzde-genislikli bir cocuktur; boyle bir cocuk,
   SHRINK-TO-FIT ebeveynin max-content hesabina 0 katki yapar -> `.ctx-submenu`
   `min-width: 200px`e cokup icerigi tasirir (YATAY kaydirma cubugu). `width:auto`
   ile oge yine satiri DOLDURUR (blok akisinda) ama artik max-content'e katki
   yapar -> kutu icerige gore buyur (max-width: 260px ile sinirli). Kaydirma
   cubugu GIZLENMEZ; tasma ORTADAN KALKAR. */
.ctx-submenu .ctx-item { width: auto; }
.ctx-submenu-item-clickable {
    cursor: pointer;
    border-radius: 4px;
    transition: background var(--transition);
}
.ctx-submenu-item-clickable:hover { background: var(--bg-hover); color: var(--text-primary); }
.ctx-submenu-item-readonly { cursor: default; opacity: .8; }
.ctx-role-dot {
    width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
    background: var(--text-muted);   /* "Renk Yok" → nötr nokta (mevcut sözleşme) */
}
.ctx-role-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ── 5100: bildirim alt menusu radio isareti + susturma bilgi satiri ─────── */
.cctx-radio {
    width: 18px; height: 18px; flex-shrink: 0; box-sizing: border-box;
    border: 2px solid var(--text-muted); border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    transition: border-color var(--transition);
}
.cctx-radio-on .cctx-radio { border-color: var(--accent); }
.cctx-radio-on .cctx-radio::after {
    content: ''; width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent);
}
.cctx-radio-on .ctx-role-name { color: var(--text-primary); }
.cctx-mute-info {
    padding: 6px 12px 4px;
    font-size: 11px; color: var(--text-muted);
    white-space: normal;
}
/* Karar #112 — 5100 checkbox spec (Roller alt menüsü + kullanıcı menüsü ses toggle'ları
   AYNI kutu): 20px, 1px --text-muted kenarlık, 4px köşe, beyaz tik, şeffaf zemin;
   işaretli satırda dolgu + kenarlık. Dolgu rengi 5100'deki sabit #5865F2 DEĞİL,
   depo marka kararı gereği `--brand` token'ıdır (test_brand_blurple_cleanup.js bu
   seçiciyi MUST-FIX listesinde tutar) — ölçü/kenarlık/tik/hover 5100 ile birebir. */
.ctx-role-checkbox {
    width: 20px; height: 20px; flex-shrink: 0; box-sizing: border-box;
    border: 1px solid var(--text-muted); border-radius: 4px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; background: transparent;
    transition: background var(--transition), border-color var(--transition);
}
.ctx-role-checked .ctx-role-checkbox { background: var(--brand); border-color: var(--brand); }
.ctx-role-check { flex-shrink: 0; }

/* ─── BATCH E: rol editörü renk paleti (5100 paritesi) ───────────────────
   Tek bütün palet: üst sırada büyük "Renk Yok" + "özel renk" tile'ları, altında
   küçük swatch grid'i. "Renk Yok" bir PALET RENGİ DEĞİL, ayrı bir DURUMDUR
   (NULL) — grid'e girmez; `#99AAB5` grid'de gerçek gri swatch olarak kalır.
   Özel renk tile'ı MEVCUT `.color-picker-btn` bileşenidir (ikinci bir renk
   seçici YAZILMADI). */
/* Kompakt yardım metni */
.re-color-help {
    font-size: 12px; color: var(--text-muted); line-height: 1.4;
    margin: -2px 0 10px; max-width: 420px;
}
/* Palet: içeriği kadar yer kaplar — full-width'e YAYILMAZ.
   HOVER TAŞMA PAYI BURADA DEĞİL, `.re-panel`de (kırpma kutusunun İÇİNDE)
   verilir; ayrıntı için o kuralın notuna bak. */
.re-palette {
    display: inline-flex; flex-direction: column; gap: 8px;
}
.re-palette-top { display: flex; gap: 8px; }

/* Büyük tile'lar: solda VARSAYILAN (nötr gri = NULL), yanında özel/mevcut renk.
   İkisi de AYNI kutu modelini paylaşır (box-sizing/border/ölçü/hover) — hizanın
   kaymaması için hover'da yalnız `transform` kullanılır, border KALINLIĞI
   değişmez (kalınlık değişimi layout kaydırırdı).
   `will-change: transform` KÖK NEDEN düzeltmesidir, süs değil: tile'ın layout
   konumu kesirli olduğunda hover'daki `scale()` öğeyi kendi compositing
   katmanına terfi ettiriyor, katmanın raster kökeni tam piksele yuvarlanıyor ve
   İÇERİDEKİ seçim tiki ~1px kaymış çiziliyordu. `will-change` ile öğe hover'dan
   BAĞIMSIZ olarak sürekli kendi katmanındadır → iki durumda da aynı
   rasterizasyon, tik yerinden oynamaz. */
.re-tile {
    position: relative; box-sizing: border-box;
    width: 52px; height: 52px; border-radius: 6px;
    cursor: pointer; padding: 0; margin: 0; flex: 0 0 auto;
    border: 2px solid transparent; background: var(--bg-tertiary);
    box-shadow: none;
    will-change: transform;
    transition: border-color var(--transition), transform var(--transition);
}
.re-tile:hover:not(:disabled) { transform: scale(1.06); }
.re-tile.selected { border-color: var(--text-primary); }
.re-tile:disabled { opacity: .45; cursor: default; transform: none; }

/* Varsayılan/Renk Yok: SADE nötr gri yüzey — yazı yok, slash yok.
   Bu gri YALNIZ SUNUMDUR; seçilince payload `color: null` gider. */
.re-tile-none { background: #4E5058; }
/* Özel renk tile'ı: paylaşılan `.color-picker-btn` stili (34px daire + kendi
   hover scale'i, border rengi ve box-shadow'u) dosyada SONRA geldiği için iki
   büyük tile eşit olmuyordu → palet kapsamında kutu modeli `.re-tile`
   sözleşmesine geri çekilir. Kapsam `.re-palette` ile sınırlı; renk seçicinin
   diğer tüketicisi (sunucu ikonu) ETKİLENMEZ.
   `.re-field .color-picker-btn { margin-top: 6px }` ETİKET-BAĞLAMI payı da
   miras alınıp özel tile'ı 6px aşağı kaydırdığı için `margin: 0` ile iptal
   edilir — diğer tile'a telafi ofseti verilmez. */
.re-palette .re-tile-custom.color-picker-btn {
    width: 52px; height: 52px; border-radius: 6px;
    border: 2px solid transparent; box-shadow: none;
    margin: 0;
}
.re-palette .re-tile-custom.color-picker-btn:hover {
    transform: scale(1.06); box-shadow: none; border-color: transparent;
}
.re-palette .re-tile-custom.color-picker-btn.selected { border-color: var(--text-primary); }
/* SEÇİLİ + HOVER: tik ile kalem AYNI ANDA görünmez. Fare tile üzerindeyken tik
   gizlenir, yalnız kalem (düzenleme affordance'ı) kalır; fare ayrılınca tik geri
   gelir. Seçili durumun KENDİSİ (beyaz kenarlık) hover'da da DURUR → "seçili mi?"
   bilgisi kaybolmaz. Gizleme `opacity` ile: element kutuda kalır → düzen kaymaz.
   Kapsam yalnız ÖZEL tile: varsayılan (Renk Yok) tile'ın tik davranışı DEĞİŞMEZ. */
.re-palette .re-tile-custom.color-picker-btn.selected:hover::before { opacity: 0; }
/* Kalem (edit) affordance'ı `.color-picker-btn::after`tan gelir; kare tile'a
   uydurulur ve seçim işareti ::before'a taşındığı için renk seçilmiş olsa da
   hover'da KALEM görünmeye devam eder (ikonlar birbirinin yerine geçmez). */
.re-palette .re-tile-custom.color-picker-btn::after { border-radius: 4px; }
/* Renk seçilmemişken özel tile panel zeminiyle aynı tona düşüp GÖRÜNMEZ
   oluyordu → belirgin nötr yüzey + ince iç kenarlık ile "boş özel renk yuvası"
   olarak okunur. Kenarlık aynı kapsamda verilir çünkü `.re-palette
   .re-tile-custom.color-picker-btn { box-shadow: none }` (0,3,0) daha düşük
   özgüllüklü bir kuralı ezerdi. Renk SEÇİLİNCE `.re-color-empty` kalkar →
   kenarlık da kalkar, gerçek renk yüzeyi birebir korunur. */
.re-tile-custom.re-color-empty {
    background: var(--bg-hover);
}
.re-palette .re-tile-custom.color-picker-btn.re-color-empty {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

/* Seçim işareti — tile ve swatch'larda ortak dil. `::before` KULLANILIR:
   `::after` özel renk tile'ında paylaşılan KALEM ikonuna aittir; ikisi aynı
   pseudo-element'e yazılınca renk seçildikten sonra hover'da kalem yerine check
   çıkardı. Ayrık: seçim=::before, hover affordance=::after.
   Tikin gölgesi açık renkler (ör. paletteki #FFFFFF) üzerinde okunabilmesi
   için gereklidir. */
.re-tile.selected::before, .re-swatch.selected::before {
    content: ''; position: absolute; inset: 0; margin: auto; z-index: 1;
    width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translate(1px, -2px);
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, .9));
}

/* Kompakt preset grid — eşit kare swatch'lar, düzgün hizalı satırlar */
.re-swatch-grid {
    display: grid; grid-template-columns: repeat(7, 28px); gap: 6px;
}
.re-swatch {
    position: relative; width: 28px; height: 28px; border-radius: 4px;
    cursor: pointer; padding: 0; border: 2px solid transparent;
    transition: transform var(--transition), border-color var(--transition);
}
.re-swatch:hover:not(:disabled) { transform: scale(1.12); }
.re-swatch.selected { border-color: var(--text-primary); }
.re-swatch:disabled { opacity: .45; cursor: default; transform: none; }
/* Kilitli editörde (yetki yok / eşit-üst rol) seçim yapılamaz — mevcut
   `re-locked` dilinin aynısı; gerçek otorite backend'dedir. Her swatch ayrıca
   GERÇEK `disabled` alır (bkz. `_reSelectRole`). */
.re-swatch-grid.re-locked { opacity: .6; pointer-events: none; }

/* Rol LİSTESİ göstergesi — YALNIZ SUNUM (5100 paritesi). Rengi OLMAYAN
   (NULL) rol için sade nötr gri nokta: boş/görünmez kalmaz ama "hata
   durumu" gibi de durmaz (slash/çizgi YOK). Üyeye renk VERMEZ; nullable
   `roles.color` semantiği (Karar #54) ve ad rengi sözleşmesi DEĞİŞMEZ.
   `.ccm-pick-dot` ve `.ctx-role-dot` bu listede YOKTUR — o iki yüzey nötr
   arka planı zaten KENDİ temel sınıfından alır (bkz. `_pickRoleDotHTML`
   ve `_renderContextMenuRoles`). */
.role-color-dot.no-color,
.pc-role-dot.no-color,
.role-chip-dot.no-color,
.role-opt-dot.no-color { background: #4E5058; }

/* ─── C17: kanal kenar çubuğu sürükleme tutamacı ─────────────────────────
   Görsel tanım YUKARIDA (tek otoriter `.channel-sidebar-resize-handle` kuralı,
   5100 sunumu: 8px görünmez şerit). Buradaki KOPYA tanım kaldırıldı — iki
   rakip kural cascade'de çatışıyor ve genişliği 8px yerine 6px yapıyordu.
   Sürükleme sırasında metin seçimi ve imleç titremesi olmasın: */
/* 5100 sunumu: imlec ALT OGELERE de uygulanir + `!important` -> surukleme
   sirasinda buton/link gibi kendi `cursor`u olan ogeler uzerinde imlec
   titremez. Sinif adi URETIMIN gercek sinifi (`resizing-chsidebar`). */
body.resizing-chsidebar,
body.resizing-chsidebar * { cursor: col-resize !important; user-select: none !important; }

/* ─── C20: sunucu rail tooltip'inde susturma rozeti ──────────────────────
   MEVCUT ad/ses içeriğinin altında ikincil bir satır; salt görünüm. */
/* Karar #106: DM-araması rail kartındaki DURUM satırı (Aranıyor... / Gelen Arama... /
   Sesli aramada / Tek Başına / Devam Eden Arama) aynı ikincil-satır stilini paylaşır. */
.server-tooltip-muted,
.server-tooltip-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 11px;
    color: var(--text-muted);
}
.server-tooltip-muted svg { flex-shrink: 0; }

/* ─── C3: ses kanalında katılımcı ADLARINI gizle ─────────────────────────
   YALNIZ ad metni gizlenir; avatar, mute/deafen ikonları ve YAYINDA/medya
   göstergeleri GÖRÜNÜR kalır. Ses akışına/veriye dokunmayan salt görünüm. */
.voice-channel-item.names-hidden .voice-user-name { display: none; }

/* ─── C7/C6: kanal + kategori bildirim alt menüleri ──────────────────────
   Kullanıcı menüsündeki bölümlerle AYNI desen (position:relative + :hover);
   konumlandırma ortak `_positionCtxSubmenu` ile yapılır. */
.chctx-mute-section,
.chctx-notif-section,
.srvctx-sub-section,
.cctx-mute-section { position: relative; }
.chctx-mute-section:hover .ctx-submenu,
.chctx-notif-section:hover .ctx-submenu,
.srvctx-sub-section:hover .ctx-submenu,
.cctx-mute-section:hover .ctx-submenu { display: block; }
/* Tetikleyicideki etkin mod özeti (sağda, oktan önce). */
.ctx-submenu-value {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-muted);
    /* 5100: ozet degeri sabit-genislikli menude SATIR KIRDIRMAZ — uzunsa
       ellipsis'lenir (A `.chctx-sub-value` olculeri). */
    flex: 0 0 auto;
    max-width: 120px;
    overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap;
}

/* ─── User ctx menu: self "Ses Kanalına Geç" submenu (davet alt menüsüyle aynı hover/pin deseni) ── */
.uctx-voice-move-section { position: relative; }
.uctx-voice-move-section:hover .ctx-submenu,
.uctx-voice-move-section.is-pinned .ctx-submenu { display: block; }
.uctx-voice-move-item svg { flex-shrink: 0; color: var(--text-muted); }
.uctx-voice-move-item:hover svg { color: inherit; }
.uctx-voice-move-count { margin-left: auto; font-size: 11px; color: var(--text-muted); }

/* ─── User ctx menu: Sunucuya Davet Et submenu ───────────────────────────── */
.uctx-invite-section { position: relative; }
.uctx-invite-section:hover .ctx-submenu,
.uctx-invite-section.is-pinned .ctx-submenu { display: block; }
/* Scoped container override — matches main #user-ctx-menu theme */
.uctx-invite-section .ctx-submenu {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    padding: 6px;
    min-width: 200px;
    max-width: 260px;
    max-height: 280px;
    overflow-y: auto;
    left: calc(100% - 1px);
}
/* Sağda yer yoksa alt menüler (Roller, Sunucuya Davet Et) SOLA açılır —
   JS (showUserContextMenu) menü sağ kenara yakınsa 'ctx-submenu-flip' ekler.
   Davet alt menüsünün kendi left override'ı olduğundan iki kural da gerekli
   (bu blok override'lardan SONRA durmalı ki aynı özgüllükte kazansın). */
.ctx-submenu-flip .ctx-submenu {
    left: auto;
    right: 100%;
}
.ctx-submenu-flip .uctx-invite-section .ctx-submenu {
    left: auto;
    right: calc(100% - 1px);
}
.ctx-server-item {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 10px; cursor: pointer;
    font-size: 13px; color: var(--text-secondary);
    border-radius: 8px; transition: background 0.12s ease, color 0.12s ease;
}
.ctx-server-item:hover { background: var(--accent); color: white; }
.ctx-server-icon {
    width: 30px; height: 30px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
    /* Sabit slot: satır içinde küçülmez/büyümez, ad ne kadar uzun olursa olsun 30px. */
    flex: 0 0 30px; min-width: 30px; max-width: 30px;
    overflow: hidden; color: white; line-height: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.ctx-server-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
/* Fallback kısaltma kutu içinde tam ortalanır; uzunluğa göre font JS'te kademeli. */
.ctx-server-abbrev {
    display: block; white-space: nowrap; text-align: center;
    max-width: 100%; overflow: hidden; letter-spacing: -0.2px; line-height: 1;
}
.ctx-server-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }



/* ═══════════════ PINNED MESSAGE IMPROVEMENTS ═══════════════ */
.pinned-msg-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 3px;
}
.pinned-msg-unpin {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 15px;
    padding: 0 4px;
    border-radius: 4px;
    transition: all 0.15s;
    line-height: 1;
    flex-shrink: 0;
}
.pinned-msg-unpin:hover {
    background: rgba(237, 66, 69, 0.2);
    color: var(--dnd);
}
.pinned-msg-clickable {
    cursor: pointer;
    transition: background 0.15s;
    border-radius: 6px;
}
.pinned-msg-clickable:hover {
    background: var(--bg-hover);
}

/* ═══════════════ IMPROVED INCOMING CALL (TRANSPARENT/MODERN) ═══════════════ */
/* Popup kabı (.incoming-call-overlay) artık tam ekran karartma değil —
   arka plan/backdrop yalnız KARTA uygulanır (Karar #26). */
.incoming-call-card {
    background: rgb(var(--surface-card-rgb, 30 31 34) / 0.92);
    backdrop-filter: blur(16px);
    border: 1px solid rgb(var(--overlay-rgb) / 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgb(var(--overlay-rgb) / 0.03) inset;
}

/* ═══════════════ IMPROVED DM CALL SCREEN (MODERN/TRANSPARENT) ═══════════════ */
.dm-call-screen-bg {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.92) 0%, rgba(22, 33, 62, 0.92) 50%, rgba(15, 52, 96, 0.92) 100%);
    backdrop-filter: blur(30px);
}

/* ═══════════════ ACCOUNT SETTINGS EXTRA FIELDS ═══════════════ */
#us-field-status, #us-field-joined, #us-field-servers, #us-field-friends {
    color: var(--text-secondary);
}

/* ═══════════════ USERNAME CLICK TO COPY ═══════════════ */
.user-display-name {
    cursor: pointer;
    transition: color 0.15s;
    user-select: none;
    /* Tıkla-kopyala/hover yalnız metnin TAM üzerinde aktif olsun: .user-details flex
       sütununda satır genişliğine yayılma (stretch) yerine içeriğe daral; max-width
       uzun adlarda ellipsis'i korur. Adın sağındaki boş alan artık .user-info'ya
       düşer (popup açar), yanlışlıkla kopyalamaz. */
    align-self: flex-start;
    max-width: 100%;
}
.user-display-name:hover {
    color: var(--accent);
}

/* ═══════════════ AVATAR IMAGE ═══════════════ */
.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}
/* Avatar/sunucu fotoğrafı varken kapsayıcının arka plan rengini gizle. Aksi halde
   avatar_color, yuvarlak resmin antialiaslı kenarından ince bir halka olarak taşar.
   avatarHTML + footer zaten inline transparent veriyor; bu kural avatarHTML
   kullanmayan tüm diğer inline avatar yerlerini de (çağrı, hesap değiştirici,
   önizleme, listeler) kapsar. Fotoğraf yokken (.avatar-img child'ı yok) eşleşmez,
   böylece harf fallback'in renkli arka planı korunur. */
:has(> img.avatar-img) { background-color: transparent !important; }
/* Popup avatarı renkli banner üzerine konumlanır; transparent yerine
   border rengiyle eşleşen arka plan → antialias halesini gizler. */
.upp-avatar:has(> img.avatar-img) { background-color: var(--bg-secondary) !important; }
/* Ayarlar önizleme avatarları da renkli banner üzerinde; border rengiyle eşleştir */
.us-account-avatar:has(> img.avatar-img),
.us-preview-avatar:has(> img.avatar-img) { background-color: var(--bg-surface) !important; }
.spm-preview-avatar:has(> img.avatar-img) { background-color: var(--surface-card, var(--ui-secondary-alt)) !important; }
/* Profil kartı ve tam profil popup avatarı da renkli banner üzerinde */
.profile-card-avatar:has(> img.avatar-img),
.pp-avatar:has(> img.avatar-img) { background-color: var(--surface-card, var(--ui-secondary-alt)) !important; }

/* Popup dismiss overlay — blocks hover & clicks behind open popups */
.popup-dismiss-overlay {
    position: fixed;
    inset: 0;
    z-index: 199;
    background: transparent;
}
.popup-dismiss-overlay.hidden { display: none; }

/* Avatar Upload Area in Settings */
.avatar-upload-area {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 0;
}
.avatar-upload-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
    color: white;
    overflow: hidden;
    flex-shrink: 0;
}
.avatar-upload-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.btn-danger-text {
    color: var(--danger, #ED4245) !important;
    background: transparent !important;
    border: 1px solid var(--danger, #ED4245) !important;
}
.btn-danger-text:hover {
    background: rgba(237, 66, 69, 0.1) !important;
}

/* ═══════════════ AVATAR CROP MODAL ═══════════════ */
.avatar-crop-content {
    width: 520px;
    max-width: 95vw;
}
.avatar-crop-body {
    padding: 16px;
}
.avatar-crop-workspace {
    width: 100%;
    height: 300px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}
.avatar-crop-workspace:active {
    cursor: grabbing;
}
.avatar-crop-workspace img {
    max-width: 100%;
    max-height: 100%;
    pointer-events: none;
    transform-origin: center center;
    position: relative;
    z-index: 1;
}
.avatar-crop-circle {
    position: absolute;
    width: 80%;
    height: 0;
    padding-bottom: 80%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 2;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.avatar-crop-controls {
    padding: 12px 0 0;
    display: flex;
    align-items: center;
    gap: 12px;
}
.avatar-crop-controls label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    white-space: nowrap;
}
.avatar-crop-controls input[type="range"] {
    flex: 1;
    accent-color: var(--accent);
}
.acc-zoom-icon { color: var(--text-muted, #949ba4); flex-shrink: 0; }
.acc-rotate-btn {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 8px; border: none;
    background: var(--bg-input); color: var(--text-secondary); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.12s, color 0.12s;
}
.acc-rotate-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.avatar-crop-actions { display: flex; justify-content: space-between; align-items: center; }
.acc-actions-right { display: flex; gap: 12px; }
.acc-reset-btn { background: none; border: none; color: var(--text-secondary); font-size: 14px; font-weight: 600; cursor: pointer; padding: 6px 4px; }
.acc-reset-btn:hover { text-decoration: underline; color: var(--text-primary); }
.avatar-crop-preview-row {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    padding: 16px;
    justify-content: center;
}
.avatar-crop-preview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.avatar-crop-preview-item canvas {
    border-radius: 50%;
    background: var(--bg-secondary);
}
.avatar-crop-preview-item span {
    font-size: 11px;
    color: var(--text-secondary);
}
/* === appended via editor === */

/* ============ Mentions ============ */
.mention {
    display: inline-flex;
    align-items: center;
    background: rgba(88, 101, 242, 0.3);
    color: #dee0fc;
    padding: 1px 4px;
    min-height: 22px;
    line-height: 18px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    vertical-align: middle;
    user-select: text;
    -webkit-user-select: text;
}
.mention:hover {
    background: var(--brand);
    color: #fff;
}
.mention-everyone,
.mention-here {
    background: rgba(250, 166, 26, 0.3);
    color: #faa61a;
}
.mention-everyone:hover,
.mention-here:hover {
    background: rgba(250, 166, 26, 0.5);
    color: #fff;
}

/* ============ Message mentioned highlight ============ */
.message-mentioned {
    background: rgba(250, 166, 26, 0.08) !important;
}
.message-mentioned:hover {
    background: rgba(250, 166, 26, 0.13) !important;
}
.message-mentioned::before {
    content: "";
    position: absolute;
    left: 0; top: 6px; bottom: 6px;
    width: 2px;
    border-radius: 999px;
    background: #faa61a;
}
/* Mention highlight block: seamless multi-row strip */
.message.message-mentioned.mh-start.mh-end {
    border-radius: var(--radius-sm);
}
.message.message-mentioned.mh-start.mh-end::before {
    top: 6px; bottom: 6px; border-radius: 999px;
}
.message.message-mentioned.mh-start:not(.mh-end) {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.message.message-mentioned.mh-start:not(.mh-end)::before {
    top: 6px; bottom: 0; border-radius: 999px 999px 0 0;
}
.message.message-mentioned.mh-middle {
    border-radius: 0;
    margin-top: -1px;
}
.message.message-mentioned.mh-middle::before {
    top: 0; bottom: 0; border-radius: 0;
}
.message.message-mentioned.mh-end:not(.mh-start) {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    margin-top: -1px;
}
.message.message-mentioned.mh-end:not(.mh-start)::before {
    top: 0; bottom: 6px; border-radius: 0 0 999px 999px;
}

/* ============ Inbox ============ */
.toolbar-icon-btn {
    background: none;
    border: none;
    color: var(--interactive-normal, #b5bac1);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    position: relative;
    -webkit-app-region: no-drag;
}
.toolbar-icon-btn:hover {
    color: var(--interactive-hover, #dcddde);
}
.toolbar-icon-btn.active {
    color: var(--ui-text-strong);
}

/* ── DESKTOP-RUNTIME-UPDATE-1: masaüstü güncelleme göstergesi (yalnız kabukta görünür) ── */
.toolbar-right { position: relative; }
.desktop-update-btn {
    gap: 6px;
    height: 24px;
    padding: 0 8px;
    margin-right: 2px;
    border-radius: 6px;
    color: var(--online);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    transition: background 0.12s, color 0.12s, box-shadow 0.12s;
}
.desktop-update-btn.hidden { display: none; }
.desktop-update-btn:hover { color: var(--online); background: rgba(16, 185, 129, 0.14); }
.desktop-update-btn.has-label { background: rgba(16, 185, 129, 0.14); }
.desktop-update-btn.has-label:hover { background: rgba(16, 185, 129, 0.22); }
.desktop-update-btn.is-busy { cursor: default; }
.desktop-update-btn.is-busy:hover { background: rgba(16, 185, 129, 0.14); }
.desktop-update-btn.is-busy .desktop-update-icon { animation: desktop-update-pulse 1.4s ease-in-out infinite; }
.desktop-update-btn.is-error { color: var(--text-secondary); }
.desktop-update-btn.is-error:hover { color: var(--text-primary); background: rgb(var(--overlay-rgb) / 0.08); }
/* Zorunlu: dolu yeşil — daha belirgin, ama oturumu KESMEZ. */
.desktop-update-btn.is-required,
.desktop-update-btn.is-required:hover { color: #04130D; background: var(--online); box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.35), 0 4px 12px rgba(16, 185, 129, 0.28); }
.desktop-update-btn.is-required:hover { filter: brightness(1.08); }
.desktop-update-btn:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 2px; }
.desktop-update-label:empty { display: none; }
@keyframes desktop-update-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .desktop-update-btn.is-busy .desktop-update-icon { animation: none; } }

.desktop-update-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 8px;
    z-index: 1200;
    width: 280px;
    box-sizing: border-box;
    padding: 14px 16px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    text-align: left;
    -webkit-app-region: no-drag;
}
.desktop-update-popover.hidden { display: none; }
.desktop-update-pop-title { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.desktop-update-pop-text { font-size: 13px; line-height: 1.45; color: var(--text-secondary); margin: 0 0 12px; }
.desktop-update-pop-progress { margin: 0 0 4px; }
.desktop-update-pop-progress.hidden { display: none; }
.desktop-update-pop-bar { height: 4px; border-radius: 999px; background: rgb(var(--overlay-rgb) / 0.08); overflow: hidden; }
.desktop-update-pop-fill { height: 100%; width: 0; border-radius: 999px; background: var(--online); transition: width 0.25s ease-out; }
.desktop-update-pop-percent { display: block; margin-top: 6px; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.desktop-update-pop-btn {
    width: 100%;
    padding: 9px 12px;
    border: none;
    border-radius: 8px;
    background: var(--online);
    color: #04130D;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.12s;
}
.desktop-update-pop-btn.hidden { display: none; }
.desktop-update-pop-btn:hover { filter: brightness(1.08); }
.desktop-update-pop-btn:disabled { opacity: 0.55; cursor: default; filter: none; }
.desktop-update-pop-btn:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 2px; }
.inbox-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f23f43;
    border: 2px solid var(--bg-tertiary, #1e1f22);
    pointer-events: none;
}
/* Inbox notification dot disabled — no badge on the inbox icon */
#inbox-badge {
    display: none !important;
}
/* ============ Inbox Popup ============ */
.inbox-popup-overlay {
    position: fixed;
    top: 32px;
    right: 4px;
    z-index: 2000;
}
.inbox-popup-overlay.hidden {
    display: none;
}
.inbox-popup {
    width: 480px;
    max-height: 600px;
    background: var(--bg-secondary, #2b2d31);
    border: 1px solid rgba(0,0,0,0.3);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    /* overflow:hidden clips tooltip ::after elements — use visible on the panel itself,
       overflow is only restricted on .inbox-content (the scrollable body) */
    overflow: visible;
}
.inbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px 0 16px;
    flex-shrink: 0;
    /* allow tooltip ::after to overflow above the panel without being clipped */
    overflow: visible;
    /* clip the rounded top corners visually */
    border-radius: 8px 8px 0 0;
    background: var(--bg-secondary, #2b2d31);
}
.inbox-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted, #949ba4);
}
.inbox-header-left h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--header-primary, #f2f3f5);
    white-space: nowrap;
}
.inbox-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}
.inbox-tabs {
    display: flex;
    gap: 0;
    padding: 8px 16px 0;
    border-bottom: 1px solid var(--border);
}
.inbox-tab {
    background: none;
    border: none;
    color: var(--interactive-normal, #b5bac1);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 14px;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s;
}
.inbox-tab:hover {
    color: var(--interactive-hover, #dcddde);
}
.inbox-tab.active {
    color: var(--ui-text-strong);
    border-bottom-color: #fff;
}
.inbox-close-btn {
    background: none;
    border: none;
    color: var(--interactive-normal, #b5bac1);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.inbox-close-btn:hover {
    color: var(--ui-text-strong);
}
.inbox-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    max-height: 480px;
}
.inbox-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;   /* boyut KORUNUR */
    gap: 8px;
    text-align: center;
    color: var(--text-muted, #949ba4);
    font-size: 14px;
}
.inbox-empty-icon {
    width: 52px; height: 52px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(88,101,242,0.14), rgba(139,92,246,0.14));
    color: #8b9cf8; margin-bottom: 2px;
}
.inbox-empty-icon svg { width: 26px; height: 26px; }
.inbox-empty-title { font-size: 14.5px; font-weight: 700; color: var(--header-primary, #f2f3f5); }
.inbox-empty-text { font-size: 12.5px; color: var(--text-muted, #949ba4); line-height: 1.45; max-width: 240px; }
.inbox-item {
    background: var(--bg-tertiary, #1e1f22);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.15s;
}
.inbox-item:hover {
    background: var(--bg-modifier-hover, rgba(79,84,92,0.3));
}
.inbox-item-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 11px;
    color: var(--text-muted, #949ba4);
}
.inbox-item-header .server-name {
    font-weight: 600;
    color: var(--text-secondary, #b5bac1);
}
.inbox-item-header .channel-name {
    color: var(--text-muted, #949ba4);
}
.inbox-item-header .channel-name::before {
    content: '#';
}
.inbox-item-body {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.inbox-item-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    font-weight: 600;
}
.inbox-item-content {
    flex: 1;
    min-width: 0;
}
.inbox-item-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--header-primary, #f2f3f5);
    margin-bottom: 2px;
}
.inbox-item-author .timestamp {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted, #949ba4);
    margin-left: 6px;
}
.inbox-item-text {
    font-size: 13px;
    color: var(--text-normal, #dbdee1);
    line-height: 1.4;
    word-break: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
/* Unread item: right-side count badge */
.inbox-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
    margin-left: 8px;
}
.inbox-unread-badge {
    background: var(--brand);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    padding: 1px 6px;
    min-width: 18px;
    text-align: center;
    line-height: 16px;
}
.inbox-unread-badge.has-mention {
    background: #ed4245;
}
/* Dismiss / read button on mention items */
.inbox-item-dismiss {
    position: relative;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 11px;
    opacity: 0.7;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* .inbox-item-dismiss tooltip is handled by the shared JS tooltip (#app-tooltip). */
.inbox-item-dismiss:hover {
    opacity: 1;
    color: var(--ui-text-strong);
    background: rgb(var(--overlay-rgb) / 0.08);
}
/* Read-all button in header */
.inbox-read-all-btn {
    background: none;
    border: none;
    color: var(--interactive-normal, #b5bac1);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}
.inbox-read-all-btn:hover {
    color: var(--ui-text-strong);
    background: rgb(var(--overlay-rgb) / 0.06);
}
.inbox-read-all-btn:disabled,
.inbox-read-all-btn.disabled {
    opacity: .45;
    cursor: default;
    pointer-events: none;
}
/* Mention type badge */
.inbox-mention-badge {
    display: inline-block;
    background: rgba(88,101,242,0.25);
    color: #8b9cf8;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 4px;
}
.inbox-mention-badge.everyone {
    background: rgba(237,66,69,0.2);
    color: #f38ba8;
}

/* ─── Inbox: action button (friend req, filter) ─── */
.inbox-action-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--interactive-normal, #b5bac1);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.inbox-action-btn:hover { color: var(--ui-text-strong); background: rgb(var(--overlay-rgb) / 0.07); }
.inbox-action-btn.hidden { display: none !important; }

/* ─── Inbox custom CSS tooltips (replaces native title) ─── */
.inbox-action-btn[data-tooltip],
.inbox-card-action-btn[data-tooltip],
.inbox-read-all-btn[data-tooltip],
#inbox-toggle-btn[data-tooltip] {
    position: relative;
}

/* .inbox-action-btn, .inbox-read-all-btn, #inbox-toggle-btn tooltips are
   positioned via JS (_setupInboxTooltips) to avoid viewport clipping at the
   top of the screen. No ::after/::before rules for those selectors here. */

/* Card action buttons (bell, check) — tooltips handled by JS (_setupInboxTooltips)
   because .inbox-channel-card has overflow:hidden which clips CSS ::after tooltips.
   The JS tooltip uses #app-tooltip (position:fixed) to avoid the clipping. */

/* ─── JS-positioned viewport-aware tooltip (shared speech-bubble style) ─── */
#app-tooltip {
    position: fixed;
    background: var(--tooltip-bg, var(--ui-tertiary));
    color: var(--tooltip-fg, var(--ui-text-header));
    font-size: 12.5px;
    font-weight: 600;
    padding: 7px 11px;
    border-radius: 7px;
    pointer-events: none;
    z-index: 9999;
    white-space: nowrap;
    display: none;
    box-shadow: 0 6px 20px rgba(0,0,0,0.6);
    border: 1px solid rgb(var(--overlay-rgb) / 0.08);
    transition: none;
}
/* Speech-bubble arrow — direction set by JS via tip-below / tip-above */
#app-tooltip::after {
    content: '';
    position: absolute;
    left: var(--tip-arrow-left, 50%);
    margin-left: -7px;
    border: 7px solid transparent;
    pointer-events: none;
}
/* Durum noktası tooltip'leri için KOMPAKT varyant — yalnız .tip-sm sınıfı
   eklendiğinde (durum noktaları); diğer tooltip'lerin boyutu DEĞİŞMEZ. */
#app-tooltip.tip-sm {
    font-size: 11.5px;
    padding: 5px 9px;
    border-radius: 6px;
}
/* İki katmanlı balon (hızlı tepki emojileri): başlık + ikincil eylem satırı. */
#app-tooltip.tip-rich { padding: 8px 12px; text-align: center; line-height: 1.35; }
#app-tooltip .tip-main { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); }
#app-tooltip .tip-sub  { display: block; margin-top: 1px; font-size: 11px; font-weight: 500; color: var(--text-secondary); }
#app-tooltip.tip-sm::after {
    margin-left: -6px;
    border-width: 6px;
}
#app-tooltip.tip-below::after {   /* tooltip below anchor → arrow points up */
    bottom: 100%;
    border-bottom-color: var(--tooltip-bg, var(--ui-tertiary));
}
#app-tooltip.tip-above::after {   /* tooltip above anchor → arrow points down */
    top: 100%;
    border-top-color: var(--tooltip-bg, var(--ui-tertiary));
}

/* ─── Inbox loading state (spinner + label) ─── */
.inbox-loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 120px;
    color: var(--text-muted, #949ba4);
    font-size: 13px;
}
.inbox-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgb(var(--overlay-rgb) / 0.14);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: inboxSpin .8s linear infinite;
    flex-shrink: 0;
}
@keyframes inboxSpin {
    to { transform: rotate(360deg); }
}
/* Loading state for Tümünü Oku button */
.inbox-read-all-btn.loading {
    opacity: .6;
    pointer-events: none;
}

.inbox-friend-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #ed4245;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    border-radius: 10px;
    padding: 0 4px;
    min-width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.inbox-friend-badge.hidden { display: none !important; }

/* ─── Inbox: per-item action row ─── */
.inbox-item-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgb(var(--overlay-rgb) / 0.05);
}
.inbox-item-action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: var(--text-muted, #949ba4);
    font-size: 11px;
    cursor: pointer;
    padding: 3px 7px;
    border-radius: 4px;
    transition: background 0.12s, color 0.12s;
}
.inbox-item-action-btn:hover { background: rgb(var(--overlay-rgb) / 0.08); color: var(--ui-text-strong); }
.inbox-item-action-btn svg { flex-shrink: 0; }

/* ─── Inbox: notification settings dropdown ─── */
.inbox-notif-dropdown {
    position: fixed;
    z-index: 2100;
    background: var(--bg-floating, #111214);
    border: 1px solid rgb(var(--overlay-rgb) / 0.08);
    border-radius: 6px;
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    padding: 6px 0;
}
.inbox-notif-dropdown.hidden { display: none !important; }
.inbox-notif-dropdown-inner { padding: 2px 0; }
.inbox-notif-dropdown-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted, #949ba4);
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 6px 10px 4px;
}
.inbox-notif-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: none;
    border: none;
    color: var(--interactive-normal, #b5bac1);
    font-size: 13px;
    padding: 7px 10px;
    cursor: pointer;
    text-align: left;
    transition: background 0.1s;
}
.inbox-notif-option:hover { background: rgb(var(--overlay-rgb) / 0.08); color: var(--ui-text-strong); }
.inbox-notif-check {
    width: 14px;
    height: 14px;
    border: 2px solid var(--interactive-normal, #b5bac1);
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s, border-color 0.1s;
}
.inbox-notif-check.active {
    background: var(--brand);
    border-color: var(--brand);
}
.inbox-notif-check.active::after {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
}
.inbox-notif-divider {
    height: 1px;
    background: rgb(var(--overlay-rgb) / 0.07);
    margin: 4px 0;
}
.inbox-notif-mute-btn {
    display: flex;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    color: var(--text-normal, #dbdee1);
    font-size: 13px;
    padding: 7px 10px;
    cursor: pointer;
    text-align: left;
    transition: background 0.1s;
}
.inbox-notif-mute-btn:hover { background: rgb(var(--overlay-rgb) / 0.08); color: var(--ui-text-strong); }

/* ─── Inbox: mentions filter dropdown ─── */
.inbox-filter-dropdown {
    position: fixed;
    z-index: 2100;
    background: var(--bg-floating, #111214);
    border: 1px solid rgb(var(--overlay-rgb) / 0.08);
    border-radius: 6px;
    min-width: 240px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    padding: 6px 0;
}
.inbox-filter-dropdown.hidden { display: none !important; }
.inbox-filter-dropdown-inner { padding: 2px 0; }
.inbox-filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--interactive-normal, #b5bac1);
    font-size: 13px;
    transition: background 0.1s;
}
.inbox-filter-option:hover { background: rgb(var(--overlay-rgb) / 0.07); }
.inbox-filter-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
    cursor: pointer;
    flex-shrink: 0;
}
.inbox-filter-option span { flex: 1; }

/* ─── Inbox: unread item Discord card style ─── */
.inbox-channel-card {
    background: var(--bg-tertiary, #1e1f22);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}
.inbox-channel-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px 6px;
    background: rgb(0 0 0 / calc(0.15 * var(--shade-k)));
    border-bottom: 1px solid rgb(var(--overlay-rgb) / 0.05);
}
.inbox-channel-card-server {
    font-size: 11px;
    font-weight: 700;
    color: var(--header-primary, #f2f3f5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}
.inbox-channel-card-sep { color: var(--text-muted, #949ba4); font-size: 11px; }
.inbox-channel-card-ch {
    font-size: 11px;
    color: var(--interactive-hover, #dcddde);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
.inbox-channel-card-ch::before { content: '#'; }
.inbox-channel-card-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    flex-shrink: 0;
}
.inbox-card-action-btn {
    background: none;
    border: none;
    color: var(--text-muted, #949ba4);
    cursor: pointer;
    padding: 3px 5px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s, color 0.1s;
}
.inbox-card-action-btn:hover { background: rgb(var(--overlay-rgb) / 0.09); color: var(--ui-text-strong); }
.inbox-card-action-btn.muted { color: var(--text-link, #00a8fc); }
.inbox-channel-card-body {
    padding: 8px 10px 10px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    cursor: pointer;
    transition: background 0.12s;
}
.inbox-channel-card-body:hover { background: rgb(var(--overlay-rgb) / 0.04); }
.inbox-channel-unread-badge {
    background: var(--brand);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 10px;
    padding: 1px 6px;
    min-width: 18px;
    text-align: center;
    line-height: 16px;
    flex-shrink: 0;
}
.inbox-mention-chip {
    font-size: 10px;
    font-weight: 700;
    color: #f23f43;
    background: rgba(242, 63, 67, 0.15);
    border-radius: 4px;
    padding: 1px 5px;
    line-height: 16px;
    flex-shrink: 0;
}

/* ─── Inbox: reaction chips ─── */
.inbox-reaction-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}
.inbox-reaction-chip {
    background: rgb(var(--overlay-rgb) / 0.07);
    border: 1px solid rgb(var(--overlay-rgb) / 0.1);
    border-radius: 999px;
    padding: 2px 8px;
    min-height: 24px;
    font-size: 12px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 90ms ease;
}
.inbox-reaction-chip:hover {
    background: rgb(var(--overlay-rgb) / 0.11);
    color: var(--text-normal, #dbdee1);
}
.inbox-reaction-chip:active {
    transform: scale(0.94);
}
.inbox-reaction-chip.me {
    background: rgba(6, 182, 212, 0.18);
    border-color: rgba(6, 182, 212, 0.55);
    color: var(--text-primary, #f2f3f5);
}
.inbox-reaction-chip.me:hover {
    background: rgba(6, 182, 212, 0.26);
}
.inbox-reaction-count {
    display: inline-block;
}
.inbox-reaction-count.count-up {
    animation: inbox-count-up 180ms ease-out;
}
.inbox-reaction-count.count-down {
    animation: inbox-count-down 180ms ease-out;
}
@keyframes inbox-count-up {
    0%   { opacity: .2; transform: translateY(5px) scale(.93); }
    70%  { opacity: 1;  transform: translateY(-1px) scale(1.06); }
    100% { opacity: 1;  transform: translateY(0) scale(1); }
}
@keyframes inbox-count-down {
    0%   { opacity: .2; transform: translateY(-5px) scale(.93); }
    70%  { opacity: 1;  transform: translateY(1px) scale(1.06); }
    100% { opacity: 1;  transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .inbox-reaction-chip { transition: none !important; }
    .inbox-reaction-count { animation: none !important; }
}

/* ============ Quick Switcher ============ */
.quick-switcher-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 3000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
}
.quick-switcher-overlay.hidden {
    display: none;
}
.quick-switcher-modal {
    background: var(--bg-primary, #313338);
    border-radius: 8px;
    width: 560px;
    max-width: 90vw;
    max-height: 420px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    overflow: hidden;
}
.quick-switcher-input-wrapper {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.2);
}
.quick-switcher-input-wrapper svg {
    flex-shrink: 0;
    color: var(--text-muted, #949ba4);
}
#quick-switcher-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-size: 16px;
    color: var(--text-normal, #dbdee1);
    font-family: inherit;
}
#quick-switcher-input::placeholder {
    color: var(--text-muted, #949ba4);
}
.quick-switcher-hint {
    font-size: 11px;
    color: var(--text-muted, #949ba4);
    background: var(--bg-tertiary, #1e1f22);
    padding: 2px 6px;
    border-radius: 3px;
    flex-shrink: 0;
}
.quick-switcher-results {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}
.qs-category {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted, #949ba4);
    padding: 8px 8px 4px;
    letter-spacing: 0.02em;
}
.qs-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-normal, #dbdee1);
    font-size: 14px;
    transition: background 0.1s;
}
.qs-item:hover, .qs-item.keyboard-active {
    background: var(--bg-modifier-hover, rgba(79,84,92,0.3));
}
.qs-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
    color: var(--text-muted, #949ba4);
    background: var(--bg-tertiary, #1e1f22);
}
.qs-item-icon.channel-icon {
    font-size: 15px;
    font-weight: 600;
}
.qs-item-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.qs-item-sub {
    font-size: 12px;
    color: var(--text-muted, #949ba4);
    flex-shrink: 0;
}
.quick-switcher-footer {
    padding: 8px 16px;
    border-top: 1px solid rgba(0,0,0,0.2);
    font-size: 11px;
    color: var(--text-muted, #949ba4);
}
.quick-switcher-footer kbd {
    background: var(--bg-tertiary, #1e1f22);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 11px;
    font-family: inherit;
}
.quick-switcher-tip {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ═══════════════ PUNISHMENT SCREEN (ban / ip_ban) ═══════════════ */
.punishment-screen {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    background: var(--ui-punish-bg);
}
.punishment-screen.hidden { display: none; }
.punishment-bg {
    position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.punishment-orb {
    position: absolute; border-radius: 50%; filter: blur(140px); opacity: 0.10;
    animation: punishOrb 8s ease-in-out infinite alternate;
}
@keyframes punishOrb {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.15) translate(20px, -10px); }
}
.punishment-orb-1 { width: 600px; height: 600px; background: #EF4444; top: -200px; left: -150px; }
.punishment-orb-2 { width: 450px; height: 450px; background: #DC2626; bottom: -120px; right: -100px; animation-delay: 2s; }
.punishment-orb-3 { width: 300px; height: 300px; background: #991B1B; top: 50%; left: 50%; transform: translate(-50%, -50%); animation-delay: 4s; }

.punishment-card {
    position: relative; z-index: 1;
    background: linear-gradient(180deg, rgb(var(--bg-surface-rgb) / 0.98) 0%, rgb(var(--ui-surface-deep-rgb) / 0.98) 100%);
    border: 1px solid rgba(239, 68, 68, 0.12);
    border-radius: 20px; max-width: 480px; width: 92%;
    box-shadow: 0 0 80px rgba(239, 68, 68, 0.06), 0 24px 64px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    overflow: hidden;
}

/* Header section */
.punishment-header {
    padding: 36px 36px 24px; text-align: center;
    border-bottom: 1px solid rgb(var(--overlay-rgb) / 0.04);
}
.punishment-icon {
    width: 64px; height: 64px; margin: 0 auto 14px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(239, 68, 68, 0.08); border-radius: 50%;
    border: 2px solid rgba(239, 68, 68, 0.15);
}
.punishment-badge {
    display: inline-block; padding: 3px 14px; border-radius: 100px;
    font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
    margin-bottom: 14px;
}
.punishment-badge-ban {
    background: rgba(239, 68, 68, 0.12); color: #EF4444; border: 1px solid rgba(239, 68, 68, 0.2);
}
.punishment-badge-restrict {
    background: rgba(249, 115, 22, 0.12); color: #F97316; border: 1px solid rgba(249, 115, 22, 0.2);
}
.punishment-title {
    font-size: 20px; font-weight: 700; color: var(--ui-text-slate-strong); margin-bottom: 8px; line-height: 1.3;
}
.punishment-subtitle {
    color: #64748B; font-size: 13px; line-height: 1.6; margin: 0;
}

/* Body section */
.punishment-body {
    padding: 20px 36px;
}
.punishment-reason-block {
    background: rgba(239, 68, 68, 0.05); border: 1px solid rgba(239, 68, 68, 0.1);
    border-radius: 10px; padding: 14px 16px; margin-bottom: 16px;
}
.punishment-reason-block.hidden { display: none; }
.punishment-reason-label {
    font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
    color: #EF4444; opacity: 0.7; margin-bottom: 6px;
}
.punishment-reason {
    color: var(--ui-text-slate); font-size: 13px; line-height: 1.6; margin: 0;
}
.punishment-meta {
    display: flex; gap: 12px; margin-bottom: 16px;
}
.punishment-meta-card {
    flex: 1; background: rgb(var(--overlay-rgb) / 0.03); border: 1px solid rgb(var(--overlay-rgb) / 0.06);
    border-radius: 8px; padding: 10px 14px;
}
.punishment-meta-label {
    font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
    color: #64748B; margin-bottom: 4px;
}
.punishment-meta-value {
    font-size: 13px; color: var(--ui-text-slate); font-weight: 500;
}
.punishment-sanctions {
    text-align: left;
    background: rgb(0 0 0 / calc(0.2 * var(--shade-k))); border-radius: 10px; padding: 14px 16px;
    border: 1px solid rgb(var(--overlay-rgb) / 0.04);
}
.punishment-sanctions-header {
    font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
    color: #64748B; margin-bottom: 10px; padding-bottom: 8px;
    border-bottom: 1px solid rgb(var(--overlay-rgb) / 0.05);
}
.punishment-sanction-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0; font-size: 13px;
}
.punishment-sanction-item + .punishment-sanction-item {
    border-top: 1px solid rgb(var(--overlay-rgb) / 0.04);
}
.punishment-sanction-type {
    font-weight: 600; font-size: 10px; letter-spacing: 0.5px; text-transform: uppercase;
    padding: 3px 8px; border-radius: 4px; flex-shrink: 0;
}
.punishment-sanction-type.type-ban { background: rgba(239, 68, 68, 0.15); color: #EF4444; }
.punishment-sanction-type.type-ip_ban { background: rgba(220, 38, 38, 0.15); color: var(--danger-text, #fca5a5); }
.punishment-sanction-type.type-timeout { background: rgba(249, 115, 22, 0.15); color: #FB923C; }
.punishment-sanction-type.type-temp_restriction { background: rgba(249, 115, 22, 0.15); color: var(--tint-amber, #fdba74); }
.punishment-sanction-reason { color: var(--text-secondary); flex: 1; }
.punishment-sanction-appeal-tag {
    font-size: 10px; color: var(--tint-amber, #f59e0b); font-weight: 600;
    padding: 2px 8px; border-radius: 100px;
    background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Footer section */
.punishment-footer {
    padding: 20px 36px 28px; text-align: center;
    border-top: 1px solid rgb(var(--overlay-rgb) / 0.04);
    background: rgb(0 0 0 / calc(0.1 * var(--shade-k)));
}
.punishment-actions {
    display: flex; gap: 10px; justify-content: center; margin-bottom: 14px;
}
.punishment-appeal-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 24px; border-radius: 8px;
    background: linear-gradient(135deg, #06B6D4, #8B5CF6); color: #fff;
    font-size: 13px; font-weight: 600; border: none; cursor: pointer;
    transition: all 0.2s ease; box-shadow: 0 2px 12px rgba(6, 182, 212, 0.25);
}
.punishment-appeal-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(6, 182, 212, 0.35); }
.punishment-appeal-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.punishment-standing-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; border-radius: 8px;
    background: rgb(var(--overlay-rgb) / 0.06); color: var(--text-secondary);
    font-size: 13px; font-weight: 500; border: 1px solid rgb(var(--overlay-rgb) / 0.08); cursor: pointer;
    transition: all 0.2s ease;
}
.punishment-standing-btn:hover { background: rgb(var(--overlay-rgb) / 0.1); color: var(--text-primary); }
.punishment-logout-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; border-radius: 8px;
    background: transparent; color: #64748B;
    font-size: 13px; font-weight: 500; border: 1px solid rgb(var(--overlay-rgb) / 0.06); cursor: pointer;
    transition: all 0.2s ease;
}
.punishment-logout-btn:hover { background: rgb(var(--overlay-rgb) / 0.04); color: var(--text-secondary); }
.punishment-appeal-status {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    color: var(--tint-amber, #f59e0b); font-size: 12px; font-weight: 500; margin-bottom: 14px;
}
.punishment-links {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 11px;
}
.punishment-link {
    color: #475569; text-decoration: none; transition: color 0.15s;
}
.punishment-link:hover { color: var(--text-secondary); text-decoration: underline; }
.punishment-link-dot { color: #334155; }

/* ═══════════════ RESTRICTION PANEL (timeout / temp_restriction / mute) ═══════════════ */
.restriction-panel {
    position: fixed; top: 0; left: 0; right: 0; z-index: 900;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.95) 0%, rgba(185, 28, 28, 0.95) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
}
.restriction-panel.hidden { display: none; }
.restriction-panel-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 5px 16px; max-width: 100%; gap: 12px;
}
.restriction-panel-left {
    display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
}
.restriction-panel-icon {
    width: 28px; height: 28px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.12); border-radius: 6px;
    color: #fff;
}
.restriction-panel-info { min-width: 0; }
.restriction-panel-title {
    font-size: 12px; font-weight: 600; color: #fff; margin-bottom: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.restriction-panel-reason {
    font-size: 11px; color: rgba(255, 255, 255, 0.7); line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.restriction-panel-right {
    display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.restriction-panel-countdown {
    text-align: center; padding: 3px 10px;
    background: rgba(0, 0, 0, 0.25); border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.restriction-countdown-label {
    font-size: 8px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55); display: none;
}
.restriction-countdown-timer {
    font-size: 13px; font-weight: 700; color: #fff;
    font-variant-numeric: tabular-nums; font-family: 'SF Mono', 'Consolas', monospace;
    letter-spacing: 0.5px;
}
.restriction-panel-appeal {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 12px; border-radius: 5px;
    background: rgba(255, 255, 255, 0.15); color: #fff;
    font-size: 11px; font-weight: 600; border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer; transition: all 0.2s ease; white-space: nowrap;
}
.restriction-panel-appeal:hover { background: rgba(255, 255, 255, 0.25); }

/* Body offset when restriction panel is visible */
body.has-restriction-banner #app { padding-top: 44px; }

/* Desktop (pywebview): window controls (3×36px=108px) sağda — banner içeriği taşmamasın */
body.is-desktop .restriction-panel-inner { padding-right: 112px; }

/* ═══════════════ WARNING BANNER ═══════════════ */
.warning-banner {
    position: fixed; top: 0; left: 0; right: 0; z-index: 900;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.97) 0%, rgba(217, 119, 6, 0.97) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}
.warning-banner.hidden { display: none; }
.warning-banner-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 7px 16px; gap: 12px;
}
.warning-banner-left {
    display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
}
.warning-banner-icon {
    width: 28px; height: 28px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.12); border-radius: 6px; color: #1a1a2e;
}
.warning-banner-body {
    display: flex; align-items: center; gap: 8px; min-width: 0;
}
.warning-banner-label {
    font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
    color: rgba(0, 0, 0, 0.6); background: rgba(0, 0, 0, 0.1); padding: 2px 6px;
    border-radius: 4px; flex-shrink: 0;
}
.warning-banner-text {
    color: #1a1a2e; font-size: 12px; font-weight: 500; flex: 1;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.warning-banner-actions {
    display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.warning-banner-detail, .warning-banner-appeal {
    padding: 4px 10px; border-radius: 5px;
    font-size: 11px; font-weight: 600; cursor: pointer;
    transition: all 0.2s ease; border: none;
}
.warning-banner-detail {
    background: rgba(0, 0, 0, 0.1); color: #1a1a2e;
}
.warning-banner-detail:hover { background: rgba(0, 0, 0, 0.18); }
.warning-banner-appeal {
    background: rgba(0, 0, 0, 0.75); color: #F59E0B;
}
.warning-banner-appeal:hover { background: rgba(0, 0, 0, 0.85); }
.warning-banner-close {
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.08); color: rgba(0, 0, 0, 0.5);
    border: none; border-radius: 6px; cursor: pointer; transition: all 0.2s ease;
}
.warning-banner-close:hover { background: rgba(0, 0, 0, 0.15); color: #1a1a2e; }
body.has-warning-banner #app { padding-top: 44px; }
/* Desktop (pywebview): window controls (3×36px=108px) sağda — banner içeriği taşmamasın */
body.is-desktop .warning-banner-inner { padding-right: 112px; }

/* ═══════════════ WARNING DETAIL POPUP ═══════════════ */
.warning-detail-popup {
    position: fixed; top: 58px; right: 20px; z-index: 901;
    width: 340px; max-width: calc(100vw - 40px);
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    animation: warnDetailIn 0.2s ease;
}
.warning-detail-popup.hidden { display: none; }
@keyframes warnDetailIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.warning-detail-header {
    display: flex; align-items: center; gap: 8px;
    padding: 14px 16px; border-bottom: 1px solid var(--border);
    font-size: 13px; font-weight: 600; color: var(--tint-amber, #f59e0b);
}
.warning-detail-close {
    margin-left: auto; width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    background: none; color: var(--text-muted); border: none; border-radius: 4px;
    cursor: pointer; transition: all 0.15s;
}
.warning-detail-close:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.warning-detail-body { padding: 16px; }
.warning-detail-row {
    margin-bottom: 12px;
}
.warning-detail-row:last-child { margin-bottom: 0; }
.warning-detail-label {
    font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
    color: var(--text-muted); margin-bottom: 4px;
}
.warning-detail-value {
    font-size: 13px; color: var(--text-primary); line-height: 1.5;
}

/* ═══════════════ LEGAL MODAL (ToS / Guidelines) ═══════════════ */
.legal-modal-overlay {
    position: fixed; inset: 0; z-index: 10002;
    display: flex; align-items: center; justify-content: center;
}
.legal-modal-overlay.hidden { display: none; }
.legal-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.7);
}
.legal-modal-content {
    position: relative; z-index: 1;
    background: var(--bg-secondary, #1e1f22);
    border: 1px solid var(--border, #2b2d31);
    border-radius: 12px;
    width: 90%; max-width: 560px; max-height: 80vh;
    display: flex; flex-direction: column;
    animation: legalModalIn 0.2s ease;
}
@keyframes legalModalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.legal-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border, #2b2d31);
}
.legal-modal-header h2 {
    font-size: 18px; font-weight: 700; color: var(--text-primary, #fff); margin: 0;
}
.legal-modal-body {
    padding: 20px 24px 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    font-size: 13px; line-height: 1.7;
    color: var(--text-secondary, #b5bac1);
}
.legal-modal-body h3 {
    font-size: 14px; font-weight: 700; color: var(--text-primary, #fff);
    margin: 16px 0 8px; text-transform: uppercase; letter-spacing: 0.5px;
}
.legal-modal-body h3:first-child { margin-top: 0; }
/* B4: yasal metinlerin "son guncelleme" satiri. */
.legal-modal-body .legal-meta { color: var(--text-secondary); font-size: 12px; margin: 0 0 14px; }
.legal-modal-body strong { color: var(--text-primary); }
.legal-modal-body p { margin: 0 0 10px; }
.legal-modal-body ul {
    margin: 0 0 10px; padding-left: 20px;
}
.legal-modal-body li { margin-bottom: 4px; }

/* ═══════════════ APPEAL MODAL ═══════════════ */
.appeal-modal-overlay {
    z-index: 10001;
}
.appeal-modal-content { max-width: 480px; }
.appeal-modal-header {
    display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px;
}
.appeal-modal-header h2 { margin: 0; font-size: 18px; }
.appeal-modal-header .modal-close { margin-left: auto; }
.appeal-modal-icon {
    width: 40px; height: 40px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-soft); color: var(--accent); border-radius: 10px;
}
.appeal-modal-title-group {
    flex: 1;
}
.appeal-modal-subtitle {
    font-size: 12px; color: var(--text-muted); margin-top: 2px;
}
.appeal-guidelines {
    background: rgba(6, 182, 212, 0.06); border: 1px solid rgba(6, 182, 212, 0.12);
    border-radius: 10px; padding: 14px 16px; margin-bottom: 16px;
}
.appeal-guidelines-title {
    font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
    color: #06B6D4; margin-bottom: 8px;
}
.appeal-guidelines-list {
    list-style: none; padding: 0; margin: 0;
}
.appeal-guidelines-list li {
    font-size: 12px; color: var(--text-muted); line-height: 1.6;
    padding-left: 16px; position: relative;
}
.appeal-guidelines-list li::before {
    content: '•'; position: absolute; left: 4px; color: #06B6D4;
}
.appeal-sanction-info {
    background: var(--bg-tertiary); border-radius: 10px; padding: 14px 16px;
    margin-bottom: 16px; font-size: 13px;
    border: 1px solid var(--border);
}
.appeal-sanction-info .appeal-info-label {
    font-size: 10px; font-weight: 700; letter-spacing: 1px;
    text-transform: uppercase; color: var(--text-muted);
}
.appeal-sanction-info .appeal-info-value { color: var(--text-primary); margin-top: 3px; }
.appeal-sanction-info .appeal-info-row { margin-bottom: 10px; }
.appeal-sanction-info .appeal-info-row:last-child { margin-bottom: 0; }
.appeal-char-count { text-align: right; font-size: 11px; color: var(--text-muted); margin-top: 4px; }
#appeal-message {
    width: 100%; background: var(--bg-input); border: 1px solid var(--border);
    border-radius: 8px; padding: 12px; color: var(--text-primary);
    font-size: 14px; resize: vertical; min-height: 100px;
    transition: border-color 0.2s;
}
#appeal-message:focus { border-color: var(--accent); outline: none; }
#appeal-submit-btn {
    display: inline-flex; align-items: center; gap: 8px;
}

/* ═══════════════ SANCTION INPUT DISABLED ═══════════════ */
.message-input-disabled {
    pointer-events: none; opacity: 0.5;
}
.message-input-disabled-overlay {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgb(var(--bg-primary-rgb) / 0.7); border-radius: var(--radius-sm);
    color: var(--dnd); font-size: 13px; font-weight: 500; z-index: 5;
    pointer-events: auto; cursor: not-allowed;
}

/* ═══════════════ ACCOUNT STANDING PAGE ═══════════════ */

/* ── Health Card ── */
.standing-health-card {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    background: var(--bg-tertiary); border: 1px solid var(--border);
    border-radius: 14px; padding: 28px 32px; margin-bottom: 24px;
    position: relative; overflow: hidden;
}
.standing-health-card::before {
    content: ''; position: absolute; inset: 0; opacity: 0.04; pointer-events: none;
    background: radial-gradient(ellipse at 20% 50%, currentColor 0%, transparent 70%);
}
.standing-health-card[data-level="good"] { color: #10B981; border-color: rgba(16, 185, 129, 0.15); }
.standing-health-card[data-level="limited"] { color: var(--tint-amber, #f59e0b); border-color: rgba(245, 158, 11, 0.15); }
.standing-health-card[data-level="very-limited"] { color: #F97316; border-color: rgba(249, 115, 22, 0.15); }
.standing-health-card[data-level="at-risk"] { color: #EF4444; border-color: rgba(239, 68, 68, 0.15); }
.standing-health-card[data-level="suspended"] { color: #DC2626; border-color: rgba(220, 38, 38, 0.15); }

.standing-health-left { display: flex; align-items: center; gap: 20px; flex: 1; min-width: 0; z-index: 1; }

/* Ring */
.standing-health-ring { position: relative; width: 80px; height: 80px; flex-shrink: 0; }
.standing-ring-svg { width: 80px; height: 80px; transform: rotate(-90deg); }
.standing-ring-bg { fill: none; stroke: rgba(255,255,255,0.06); stroke-width: 8; }
.standing-ring-fill {
    fill: none; stroke: currentColor; stroke-width: 8;
    stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.8s ease, stroke 0.4s ease;
}
.standing-ring-icon {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 28px;
}

.standing-health-info { min-width: 0; }
.standing-health-level {
    font-size: 20px; font-weight: 700; color: currentColor; margin-bottom: 4px;
}
.standing-health-desc {
    font-size: 13px; color: var(--text-secondary); line-height: 1.5;
}

.standing-health-stats {
    display: flex; gap: 20px; flex-shrink: 0; z-index: 1;
}
.standing-stat {
    text-align: center; padding: 12px 20px;
    background: rgb(0 0 0 / calc(0.2 * var(--shade-k))); border-radius: 10px;
    border: 1px solid rgb(var(--overlay-rgb) / 0.04);
    min-width: 80px;
}
.standing-stat-value {
    font-size: 24px; font-weight: 700; color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}
.standing-stat-label {
    font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
    color: var(--text-muted); margin-top: 2px;
}

/* ── Sections ── */
.standing-section { margin-bottom: 20px; }
.standing-section-header {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
    color: var(--text-secondary); margin-bottom: 12px; padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.standing-section-dot {
    width: 8px; height: 8px; border-radius: 50%;
}
.standing-dot-active { background: #EF4444; box-shadow: 0 0 8px rgba(239,68,68,0.4); }
.standing-dot-expired { background: var(--text-muted); }
.standing-section-count {
    margin-left: auto; padding: 2px 8px; border-radius: 100px;
    font-size: 11px; font-weight: 600;
    background: rgb(var(--overlay-rgb) / 0.06); color: var(--text-secondary);
}
.standing-violations-list { display: flex; flex-direction: column; gap: 10px; }
.standing-empty {
    text-align: center; padding: 32px 16px; color: var(--text-muted); font-size: 13px;
    background: var(--bg-tertiary); border-radius: 10px; border: 1px dashed rgb(var(--overlay-rgb) / 0.06);
}

/* ── Violation Card ── */
.standing-violation-card {
    background: var(--bg-tertiary); border: 1px solid var(--border);
    border-radius: 12px; padding: 18px 20px; position: relative;
    transition: border-color 0.2s ease;
}
.standing-violation-card:hover { border-color: rgb(var(--overlay-rgb) / 0.1); }
.standing-violation-card.card-active { border-left: 3px solid; }
.standing-violation-card.card-active[data-type="ban"] { border-left-color: #EF4444; }
.standing-violation-card.card-active[data-type="ip_ban"] { border-left-color: #DC2626; }
.standing-violation-card.card-active[data-type="timeout"] { border-left-color: #F97316; }
.standing-violation-card.card-active[data-type="temp_restriction"] { border-left-color: #FB923C; }
.standing-violation-card.card-active[data-type="warning"] { border-left-color: #F59E0B; }
.standing-violation-card.card-active[data-type="mute"] { border-left-color: #F97316; }
.standing-violation-card.card-expired { opacity: 0.7; }

.standing-card-top {
    display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.standing-card-type-badge {
    font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
    padding: 3px 10px; border-radius: 6px; flex-shrink: 0;
}
.standing-card-type-badge.type-ban { background: rgba(239,68,68,0.12); color: #EF4444; }
.standing-card-type-badge.type-ip_ban { background: rgba(220,38,38,0.12); color: var(--danger-text, #fca5a5); }
.standing-card-type-badge.type-timeout { background: rgba(249,115,22,0.12); color: #FB923C; }
.standing-card-type-badge.type-temp_restriction { background: rgba(249,115,22,0.12); color: var(--tint-amber, #fdba74); }
.standing-card-type-badge.type-warning { background: rgba(245,158,11,0.12); color: var(--tint-amber, #f59e0b); }
.standing-card-type-badge.type-mute { background: rgba(249,115,22,0.12); color: #FB923C; }

/* ════════════════ CHANNEL SETTINGS OVERLAY ════════════════ */
.chs-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: var(--bg-secondary);
    display: block;
    overflow: hidden;
    animation: chsIn 0.12s ease;
    overscroll-behavior: none;
}
.chs-overlay.hidden { display: none; }
@keyframes chsIn { from { opacity: 0; } to { opacity: 1; } }

.chs-popup {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: none;
    height: 100vh;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    display: grid;
    grid-template-columns:
        minmax(240px, 23vw)
        220px
        minmax(0, 740px)
        minmax(60px, 1fr);
    grid-template-rows: 100vh;
    background: var(--bg-secondary);
    overflow: hidden;
    animation: none;
}

.chs-sidebar {
    grid-column: 2;
    width: 220px;
    min-width: 220px;
    height: 100vh;
    background: var(--bg-secondary);
    border-right: none;
    display: flex;
    flex-direction: column;
    padding: 64px 8px 64px 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-sizing: border-box;
}
.chs-channel-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
    word-break: break-word;
}
.chs-icon { font-size: 16px; opacity: 0.75; flex-shrink: 0; }
.chs-label-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chs-nav { display: flex; flex-direction: column; gap: 2px; }
.chs-nav-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-secondary);
    transition: background 0.12s, color 0.12s;
}
.chs-nav-item:hover { background: rgb(var(--overlay-rgb) / 0.06); color: var(--text-primary); }
.chs-nav-item.active { background: rgb(var(--overlay-rgb) / 0.1); color: var(--text-primary); font-weight: 600; }
.chs-nav-item.chs-nav-danger { color: #f87171; }
.chs-nav-item.chs-nav-danger:hover { background: rgba(248,113,113,0.1); color: var(--danger-text, #fca5a5); }
.chs-nav-item.chs-nav-danger.active { background: rgba(248,113,113,0.14); color: var(--danger-text, #fca5a5); }
.chs-nav-sep { height: 1px; background: var(--border); margin: 8px 4px; }

.chs-main { grid-column: 3 / 5; display: flex; flex-direction: column; position: relative; background: var(--bg-tertiary); height: 100vh; overflow: hidden; box-sizing: border-box; }  /* col3+col4 → kaydırma barı en SAĞDA (içerik .chs-content 740px kapaklı, sola hizalı) — sunucu ayarlarıyla aynı */
.chs-main-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 72px 40px 96px;
    overscroll-behavior: contain;
}
.chs-content {
    max-width: 740px;
}
.chs-close-zone {
    display: none; /* legacy — replaced by absolute .chs-close-btn */
}
.chs-close-btn {
    position: fixed;
    top: 24px;
    right: clamp(44px, 3.5vw, 76px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: 2px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    align-items: center;
    justify-content: center;
    z-index: 2001;
}
.chs-close-btn span {
    display: block;
    position: absolute;
    top: 46px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    white-space: nowrap;
    pointer-events: none;
}
.chs-close-btn:hover { border-color: var(--text-secondary); color: var(--text-primary); background: rgb(var(--overlay-rgb) / 0.07); }
.chs-esc-label { font-size: 11px; color: var(--text-muted); font-weight: 600; letter-spacing: 0.05em; }

/* ── Content area ── */
.chs-page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.chs-danger-title { color: #f87171; }
.chs-section { margin-bottom: 28px; }
.chs-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 10px;
}
.chs-field { margin-bottom: 18px; }
.chs-input-wrap {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.15s;
}
.chs-input-wrap:focus-within { border-color: var(--accent); }
.chs-input-prefix {
    padding: 0 10px;
    color: var(--text-muted);
    font-size: 16px;
    border-right: 1px solid var(--border);
    align-self: stretch;
    display: flex; align-items: center;
}
.chs-input-wrap input {
    flex: 1;
    background: none;
    border: none;
    padding: 10px 12px;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
}
.chs-select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}
.chs-select:disabled { opacity: 0.45; cursor: not-allowed; }
.chs-placeholder-note { display: block; font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.chs-footer {
    position: sticky;
    bottom: 0;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border);
    padding: 14px 0;
    margin-top: 24px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    z-index: 1;
}
.chs-footer.chs-footer-hidden { display: none; }
.chs-cancel-btn {
    background: none; border: none;
    padding: 8px 16px; font-size: 14px;
    color: var(--text-muted);
    cursor: pointer; border-radius: var(--radius-sm);
}
.chs-cancel-btn:hover { color: var(--text-primary); background: rgb(var(--overlay-rgb) / 0.06); }
.chs-placeholder {
    padding: 20px;
    border-radius: var(--radius-md);
    background: var(--bg-hover);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* ── Invites tab ──
   Kanal Ayarları > Davetler, Sunucu Ayarları > Davetler ile AYNI ortak listeyi
   kullanır (.invites-list / .invite-table-header / .invite-row / .inv-* —
   bkz. "Invite Management" bölümü). Buraya yüzeye özel tablo stili EKLENMEZ;
   aksi halde iki ekran yeniden ayrışır. Buradaki tek iş, modal içindeki kabın
   satır dolgusuyla başlık hizasını tutturmak. */
#chs-invites-body.invites-list:has(.invite-row) {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
#chs-invites-body.invites-list .invite-row { border-radius: 0; }
.chs-empty-state {
    text-align: center;
    padding: 48px 0;
    color: var(--text-muted);
    font-size: 14px;
}

/* ── C1D2A (Karar #43): Kanal İzinleri sekmesi (cp-*) ── */
.cp-subtitle { color: var(--text-muted); font-size: 13px; margin: -8px 0 16px; }
#cp-sync-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.cp-sync-note { color: var(--text-muted); font-size: 12px; }
/* Discord tarzı senkron durum şeridi (banner) */
.cp-sync-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: rgb(var(--overlay-rgb) / 0.03);
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-secondary);
}
.cp-sync-banner-text b { color: var(--text-primary); font-weight: 700; }
.cp-sync-banner-ico { display: inline-flex; align-items: center; flex-shrink: 0; }
.cp-sync-banner-ok  .cp-sync-banner-ico { color: var(--online); }
.cp-sync-banner-off .cp-sync-banner-ico { color: var(--tint-amber, #f59e0b); }
.cp-sync-now-btn {
    margin-left: auto;
    flex-shrink: 0;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgb(var(--overlay-rgb) / 0.06);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.cp-sync-now-btn:hover { background: rgb(var(--overlay-rgb) / 0.12); }
/* Kanal ayarları overlay'i (z 2000) açıkken onay diyaloğu (varsayılan z 600) üstte kalsın */
body:has(#channel-settings-modal:not(.hidden)) #generic-confirm-modal,
body:has(#channel-settings-modal:not(.hidden)) #delete-channel-modal { z-index: 2200; }
.cp-layout { display: flex; gap: 18px; align-items: flex-start; }
.cp-targets { flex: 0 0 200px; position: relative; }
.cp-targets-head {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--text-muted);
    margin-bottom: 8px;
}
.cp-add-btn {
    width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--border);
    background: transparent; color: var(--text-secondary); font-size: 15px; line-height: 1;
    cursor: pointer;
}
.cp-add-btn:hover { background: rgb(var(--overlay-rgb) / 0.07); color: var(--text-primary); }
.cp-add-menu {
    position: absolute; top: 28px; left: 0; right: 0; z-index: 30;
    background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px;
    padding: 6px; max-height: 260px; overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
.cp-add-sec { font-size: 10px; font-weight: 700; color: var(--text-muted); padding: 5px 8px 3px; letter-spacing: 0.05em; }
.cp-add-item {
    display: flex; align-items: center; gap: 7px; width: 100%; text-align: left;
    background: transparent; border: none; color: var(--text-secondary);
    font-size: 13px; padding: 6px 8px; border-radius: 6px; cursor: pointer;
}
.cp-add-item:hover { background: rgb(var(--overlay-rgb) / 0.07); color: var(--text-primary); }
.cp-target-list { display: flex; flex-direction: column; gap: 2px; }
.cp-target-item {
    display: flex; align-items: center; gap: 7px; width: 100%; text-align: left;
    background: transparent; border: none; color: var(--text-secondary);
    font-size: 13px; padding: 7px 9px; border-radius: 6px; cursor: pointer;
}
.cp-target-item:hover { background: rgb(var(--overlay-rgb) / 0.06); color: var(--text-primary); }
.cp-target-item.active { background: rgb(var(--overlay-rgb) / 0.1); color: var(--text-primary); font-weight: 600; }
.cp-t-icon { font-weight: 700; flex-shrink: 0; }
.cp-t-icon.cp-t-member { font-size: 12px; }
.cp-t-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.cp-default-badge {
    font-size: 9px; font-weight: 700; color: var(--text-muted);
    border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; flex-shrink: 0;
}
.cp-lock { font-size: 10px; flex-shrink: 0; opacity: 0.8; }
.cp-dirty-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.cp-editor { flex: 1; min-width: 0; max-height: 52vh; overflow-y: auto; padding-right: 4px; }
.cp-editor-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cp-editor-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.cp-del-btn {
    font-size: 11px; padding: 4px 10px; border-radius: 6px; cursor: pointer;
    background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.3); color: #f87171;
}
.cp-del-btn:hover { background: rgba(248,113,113,0.2); }
.cp-locked-note { font-size: 12px; color: var(--tint-amber, #f59e0b); margin: 4px 0 10px; }
.cp-group-title {
    font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--text-muted);
    margin: 16px 0 6px;
}
.cp-perm-row {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 10px 0; border-bottom: 1px solid var(--border);
}
.cp-perm-info { min-width: 0; }
.cp-perm-name { font-size: 14px; color: var(--text-primary); font-weight: 500; }
.cp-perm-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.cp-tristate { display: flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; flex-shrink: 0; }
.cp-ts-btn {
    width: 34px; height: 28px; background: transparent; border: none; cursor: pointer;
    color: var(--text-muted); font-size: 13px; line-height: 1;
}
.cp-ts-btn + .cp-ts-btn { border-left: 1px solid var(--border); }
.cp-ts-btn:hover:not(:disabled) { background: rgb(var(--overlay-rgb) / 0.07); color: var(--text-primary); }
.cp-ts-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.cp-ts-deny.on    { background: rgba(239,68,68,0.25); color: #EF4444; }
.cp-ts-default.on { background: rgba(148,163,184,0.22); color: var(--text-primary); }
.cp-ts-allow.on   { background: rgba(16,185,129,0.25); color: var(--online); }
@media (max-width: 900px) {
    .cp-layout { flex-direction: column; }
    .cp-targets { flex: none; width: 100%; }
    .cp-editor { max-height: none; }
}

/* ── C1D2B: kategori izin editörü (miras açıklaması — varsayılan gizli disclosure) ── */
.cp-inherit-note {
    background: rgba(6,182,212,0.06);
    border: 1px solid rgba(6,182,212,0.22);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    overflow: hidden;
}
.cp-inherit-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: left;
    font-family: inherit;
}
.cp-inherit-toggle:hover { color: var(--text-primary); }
.cp-inherit-ico { color: var(--accent); display: inline-flex; align-items: center; flex-shrink: 0; }
.cp-inherit-ico svg { display: block; }
.cp-inherit-chev { margin-left: auto; font-size: 11px; transition: transform var(--transition); transform: rotate(-90deg); }
.cp-inherit-open .cp-inherit-chev { transform: rotate(0deg); }
.cp-inherit-body { display: none; padding: 0 14px 12px; }
.cp-inherit-open .cp-inherit-body { display: block; }
.cp-inherit-title { font-size: 13px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.cp-inherit-list { margin: 0; padding-left: 18px; }
.cp-inherit-list li { font-size: 12px; color: var(--text-secondary); line-height: 1.65; }
.cp-inherit-meta { font-size: 12px; color: var(--text-muted); margin-top: 8px; }
/* ── Delete/Danger zone ── */
.chs-danger-zone {
    border: 1px solid rgba(248,113,113,0.2);
    border-radius: var(--radius-md);
    padding: 22px;
    background: rgba(127,29,29,0.09);
}
.chs-danger-zone h3 {
    font-size: 16px; font-weight: 700; color: #f87171; margin-bottom: 8px;
}
.chs-danger-zone p {
    font-size: 14px; color: var(--text-secondary); margin-bottom: 18px; line-height: 1.55;
}

/* ── Security Actions Tab ── */
.settings-toggle-row {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px;
}
.settings-toggle-info { flex: 1; }
.settings-toggle-label { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.settings-toggle-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
/* Baslik + aciklama blogu artik `<label for=...>` -> tiklanabilir. Imlec ve
   hafif renk geri bildirimi bunu belli eder; TASARIM (olcu/renk/yerlesim)
   DEGISMEZ. `.toggle-slider` zaten `cursor: pointer` tasir. */
label.settings-toggle-info { cursor: pointer; }
label.settings-toggle-info:hover .settings-toggle-label { color: var(--ui-text-strong); }
label.settings-toggle-info:hover .settings-toggle-desc { color: var(--text-secondary); }

.ss-security-active-card { border-left: 3px solid var(--dnd); }

/* ─── Category System ──────────────────────────────────────────────── */
#channel-category-list { padding: 4px 0; }
.category-section { margin-bottom: 2px; }
/* Kategorisiz kanallar BAŞLIKSIZ bir blok olarak gerçek kategorilerin
   ÜSTÜNDE durur; başlık olmadığı için ilk kanal satırına nefes payı
   verilir (kategori başlığının 12px üst dolgusunun yerini tutar). */
.category-section[data-uncat="1"] { padding-top: 8px; margin-bottom: 4px; }
/* "Sabitlenen Kanallar" etiketi kategori BAŞLIĞI DEĞİLDİR: tıklanmaz,
   daraltmaz, "+"/chevron taşımaz. Tipografi `.category-header` ile aynı
   ailede (10px/700/uppercase) ama daha sönük. */
.pinned-label {
    display: flex; align-items: center; gap: 4px;
    padding: 12px 8px 4px 14px;
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.8px; color: var(--text-muted);
    opacity: .75; user-select: none; cursor: default;
}
.pinned-label-icon { flex: 0 0 10px; opacity: .8; }
/* Sabit blokta etiketin KENDİ 12px üst dolgusu var → `[data-uncat="1"]`den
   miras gelen 8px üst dolgu üst üste binerdi; sıfırlanır. */
.category-section[data-pinned="1"] {
    padding-top: 0; padding-bottom: 6px; margin-bottom: 6px;
}
.category-header {
    display: flex; align-items: center; gap: 4px; padding: 12px 8px 4px 14px;
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.8px; color: var(--text-muted); cursor: pointer; user-select: none;
}
.category-header:hover { color: var(--text-secondary); }
.category-arrow { transition: transform var(--transition); flex-shrink: 0; }
.category-header.collapsed .category-arrow { transform: rotate(-90deg); }
.category-name-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-add-btn {
    margin-left: auto; display: flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border-radius: 4px;
    color: var(--text-muted); cursor: pointer; background: none;
    border: none; transition: all var(--transition); flex-shrink: 0;
}
.category-add-btn:hover { color: var(--text-primary); background: var(--bg-hover); }
/* Kategori emojisi (opsiyonel). Emoji YOKSA bu DOM hic olusmaz →
   baslik yerlesimi BIREBIR eskisi gibi kalir. Emoji varken de yalniz
   ok ile ad arasina dar, kirpilmayan bir oge girer; ad hala flex:1 ile
   buyuyup ellipsis yapar. */
.category-emoji {
    flex-shrink: 0; font-size: 12px; line-height: 1;
    display: inline-flex; align-items: center;
}
/* Yonetici kontrolleri `.category-add-btn` gorunumunu paylasir; ancak
   `margin-left:auto` ACIKCA sifirlanir → birden fazla buton yan yana
   deterministik dizilir (bosluk dagilimi degismez). */
.category-emoji-btn, .category-emoji-clear-btn { margin-left: 0; }
.category-emoji-btn-glyph { font-size: 13px; line-height: 1; }
.category-channel-list { overflow: hidden; transition: height var(--transition); }
/* Kategori KAPALI: kanalları gizle AMA aktif kanal + kullanıcılı/aktif ses kanalları (.keep-visible-collapsed) görünür
   kalır (Discord davranışı). Görünür kalan yoksa liste boş → yalnızca başlık görünür. Çocuk display:none ile gizlenir,
   böylece aradaki öğeler korunabilir (max-height animasyonu seçici gizlemeye uygun değildi). */
.category-channel-list.collapsed-list > .channel-item:not(.keep-visible-collapsed),
.category-channel-list.collapsed-list > .voice-channel-item:not(.keep-visible-collapsed) { display: none; }
/* Drag/drop */
.category-section[draggable="true"] { cursor: grab; }
.category-section.is-dragging { opacity: 0.4; }
.category-section.drag-over { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 4px; }
.category-header.is-drop-target { background: var(--bg-hover); border-radius: 4px; }
/* Category reorder insertion line */
.category-section.cat-drop-above { box-shadow: inset 0 2px 0 0 var(--accent); }
.category-section.cat-drop-below { box-shadow: inset 0 -2px 0 0 var(--accent); }
.channel-item[draggable="true"], .voice-channel-item[draggable="true"] { cursor: grab; }
.channel-item.is-dragging, .voice-channel-item.is-dragging { opacity: 0.4; }
.channel-item.drag-placeholder, .voice-channel-item.drag-placeholder {
    background: rgba(88,101,242,0.15); border-radius: 4px; border: 1px dashed var(--accent); min-height: 32px;
}
/* Insertion line indicators */
.channel-item.drop-above, .voice-channel-item.drop-above {
    border-top: 2px solid var(--accent);
}
.channel-item.drop-below, .voice-channel-item.drop-below {
    border-bottom: 2px solid var(--accent);
}
.category-channel-list.is-drop-target {
    background: rgba(88,101,242,0.07); border-radius: 4px;
}
/* Bos kategori: liste kutusu 0px yuksekliginde oldugu icin yukaridaki tint
   hicbir seyi boyamaz ve kullanici birakma geri bildirimi goremezdi. Gosterge
   YALNIZ surukleme sirasinda (`is-drop-target`) ve YALNIZ liste GERCEKTEN
   bosken (`:empty`) bir kanal satiri kadar (32px) yer kaplar -> DOLU
   kategorilerde mevcut davranis BIREBIR korunur ve DOM'a sahte kanal
   yer tutucusu EKLENMEZ. Renk dili sürüklemenin kendi göstergesiyle aynı
   (`.channel-item.drop-below` -> `var(--accent)`); tint mevcut
   `--accent-soft` tokenidir (yeni CSS ozelligi/bagimliligi yok). */
.category-channel-list.is-drop-target:empty {
    min-height: 32px; box-sizing: border-box;
    border: 1px dashed var(--accent);
    background: var(--accent-soft);
}
/* Modal category select */
.channel-category-field { display: flex; flex-direction: column; gap: 6px; }
.channel-category-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); }
.channel-category-help { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.channel-category-context {
    font-size: 12px; color: var(--accent); background: rgba(88,101,242,0.1);
    border-left: 2px solid var(--accent); padding: 5px 8px; border-radius: 0 4px 4px 0;
}
.channel-category-context.hidden { display: none; }
.cat-dd-wrap { position: relative; }
.cat-dd-trigger {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px;
    background: var(--ui-gh-input);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    color: var(--text-primary); font-size: 14px;
    cursor: pointer; text-align: left;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none; min-height: 40px;
}
.cat-dd-trigger:hover:not(:disabled) {
    border-color: rgba(148, 163, 184, 0.35);
    background: var(--ui-gh-raised);
}
.cat-dd-trigger:focus-visible:not(:disabled),
.cat-dd-trigger.open {
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.08);
}
.cat-dd-trigger:disabled { opacity: 0.45; cursor: not-allowed; }
.cat-dd-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-dd-chevron {
    flex-shrink: 0; margin-left: 8px;
    color: rgba(148, 163, 184, 0.5);
    transition: transform 0.18s ease;
}
.cat-dd-trigger.open .cat-dd-chevron { transform: rotate(180deg); }

.cat-dd-menu {
    position: absolute; left: 0; right: 0; top: calc(100% + 6px);
    background: var(--surface-menu, var(--ui-gh-raised));
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 10px;
    box-shadow: 0 14px 36px rgba(0,0,0,0.45), 0 2px 8px rgba(0,0,0,0.25);
    overflow-y: auto; max-height: 200px;
    z-index: 1000;
    padding: 6px;
    transform-origin: top center;
    animation: catDdIn 0.12s ease;
}
@keyframes catDdIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .cat-dd-menu { animation: none; }
}
.cat-dd-menu[hidden] { display: none; }

.cat-dd-option {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 38px; padding: 0 12px;
    color: var(--ui-text-gray-soft); font-size: 14px;
    cursor: pointer; user-select: none;
    border-radius: 7px;
    transition: background 0.1s ease, color 0.1s ease;
}
.cat-dd-option:hover {
    background: rgb(var(--overlay-rgb) / 0.06);
    color: var(--ui-text-header-alt);
}
.cat-dd-option.selected {
    color: var(--ui-text-header-alt); font-weight: 500;
    background: rgba(88, 101, 242, 0.18);
}
.cat-dd-option.selected:hover { background: rgba(88, 101, 242, 0.26); }
.cat-dd-option.selected::after {
    content: '';
    display: inline-block; flex-shrink: 0;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.8);
    margin-left: 8px;
}

/* custom scrollbar inside menu */
.cat-dd-menu::-webkit-scrollbar { width: 4px; }
.cat-dd-menu::-webkit-scrollbar-track { background: transparent; }
.cat-dd-menu::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.2); border-radius: 4px; }


/* ── Security Banner ── */
/* 5100 paritesi: Guvenlik Eylemleri seridi KANAL HEADER'ININ ICINDE: ayri satir yoktur,
   dolayisiyla kendi zemini/kenarligi/yuksekligi de yoktur -> header 49px KALIR.
   Orta bos alani doldurur; dar genislikte ONCE bu serit kisalir (metin ellipsis),
   kanal adi ve sagdaki kontroller etkilenmez. */
.security-banner {
    display: flex; align-items: center; gap: 8px;
    flex: 1 1 auto; min-width: 0;
    margin: 0 12px;
    /* Kendine ait COK HAFIF yuzey: header'dan hissedilir ama baskin degil.
       Notr (kirmizi/bordo blok DEGIL) - tek renk vurgusu soldaki rozettedir.
       Ic dolgu 3px: icerik yuksekligi 25px -> serit 33px; header 49px SABIT kalir
       ve `align-items: center` sayesinde dikey hizalar DEGISMEZ. */
    padding: 3px 8px;
    background: rgb(0 0 0 / calc(0.16 * var(--shade-k)));
    border: 1px solid rgb(var(--overlay-rgb) / 0.05);
    border-radius: 8px;
    font-size: 13px; line-height: 1.35;
    color: var(--text-primary);
    overflow: hidden;
}
.security-banner.hidden { display: none; }
/* Sol rozet: kucuk, yumusak, soluk uyari tonu (parlak/kaba degil).
   Ikon MEVCUT kalkan glifidir - yeni ikon sistemi uretilmedi. */
.security-banner-badge {
    flex-shrink: 0;
    width: 20px; height: 20px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 6px;
    background: rgba(239,68,68,0.11);
    border: 1px solid rgba(239,68,68,0.20);
    color: var(--danger-text, #eda8a8);
}
.security-banner-badge svg { width: 12px; height: 12px; display: block; }
/* Mesaj: header'da TEK satir; sigmazsa ellipsis (basliga/kontrollere dokunmaz). */
#security-banner-text {
    min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Buton: ayri bir katman gibi durmasin -> notr koyu yuzey + tema kenarligi. */
/* Daralma SIRASI: once mesaj metni (ellipsis), sonra buton etiketi (ellipsis).
   "X" ASLA kirpilmaz/kaybolmaz -> kapatma kontrolu her genislikte erisilebilir. */
.security-banner-btn {
    margin-left: auto;
    flex: 0 1 auto; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    display: inline-flex; align-items: center;
    background: rgb(var(--overlay-rgb) / 0.05);
    border: 1px solid var(--border);
    color: var(--text-primary); border-radius: 6px;
    padding: 3px 12px; font-size: 12px; font-weight: 500; line-height: 1.4;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}
.security-banner-btn:hover { background: rgb(var(--overlay-rgb) / 0.09); border-color: rgba(239,68,68,0.35); }
/* G2 "X": sade, sessiz; banner'in kendi diline oturur. Kapatma YALNIZ gorunumdur. */
.security-banner-close {
    flex-shrink: 0;
    width: 22px; height: 22px;
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: none; padding: 0;
    border-radius: 6px;
    color: var(--text-muted); cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.security-banner-close svg { width: 14px; height: 14px; display: block; }
.security-banner-close:hover { background: rgb(var(--overlay-rgb) / 0.07); color: var(--text-primary); }
/* COK DAR pencerede serit kendi yuzeyi + ic dolgusuyla birlikte butonu tasiyamaz;
   once "Ac" dugmesi cekilir (ayni islem sunucu ayarlarindan erisilebilir),
   "X" HER ZAMAN kalir. Kanal adi ve sag kontroller etkilenmez. */
@media (max-width: 760px) {
    .security-banner { padding: 3px 6px; gap: 6px; }
    .security-banner-btn { display: none; }
    .security-banner-close { margin-left: auto; }
}

/* ── Voice channel chat hover button ── */
.voice-channel-hover-actions .ch-chat-btn { order: -1; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .chs-sidebar { width: 160px; padding: 20px 4px 12px; }
    .chs-content { padding: 24px 16px 60px; }
    .chs-close-zone { padding: 16px 12px 0; }
}

.standing-card-title { flex: 1; font-size: 14px; font-weight: 600; color: var(--text-primary); }
.standing-card-status {
    font-size: 10px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase;
    padding: 3px 10px; border-radius: 100px; flex-shrink: 0;
}
.standing-card-status.status-active {
    background: rgba(239,68,68,0.1); color: #EF4444; border: 1px solid rgba(239,68,68,0.2);
}
.standing-card-status.status-expired {
    background: rgb(var(--overlay-rgb) / 0.04); color: var(--text-muted); border: 1px solid rgb(var(--overlay-rgb) / 0.06);
}
.standing-card-status.status-revoked {
    background: rgba(16,185,129,0.1); color: #10B981; border: 1px solid rgba(16,185,129,0.2);
}

.standing-card-fields {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; margin-bottom: 14px;
}
.standing-card-field {}
.standing-card-field-label {
    font-size: 10px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase;
    color: var(--text-muted); margin-bottom: 2px;
}
.standing-card-field-value { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
.standing-card-field-value.countdown-value {
    color: #EF4444; font-weight: 600; font-variant-numeric: tabular-nums;
}

.standing-card-impact {
    display: flex; align-items: center; gap: 6px; padding: 8px 12px;
    background: rgba(239,68,68,0.06); border-radius: 8px; margin-bottom: 14px;
    font-size: 12px; color: var(--dnd); line-height: 1.4;
}
.standing-card-impact svg { flex-shrink: 0; opacity: 0.7; }
.standing-card-impact.impact-expired {
    background: rgb(var(--overlay-rgb) / 0.03); color: var(--text-muted);
}

.standing-card-appeal-status {
    display: flex; align-items: center; gap: 6px; padding: 8px 12px;
    border-radius: 8px; margin-bottom: 14px; font-size: 12px;
}
.standing-card-appeal-status.appeal-pending {
    background: rgba(245,158,11,0.08); color: var(--tint-amber, #f59e0b);
    border: 1px solid rgba(245,158,11,0.15);
}
.standing-card-appeal-status.appeal-approved {
    background: rgba(16,185,129,0.08); color: #10B981;
    border: 1px solid rgba(16,185,129,0.15);
}
.standing-card-appeal-status.appeal-rejected {
    background: rgba(239,68,68,0.08); color: #EF4444;
    border: 1px solid rgba(239,68,68,0.15);
}

.standing-card-actions {
    display: flex; gap: 8px; padding-top: 12px;
    border-top: 1px solid var(--border);
}
.standing-action-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: 6px; font-size: 12px; font-weight: 600;
    border: none; cursor: pointer; transition: all 0.2s ease;
}
.standing-action-appeal {
    background: linear-gradient(135deg, #06B6D4, #8B5CF6); color: #fff;
    box-shadow: 0 2px 8px rgba(6,182,212,0.2);
}
.standing-action-appeal:hover { box-shadow: 0 4px 14px rgba(6,182,212,0.3); transform: translateY(-1px); }
.standing-action-appeal:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.standing-action-info {
    background: rgb(var(--overlay-rgb) / 0.06); color: var(--text-secondary);
    border: 1px solid rgb(var(--overlay-rgb) / 0.08);
}
.standing-action-info:hover { background: rgb(var(--overlay-rgb) / 0.1); color: var(--text-primary); }

/* ── Info Notice ── */
.standing-info-notice {
    display: flex; align-items: flex-start; gap: 10px; padding: 14px 18px;
    background: rgba(6,182,212,0.06); border: 1px solid rgba(6,182,212,0.12);
    border-radius: 10px; font-size: 12px; color: var(--text-secondary); line-height: 1.5;
    margin-top: 8px;
}
.standing-info-notice svg { flex-shrink: 0; margin-top: 1px; color: var(--accent); }

/* ── Punishment Screen Standing Button ── */
.punishment-standing-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 24px; border-radius: 8px;
    background: rgb(var(--overlay-rgb) / 0.06); color: var(--text-secondary);
    font-size: 14px; font-weight: 500; border: 1px solid rgb(var(--overlay-rgb) / 0.08); cursor: pointer;
    transition: all 0.2s ease;
}
.punishment-standing-btn:hover { background: rgb(var(--overlay-rgb) / 0.1); color: var(--text-primary); }

/* ── Restriction Banner Standing Button ── */
.restriction-panel-standing {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 6px;
    background: rgba(255,255,255,0.1); color: #fff;
    font-size: 12px; font-weight: 600; border: 1px solid rgba(255,255,255,0.15);
    cursor: pointer; transition: all 0.2s ease; white-space: nowrap;
}
.restriction-panel-standing:hover { background: rgba(255,255,255,0.2); }

/* ── Settings Nav Standing Indicator ── */
.settings-nav-item .standing-nav-dot {
    width: 6px; height: 6px; border-radius: 50%; margin-left: auto;
}
.standing-nav-dot.dot-good { background: #10B981; }
.standing-nav-dot.dot-warn { background: #F59E0B; }
.standing-nav-dot.dot-danger { background: #EF4444; }

/* ── Sanction Notice Modal ── */
.sanction-notice-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.sanction-notice-overlay.hidden { display: none; }
.sanction-notice-card {
    background: var(--surface-card, var(--ui-tertiary)); border: 1px solid rgb(var(--overlay-rgb) / 0.08);
    border-radius: 12px; width: 100%; max-width: 420px;
    padding: 28px 28px 24px; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: snc-enter 0.2s ease;
}
@keyframes snc-enter {
    from { opacity: 0; transform: translateY(-12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.snc-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.snc-badge {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 3px 10px; border-radius: 20px; font-size: 10px; font-weight: 700;
    letter-spacing: 0.06em; text-transform: uppercase;
    background: rgba(239,68,68,0.15); color: #ef4444; border: 1px solid rgba(239,68,68,0.3);
    flex-shrink: 0;
}
.snc-badge.snc-badge-warning { background: rgba(245,158,11,0.15); color: var(--tint-amber, #f59e0b); border-color: rgba(245,158,11,0.3); }
.snc-badge.snc-badge-mute    { background: rgba(99,102,241,0.15); color: #818cf8; border-color: rgba(99,102,241,0.3); }
.snc-badge.snc-badge-timeout { background: rgba(249,115,22,0.15); color: #fb923c; border-color: rgba(249,115,22,0.3); }
.snc-badge.snc-badge-rename  { background: rgba(16,185,129,0.15); color: var(--tint-green, #34d399); border-color: rgba(16,185,129,0.3); }
.snc-badge.snc-badge-security { background: rgba(99,102,241,0.15); color: #818cf8; border-color: rgba(99,102,241,0.3); }
.snc-title {
    font-size: 15px; font-weight: 700; color: var(--ui-text-header); line-height: 1.3;
}
.snc-subtitle {
    font-size: 13px; color: var(--ui-text-muted); margin-bottom: 14px; line-height: 1.5;
}
.snc-reason {
    background: rgb(var(--overlay-rgb) / 0.04); border: 1px solid rgb(var(--overlay-rgb) / 0.08);
    border-radius: 8px; padding: 10px 14px; margin-bottom: 14px;
}
.snc-reason-label {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.07em; color: #5c6068; margin-bottom: 4px;
}
.snc-reason-text { font-size: 13px; color: var(--ui-text-soft); line-height: 1.5; }
.snc-meta {
    display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.snc-meta-item {
    display: flex; flex-direction: column; gap: 2px;
}
.snc-meta-label {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.07em; color: #5c6068;
}
.snc-meta-value { font-size: 12px; color: var(--ui-text-muted); }
.snc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.snc-btn-primary {
    flex: 1; padding: 9px 16px; border-radius: 7px; border: none; cursor: pointer;
    background: var(--brand); color: #fff; font-size: 13px; font-weight: 600;
    transition: background 0.15s ease; white-space: nowrap;
}
.snc-btn-primary:hover { background: var(--brand-deep); }
.snc-btn-secondary {
    padding: 9px 14px; border-radius: 7px; cursor: pointer;
    background: rgb(var(--overlay-rgb) / 0.06); color: var(--ui-text-muted);
    font-size: 13px; font-weight: 500; border: 1px solid rgb(var(--overlay-rgb) / 0.08);
    transition: all 0.15s ease; white-space: nowrap;
}
.snc-btn-secondary:hover { background: rgb(var(--overlay-rgb) / 0.1); color: var(--ui-text-soft); }

/* ── Force Rename Screen (full-page blocker, replaces app entirely) ── */
.force-rename-screen {
    position: fixed; inset: 0; z-index: 10001;
    background: var(--ui-force-bg);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    overflow-y: auto;
}
.force-rename-screen.hidden { display: none; }
.force-rename-screen-bg {
    position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.force-rename-screen-orb {
    position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
    width: 700px; height: 700px; border-radius: 50%;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.08) 0%, transparent 65%);
}
.force-rename-screen-card {
    position: relative; width: 100%; max-width: 440px;
    background: var(--surface-card, var(--ui-card-deep)); border: 1px solid rgb(var(--overlay-rgb) / 0.08);
    border-radius: 16px; padding: 40px 36px 32px;
    box-shadow: 0 32px 80px rgba(0,0,0,0.6);
    animation: snc-enter 0.25s ease;
}
.force-rename-screen-icon {
    width: 52px; height: 52px; border-radius: 14px;
    background: rgba(52,211,153,0.1); border: 1.5px solid rgba(52,211,153,0.25);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px; color: var(--tint-green, #34d399);
}
.force-rename-screen-badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    background: rgba(52,211,153,0.12); color: var(--tint-green, #34d399);
    font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    border: 1px solid rgba(52,211,153,0.25);
    margin: 0 auto 14px; display: block; width: fit-content;
}
.force-rename-screen-title {
    font-size: 20px; font-weight: 700; color: var(--ui-text-header);
    text-align: center; margin-bottom: 10px;
}
.force-rename-screen-subtitle {
    font-size: 13px; color: var(--ui-text-dim); text-align: center;
    margin-bottom: 20px; line-height: 1.6;
}
.force-rename-screen-reason {
    background: rgba(245,158,11,0.07); border: 1px solid rgba(245,158,11,0.2);
    border-radius: 8px; padding: 10px 14px; margin-bottom: 20px;
}
.force-rename-screen-reason.hidden { display: none; }
.force-rename-screen-reason-label {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.07em; color: #d97706; margin-bottom: 4px;
}
.force-rename-screen-reason-text { font-size: 13px; color: var(--ui-text-soft); line-height: 1.5; }
.force-rename-screen-field { margin-bottom: 6px; }
.force-rename-screen-label {
    display: block; font-size: 12px; font-weight: 600; color: var(--ui-text-dim);
    text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px;
}
.force-rename-screen-input {
    width: 100%; padding: 11px 14px; border-radius: 8px;
    background: rgb(var(--overlay-rgb) / 0.05); border: 1px solid rgb(var(--overlay-rgb) / 0.1);
    color: var(--ui-text-header); font-size: 15px; outline: none; box-sizing: border-box;
    transition: border-color 0.15s ease;
}
.force-rename-screen-input:focus { border-color: #34d399; background: rgb(var(--overlay-rgb) / 0.07); }
.force-rename-screen-hint {
    font-size: 11px; color: var(--ui-text-ghost); margin-top: 6px; margin-bottom: 16px;
}
.force-rename-screen-error {
    font-size: 12px; color: #ef4444; margin-bottom: 14px; line-height: 1.4;
}
.force-rename-screen-error.hidden { display: none; }
.force-rename-screen-btn {
    width: 100%; padding: 12px; border-radius: 9px; border: none; cursor: pointer;
    background: #34d399; color: #0a0f0a; font-size: 14px; font-weight: 700;
    transition: background 0.15s ease; letter-spacing: 0.01em;
    margin-bottom: 14px;
}
.force-rename-screen-btn:hover { background: #10b981; }
.force-rename-screen-btn:disabled { background: var(--ui-btn-disabled); color: #4a5568; cursor: not-allowed; }
.force-rename-screen-logout-btn {
    width: 100%; padding: 10px; border-radius: 9px; border: 1px solid rgb(var(--overlay-rgb) / 0.08);
    background: transparent; color: var(--ui-text-dim); font-size: 13px; font-weight: 500;
    cursor: pointer; transition: background 0.15s, color 0.15s; margin-bottom: 14px;
}
.force-rename-screen-logout-btn:hover { background: rgb(var(--overlay-rgb) / 0.05); color: var(--ui-text-secondary); }
.force-rename-screen-footer {
    font-size: 11px; color: #3a3d44; text-align: center; line-height: 1.5;
}

/* ── Force Password Screen (full-page blocker) ── */
.force-password-screen {
    position: fixed; inset: 0; z-index: 10001;
    background: var(--ui-force-bg);
    display: flex; align-items: center; justify-content: center;
    padding: 24px; overflow-y: auto;
}
.force-password-screen.hidden { display: none; }
.force-password-screen-bg {
    position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.force-password-screen-orb {
    position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
    width: 700px; height: 700px; border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 65%);
}
.force-password-screen-card {
    position: relative; width: 100%; max-width: 440px;
    background: var(--surface-card, var(--ui-card-deep)); border: 1px solid rgb(var(--overlay-rgb) / 0.08);
    border-radius: 16px; padding: 40px 36px 32px;
    box-shadow: 0 32px 80px rgba(0,0,0,0.6);
    animation: snc-enter 0.25s ease;
}
.force-password-screen-icon {
    width: 52px; height: 52px; border-radius: 14px;
    background: rgba(99,102,241,0.1); border: 1.5px solid rgba(99,102,241,0.25);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px; color: #818cf8;
}
.force-password-screen-badge {
    display: block; width: fit-content; margin: 0 auto 14px;
    padding: 3px 10px; border-radius: 20px;
    background: rgba(99,102,241,0.12); color: #818cf8;
    font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    border: 1px solid rgba(99,102,241,0.25);
}
.force-password-screen-title {
    font-size: 20px; font-weight: 700; color: var(--ui-text-header);
    text-align: center; margin-bottom: 10px;
}
.force-password-screen-subtitle {
    font-size: 13px; color: var(--ui-text-dim); text-align: center;
    margin-bottom: 20px; line-height: 1.6;
}
.force-password-screen-reason {
    background: rgba(245,158,11,0.07); border: 1px solid rgba(245,158,11,0.2);
    border-radius: 8px; padding: 10px 14px; margin-bottom: 20px;
}
.force-password-screen-reason.hidden { display: none; }
.force-password-screen-reason-label {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.07em; color: #d97706; margin-bottom: 4px;
}
.force-password-screen-reason-text { font-size: 13px; color: var(--ui-text-soft); line-height: 1.5; }
.force-password-screen-field { margin-bottom: 16px; }
.force-password-screen-label {
    display: block; font-size: 12px; font-weight: 600; color: var(--ui-text-dim);
    text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px;
}
.force-password-screen-input {
    width: 100%; padding: 11px 14px; border-radius: 8px;
    background: rgb(var(--overlay-rgb) / 0.05); border: 1px solid rgb(var(--overlay-rgb) / 0.1);
    color: var(--ui-text-header); font-size: 15px; outline: none; box-sizing: border-box;
    transition: border-color 0.15s ease;
}
.force-password-screen-input:focus { border-color: #818cf8; background: rgb(var(--overlay-rgb) / 0.07); }
.force-password-screen-hint { font-size: 11px; color: var(--ui-text-ghost); margin-top: 6px; }
.force-password-screen-error {
    font-size: 12px; color: #ef4444; margin-bottom: 14px; line-height: 1.4;
}
.force-password-screen-error.hidden { display: none; }
.force-password-screen-btn {
    width: 100%; padding: 12px; border-radius: 9px; border: none; cursor: pointer;
    background: #6366f1; color: #fff; font-size: 14px; font-weight: 700;
    transition: background 0.15s ease; letter-spacing: 0.01em; margin-bottom: 14px;
}
.force-password-screen-btn:hover { background: #4f46e5; }
.force-password-screen-btn:disabled { background: var(--ui-btn-disabled); color: #4a5568; cursor: not-allowed; }
.force-password-screen-logout-btn {
    width: 100%; padding: 10px; border-radius: 9px; border: 1px solid rgb(var(--overlay-rgb) / 0.08);
    background: transparent; color: var(--ui-text-dim); font-size: 13px; font-weight: 500;
    cursor: pointer; transition: background 0.15s, color 0.15s; margin-bottom: 14px;
}
.force-password-screen-logout-btn:hover { background: rgb(var(--overlay-rgb) / 0.05); color: var(--ui-text-secondary); }
.force-password-screen-footer {
    font-size: 11px; color: #3a3d44; text-align: center; line-height: 1.5;
}

/* ─── Unread Catch-up Bar ──────────────────────────────────────────────────── */
.channel-unread-catchup {
    position: absolute; left: 12px; right: 12px; top: 10px; z-index: 6;
    padding: 8px 10px 8px 14px;
    border: 1px solid rgba(34,211,238,0.22);
    background: linear-gradient(135deg, rgba(34,211,238,0.10), rgba(139,92,246,0.10)),
                rgb(var(--ui-catchup-rgb) / 0.94);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.30);
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    animation: catchupSlideDown 0.18s ease;
    pointer-events: auto;
}
.channel-unread-catchup.hidden { display: none; }
@keyframes catchupSlideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.catchup-info {
    display: flex; align-items: center; gap: 7px;
    font-size: 13px; color: #9ca3b0;
    flex: 1; min-width: 0; overflow: hidden;
    cursor: pointer;
}
.catchup-icon { flex-shrink: 0; color: var(--tint-cyan, #22d3ee); }
.catchup-count { font-weight: 600; color: var(--tint-neutral, #dde1e8); white-space: nowrap; }
.catchup-sep { color: #454850; flex-shrink: 0; }
.catchup-sep.hidden { display: none; }
.catchup-since { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.catchup-btn {
    flex-shrink: 0; padding: 5px 12px; border-radius: 8px; border: none; cursor: pointer;
    background: rgba(99,102,241,0.20); color: var(--tint-indigo, #a5b4fc);
    font-size: 12px; font-weight: 600; letter-spacing: 0.01em;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}
.catchup-btn:hover { background: rgba(99,102,241,0.35); color: var(--tint-indigo, #c7d2fe); }

/* ── CHAT-CONN-STATUS (Karar #189): bağlantı / mesaj yükleme durumu ─────────
   #messages-container (kaydırma kabı) İÇİNDE sıfır yükseklikli yapışkan çapa:
   kaydırmada üstte kalır, mesaj düzenini kaydırmaz, sohbet ses paneline taşınınca
   birlikte gider. Zemin tema tokenı (--ui-catchup-rgb) + durum tonu (yarı saydam katman). */
.chat-conn-status { position: sticky; top: 0; height: 0; flex: 0 0 auto; z-index: 8; pointer-events: none; }
.chat-conn-status.hidden { display: none; }
.chat-conn-status .ccs-pill {
    position: absolute; top: 10px; left: 50%; translate: -50% 0;
    box-sizing: border-box; width: max-content; max-width: calc(100% - 24px);
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px 8px 12px; border-radius: 12px;
    border: 1px solid rgba(245, 158, 11, 0.38);
    background: linear-gradient(rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.12)), rgb(var(--ui-catchup-rgb) / 0.96);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    color: var(--text-primary);
    pointer-events: auto; user-select: none;
    animation: ccsIn 0.2s ease-out;
}
/* Okunmamış "yeni mesaj" çubuğu açıkken onun altına iner (ikisi üst üste binmez). */
body:has(#channel-unread-catchup-bar:not(.hidden)) .chat-conn-status .ccs-pill { top: 58px; }
.chat-conn-status[data-mode="failed"] .ccs-pill,
.chat-conn-status[data-mode="offline"] .ccs-pill {
    border-color: rgba(239, 68, 68, 0.42);
    background: linear-gradient(rgba(239, 68, 68, 0.16), rgba(239, 68, 68, 0.16)), rgb(var(--ui-catchup-rgb) / 0.96);
}
.chat-conn-status[data-mode="restored"] .ccs-pill {
    border-color: rgba(16, 185, 129, 0.40);
    background: linear-gradient(rgba(16, 185, 129, 0.13), rgba(16, 185, 129, 0.13)), rgb(var(--ui-catchup-rgb) / 0.96);
}
.chat-conn-status .ccs-icon {
    flex: 0 0 auto; width: 18px; height: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--tint-amber, #fbbf24);
}
.chat-conn-status .ccs-icon > * { display: none; }
.chat-conn-status[data-mode="reconnecting"] .ccs-spin { display: block; }
.chat-conn-status .ccs-spin {
    width: 13px; height: 13px; border-radius: 50%;
    border: 2px solid currentColor; border-right-color: transparent;
    animation: ccsSpin 0.8s linear infinite;
}
.chat-conn-status[data-mode="failed"] .ccs-icon,
.chat-conn-status[data-mode="offline"] .ccs-icon { color: var(--danger-text, #fca5a5); }
.chat-conn-status[data-mode="failed"] .ccs-ico-alert,
.chat-conn-status[data-mode="offline"] .ccs-ico-alert { display: block; }
.chat-conn-status[data-mode="restored"] .ccs-icon { color: var(--tint-green, #34d399); }
.chat-conn-status[data-mode="restored"] .ccs-ico-ok { display: block; }
.chat-conn-status .ccs-body { min-width: 0; display: flex; flex-direction: column; }
.chat-conn-status .ccs-title {
    font-size: 13.5px; font-weight: 600; line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-conn-status .ccs-text { font-size: 12px; line-height: 1.35; color: var(--text-secondary); }
.chat-conn-status .ccs-text:empty { display: none; }
/* Yeniden deneme sürerken düğme yerine üç nokta (Discord'daki "•••"). */
.chat-conn-status .ccs-dots { display: none; flex: 0 0 auto; gap: 4px; align-items: center; padding: 0 4px; color: var(--danger-text, #fca5a5); }
.chat-conn-status.is-busy .ccs-dots { display: inline-flex; }
.chat-conn-status .ccs-dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.35; animation: ccsDot 1s ease-in-out infinite; }
.chat-conn-status .ccs-dots i:nth-child(2) { animation-delay: 0.15s; }
.chat-conn-status .ccs-dots i:nth-child(3) { animation-delay: 0.3s; }
.chat-conn-status .ccs-retry {
    display: none; flex: 0 0 auto;
    padding: 5px 12px; border-radius: 8px; cursor: pointer;
    font: inherit; font-size: 12px; font-weight: 600; white-space: nowrap;
    border: 1px solid rgba(239, 68, 68, 0.38);
    background: rgba(239, 68, 68, 0.16);
    color: var(--danger-text, #fecaca);
    transition: background 0.15s ease;
}
.chat-conn-status .ccs-retry:hover { background: rgba(239, 68, 68, 0.26); }
.chat-conn-status .ccs-retry:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.chat-conn-status[data-mode="failed"] .ccs-retry,
.chat-conn-status[data-mode="offline"] .ccs-retry { display: inline-flex; }
.chat-conn-status.is-busy .ccs-retry { display: none; }
/* Mesaj iskeleti: önbelleksiz açılışta önceki sohbetin içeriği yerine. Hızlı yüklemede
   görünmez (0,3 sn gecikmeyle belirir); hata durumunda sabit ve sönük kalır. */
.ccs-skeleton {
    display: flex; flex-direction: column; gap: 22px;
    padding: 12px 16px 6px;
    animation: ccsSkIn 0.25s ease-out 0.3s both;
}
.ccs-sk-row { display: flex; gap: 14px; align-items: flex-start; }
.ccs-sk-av { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; background: rgb(var(--overlay-rgb) / 0.07); }
.ccs-sk-lines { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 9px; padding-top: 3px; }
.ccs-sk-line { display: block; height: 11px; border-radius: 6px; background: rgb(var(--overlay-rgb) / 0.07); }
.ccs-sk-av, .ccs-sk-line { animation: ccsPulse 1.4s ease-in-out infinite; }
.ccs-sk-line.ccs-sk-name { height: 12px; width: 18%; background: rgb(var(--overlay-rgb) / 0.10); }
.ccs-sk-row:nth-child(2) .ccs-sk-name { width: 24%; }
.ccs-sk-row:nth-child(3) .ccs-sk-name { width: 15%; }
.ccs-sk-row:nth-child(4) .ccs-sk-name { width: 27%; }
.ccs-sk-row:nth-child(5) .ccs-sk-name { width: 20%; }
.ccs-sk-row .ccs-sk-line:nth-child(2) { width: 62%; }
.ccs-sk-row .ccs-sk-line:nth-child(3) { width: 38%; }
.ccs-sk-row:nth-child(2) .ccs-sk-line:nth-child(2) { width: 48%; }
.ccs-sk-row:nth-child(3) .ccs-sk-line:nth-child(2) { width: 71%; }
.ccs-sk-row:nth-child(4) .ccs-sk-line:nth-child(2) { width: 40%; }
.ccs-sk-row:nth-child(5) .ccs-sk-line:nth-child(2) { width: 66%; }
.ccs-skeleton.is-failed .ccs-sk-av,
.ccs-skeleton.is-failed .ccs-sk-line { animation: none; opacity: 0.6; }
@keyframes ccsIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes ccsSpin { to { transform: rotate(360deg); } }
@keyframes ccsDot { 0%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
@keyframes ccsSkIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ccsPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) {
    .chat-conn-status .ccs-pill { animation: none; }
    .chat-conn-status .ccs-spin { animation-duration: 2.4s; }
    .chat-conn-status .ccs-dots i, .ccs-sk-av, .ccs-sk-line { animation: none; }
    .ccs-skeleton { animation-duration: 0.01s; }
}

/* ── Unread divider ("YENİ") ─────────────────────────────────────────────── */
.unread-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 18px 8px;
    pointer-events: none;
    user-select: none;
    color: rgba(251, 113, 133, 0.9);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.unread-divider::before {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg,
        rgba(251, 113, 133, 0),
        rgba(251, 113, 133, 0.55),
        rgba(251, 113, 133, 0.18));
}
.unread-divider-pill {
    flex-shrink: 0;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(251, 113, 133, 0.08);
    border: 1px solid rgba(251, 113, 133, 0.22);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.22);
    line-height: 1.6;
}

/* ─── Denetim Kaydı (A7 — Karar #44) ─────────────────────────────────────── */
.al-filters {
    display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px;
}
.al-filter { display: flex; flex-direction: column; gap: 6px; min-width: 190px; flex: 1 1 190px; }
.al-filter label {
    font-size: 11px; font-weight: 700; letter-spacing: .4px;
    text-transform: uppercase; color: var(--text-secondary);
}
.al-list { display: flex; flex-direction: column; gap: 8px; }
/* Kart: koyu yuzey + yumusak kose; hover'da hafif yukselti (Discord hissi,
   birebir kopya degil). Veri yapisi/expand davranisi DEGISMEDI. */
.al-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: background var(--transition), border-color var(--transition);
}
.al-item:hover { border-color: rgba(148, 163, 184, .22); }
.al-head {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
}
.al-item[role], .al-head[role="button"] { cursor: pointer; }
.al-head[role="button"]:hover { background: rgba(148, 163, 184, .05); }
.al-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* Sol ikon alani: 8px nokta yerine grup renkli KUCUK ROZET (glif + tonlu zemin). */
.al-icon {
    width: 30px; height: 30px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 9px;
    background: rgba(148, 163, 184, .12);
    border: 1px solid rgba(148, 163, 184, .16);
    color: var(--text-secondary);
}
.al-icon svg { width: 16px; height: 16px; display: block; }
.al-icon-sunucu   { background: rgba(6, 182, 212, .13);  border-color: rgba(6, 182, 212, .22);  color: var(--tint-cyan, #67e8f9); }
.al-icon-kanallar { background: rgba(56, 189, 248, .13); border-color: rgba(56, 189, 248, .22); color: var(--tint-cyan, #7dd3fc); }
.al-icon-roller   { background: rgba(139, 92, 246, .14); border-color: rgba(139, 92, 246, .24); color: var(--tint-violet, #c4b5fd); }
.al-icon-uyeler   { background: rgba(239, 68, 68, .12);  border-color: rgba(239, 68, 68, .22);  color: var(--danger-text, #fca5a5); }
.al-icon-ses      { background: rgba(16, 185, 129, .13); border-color: rgba(16, 185, 129, .22); color: var(--tint-green, #6ee7b7); }
.al-icon-davetler { background: rgba(245, 158, 11, .13); border-color: rgba(245, 158, 11, .24); color: var(--tint-amber, #fcd34d); }
.al-icon-izinler  { background: rgba(167, 139, 250, .13); border-color: rgba(167, 139, 250, .22); color: var(--tint-violet, #ddd6fe); }
.al-icon-mesajlar { background: rgba(244, 114, 182, .13); border-color: rgba(244, 114, 182, .22); color: var(--tint-pink, #f9a8d4); }
.al-icon-diger    { background: rgba(148, 163, 184, .12); border-color: rgba(148, 163, 184, .22); color: var(--text-secondary); }
.al-avatar {
    width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 11px; font-weight: 600; overflow: hidden;
}
.al-avatar img { width: 100%; height: 100%; object-fit: cover; }
.al-body { flex: 1; min-width: 0; }
.al-line { font-size: 14px; font-weight: 500; color: var(--text-primary); line-height: 1.4; word-break: break-word; }
.al-meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; word-break: break-word; }
/* Ac/kapat oku: sabit 24px kutu -> her satirda AYNI konumda durur. */
.al-chevron {
    width: 24px; height: 24px; flex-shrink: 0; margin-left: 2px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    transition: transform var(--transition), color var(--transition);
}
.al-chevron svg { width: 16px; height: 16px; display: block; }
.al-head[role="button"]:hover .al-chevron { color: var(--text-secondary); }
.al-item.al-open .al-chevron { transform: rotate(180deg); }
.al-changes {
    display: none; padding: 8px 16px 12px 58px;
    border-top: 1px solid var(--border);
    background: rgb(0 0 0 / calc(0.12 * var(--shade-k)));
}
.al-item.al-open .al-changes { display: block; }
/* Detay satiri: sira no + alan adi + eski -> yeni; hizali ve okunakli. */
.al-change {
    display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px;
    font-size: 13px; line-height: 1.45; padding: 4px 0;
}
.al-change-idx {
    flex: 0 0 20px;
    font-size: 11px; font-weight: 700; letter-spacing: .02em;
    color: var(--text-muted); font-variant-numeric: tabular-nums;
}
.al-change-key { flex: 0 0 auto; min-width: 150px; color: var(--text-secondary); }
.al-change-old { color: var(--text-muted); text-decoration: line-through; word-break: break-word; }
.al-change-arrow { color: var(--text-muted); opacity: .8; }
.al-change-new { color: var(--text-primary); font-weight: 500; word-break: break-word; }
.al-more-wrap { display: flex; justify-content: center; margin-top: 14px; }
.al-more-wrap.hidden { display: none; }
.al-retry-btn { margin-top: 10px; }

/* P6-C2-C-b3: yaş sınırlı kanal — yönetim stub'ı (içerik kilitli) */
.channel-item.channel-locked,
.voice-channel-item.channel-locked .voice-channel-header { opacity: .6; cursor: pointer; }
.channel-item.channel-locked .channel-lock-icon,
.voice-channel-item.channel-locked .channel-lock-icon { margin-left: auto; flex-shrink: 0; opacity: .9; }
.chs-toggle-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
/* Alan ipucu — `.chs-help` app.js'te 6 yerde uretiliyordu ama HICBIR kurali
   YOKTU: ipuclari 14px/birincil renkte, normal metin gibi ciziliyordu.
   5100'un `.chs-field-hint` govdesi birebir uygulanir (TEK ipucu sinifi). */
.chs-help {
    margin-top: 9px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-muted);
}
/* Kanal glifi + kilit rozeti — ad oneki, kenar cubugu etiketi ve silme onayi
   AYNI kutuyu kullanir. Kutu `position: relative` OLMALIDIR: `.chs-input-prefix`
   input yuksekligine stretch oldugundan rozet ona gore konumlanirsa ikonun
   ALTINDA kalir. Rozet cizimi ortak `.ch-lock-badge`tir (Karar #127). */
.chs-prefix-glyph {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.chs-input-prefix svg,
.chs-icon svg,
.chs-prefix-glyph svg { display: block; }
.chs-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.chs-icon .ch-lock-badge,
.chs-prefix-glyph .ch-lock-badge {
    right: -4px; bottom: -4px;
    width: 11px; height: 11px;
    border-radius: 4px;
    background: var(--bg-tertiary);
}
.chs-icon .ch-lock-badge svg,
.chs-prefix-glyph .ch-lock-badge svg { width: 8px; height: 8px; }
/* Silme onayindaki glif, kirmizi baslik metniyle ayni satirda durur. */
.leave-server-desc .chs-prefix-glyph { margin-right: 2px; vertical-align: -2px; }
/* Kanal silme önizlemesi: mesaj önizlemesiyle AYNI inset kutu; tek fark satır
   düzeni (önek ikonu + kanal adı). Kural KAPSAMLIDIR (`.dch-preview`) — önceki
   sürüm `.delete-preview`i GLOBAL ezip mesaj silme önizlemesini de etkiliyordu. */
.delete-preview.dch-preview {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 14px; max-height: none; overflow: visible;
}
.dch-preview .dch-glyph {
    position: relative;                 /* kilit rozeti bu kutuya konumlanır */
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; flex-shrink: 0;
    color: var(--text-muted, #949ba4);
    font-size: 19px; font-weight: 500; line-height: 1;
}
.dch-preview .dch-glyph > svg { width: 16px; height: 16px; display: block; }
/* Kilit rozeti: `.chs-prefix-glyph` ile AYNI ölçüler; arka plan önizleme
   kutusunun zeminidir (rozet ikonun üstünde "oyuk" gibi durur). */
.dch-preview .dch-glyph .ch-lock-badge {
    right: -4px; bottom: -4px; width: 11px; height: 11px; border-radius: 4px;
    background: var(--bg-input);
}
.dch-preview .dch-glyph .ch-lock-badge svg { width: 8px; height: 8px; }
.dch-preview .dch-name {
    color: var(--text-primary); font-size: 15px; font-weight: 600;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Yas Sinirli kanal onay kutusu — projenin MEVCUT ozel kutu dilini kullanir
   (`.ctx-role-checkbox`, Karar #112): 20px kutu, 1px kenarlik, 4px kose,
   isaretliyken accent dolgu + BEYAZ tik. Native kutu `appearance:none` ile
   degistirilir; ELEMAN ve tum okuma/kaydetme mantigi AYNI kalir. */
.chs-toggle-row input[type="checkbox"] {
    appearance: none; -webkit-appearance: none;
    width: 20px; height: 20px; flex-shrink: 0; box-sizing: border-box;
    margin: 0; cursor: pointer; position: relative;
    border: 1px solid var(--text-muted);
    border-radius: 4px;
    background: transparent;
    transition: background var(--transition), border-color var(--transition);
}
.chs-toggle-row:hover input[type="checkbox"]:not(:disabled) { border-color: rgb(var(--overlay-rgb) / 0.85); }
.chs-toggle-row input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 2px;
}
.chs-toggle-row input[type="checkbox"]:checked {
    background: var(--brand); border-color: var(--brand);
}
/* Tik: CSS ile cizilir (ek SVG/ikon sistemi YOK). */
.chs-toggle-row input[type="checkbox"]::after {
    content: ''; position: absolute;
    left: 6px; top: 2px; width: 5px; height: 10px;
    border: solid #fff; border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform var(--transition);
}
.chs-toggle-row input[type="checkbox"]:checked::after { transform: rotate(45deg) scale(1); }
.chs-toggle-row input[type="checkbox"]:disabled { opacity: .45; cursor: not-allowed; }
.chs-locked-note { color: var(--idle); margin-top: 6px; }

/* ── Uye zaman asimi (Karar #56) ─────────────────────────────────────────── */
/* Uye listesi + mesaj yazari isaretleri — mevcut .member-owner-crown deseni. */
.member-timeout-mark { display: inline-flex; flex-shrink: 0; color: var(--text-secondary); opacity: .85; margin-left: 2px; }
.member-timeout-mark svg { display: block; }
.msg-timeout-mark {
    display: inline-flex; align-items: center; flex-shrink: 0;
    color: var(--text-secondary); opacity: .8; margin-left: 4px; vertical-align: middle;
}
.msg-timeout-mark svg { display: block; }

/* Ses kanali kilidi — YALNIZ kendi zaman asimimda gorunur (salt gosterim). */
.voice-channel-item.voice-channel-timed-out .voice-channel-name { opacity: .55; }
.voice-timeout-lock { display: inline-flex; align-items: center; margin-left: auto; padding-left: 6px; color: var(--text-secondary); opacity: .8; }
.voice-timeout-lock svg { display: block; }

/* Composer yerine gecen kalici bant + canli geri sayim. */
.server-timeout-panel {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 14px; margin: 0 0 4px;
    background: var(--bg-secondary); border: 1px solid var(--dnd);
    border-radius: 8px; color: var(--text-secondary);
}
.server-timeout-panel.hidden { display: none; }
.server-timeout-panel .stb-icon { display: flex; flex-shrink: 0; color: var(--dnd); padding-top: 1px; }
.server-timeout-panel .stb-icon svg { display: block; }
.server-timeout-panel .stb-body { flex: 1; min-width: 0; }
.server-timeout-panel .stb-title { font-size: 14px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.server-timeout-panel .stb-text { font-size: 13px; line-height: 1.4; margin-top: 2px; }
.server-timeout-panel .stb-countdown {
    flex-shrink: 0; align-self: center; font-variant-numeric: tabular-nums;
    font-size: 13px; font-weight: 700; color: var(--dnd); white-space: nowrap;
}
/* Panel composer'in YERINI alir: bant disindaki her sey gizlenir. */
body.server-timed-out #message-input-area > :not(#server-timeout-bar) { display: none !important; }

/* Zaman asimi modali — mevcut modal altyapisi uzerine. */
.mt-modal .mt-desc { font-size: 14px; line-height: 1.5; color: var(--text-secondary); margin: 8px 0 16px; }
.mt-modal .mt-target { color: var(--text-primary); font-weight: 600; }
.mt-modal .mt-section-label { font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 8px; }
.mt-modal .mt-optional { text-transform: none; font-weight: 400; opacity: .8; }
.mt-durations { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.mt-duration {
    padding: 9px 6px; font-size: 13px; font-weight: 600; cursor: pointer;
    background: var(--bg-primary); color: var(--text-secondary);
    border: 1px solid var(--bg-primary); border-radius: 6px;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.mt-duration:hover { color: var(--text-primary); }
.mt-duration.selected { background: var(--accent); border-color: var(--accent); color: #fff; }
.mt-reason {
    width: 100%; box-sizing: border-box; resize: vertical; font: inherit; font-size: 13px;
    padding: 9px 10px; border-radius: 6px; color: var(--text-primary);
    background: var(--bg-primary); border: 1px solid var(--bg-primary);
}
.mt-reason:focus { outline: none; border-color: var(--accent); }
.mt-counter { text-align: right; font-size: 11px; color: var(--text-secondary); margin-top: 4px; }
.mt-error { min-height: 16px; font-size: 12px; color: var(--dnd); margin: 6px 0 2px; }
@media (max-width: 480px) { .mt-durations { grid-template-columns: repeat(2, 1fr); } }

/* ── Bildirim ayarlari (Karar #57) ───────────────────────────────── */
/* Sunucu bildirim modali — 5100 gorsel/UX paritesi (Karar #125).
   Kabuk MEVCUT modal dilini paylasir; burada yalniz satir/bolum yerlesimi
   tanimlanir. Anahtar `.toggle-switch`, radyo `.channel-type-option` +
   `.vc-radio-dot`, secici `createCustomSelect` — hepsi MEVCUT bilesenler.
   Bespoke `.snm-radio` bileseni KALDIRILDI (5100 onu silmisti). */
/* BUG-1: govde artik SABIT bir piksel kapagiyla sinirlanmaz.
   5100'den portlanan `min(60vh, 520px)` kapagi 5100'un ICERIGINE gore ayarliydi
   (orada 3 mod + 5 sure var); main 4 modu ve 6 sureyi KORUDUGU icin acik
   icerik 533px tutuyor ve kapak her masaustu boyutunda 13px yetersiz kalarak
   GEREKSIZ kaydirma cubugu uretiyordu (olculdu). Artik yukseklik VIEWPORT
   surucudur: modal ekrana sigdigi surece govde tam boy acilir ve cubuk CIKMAZ;
   yalnizca modal gercekten sigmadiginda (kucuk viewport / acilan dropdown)
   kaydirilir. Icerik KIRPILMAZ, "Bitti" `.modal-actions` govdenin DISINDA
   oldugu icin her zaman erisilebilir kalir. */
.snm-body {
    flex: 1 1 auto; min-height: 0;
    overflow-y: auto; margin: 0 -4px; padding: 0 4px;
    /* Kenara gelince kaydirma zinciri arkadaki uygulamaya tasmasin. */
    overscroll-behavior: contain;
}
/* Kapak MODAL kabugundadir (yalniz bu modala kapsanir; paylasilan
   `.modal-content` DEGISMEZ): ustte/altta 32px pay birakir, govde kalan alani
   flex ile alir. */
#server-notif-modal .modal-content {
    display: flex; flex-direction: column;
    max-height: calc(100vh - 64px);
}
/* Satirin TAMAMI tiklanabilir (baslik/aciklama/bos hiza) → imlec bunu gosterir.
   Baska gorsel degisiklik YOK (hover/arkaplan/kenarlik eklenmez). */
.snm-row { display: flex; align-items: flex-start; gap: 16px; padding: 4px 0 14px; cursor: pointer; }
.snm-row-text { flex: 1; min-width: 0; }
.snm-row-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.snm-row-desc { margin-top: 4px; font-size: 12.5px; line-height: 1.5; color: var(--text-muted); }
.snm-switch { flex-shrink: 0; margin-top: 2px; }
.snm-sep { height: 1px; background: var(--border); margin: 6px 0 16px; }
.snm-section-title {
    font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
    text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px;
}
.snm-sub-label { font-size: 12.5px; color: var(--text-muted); margin-bottom: 6px; }
.snm-duration { margin: 0 0 16px; }
.snm-duration.hidden { display: none; }
.snm-radio-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
#server-notif-modal .modal-actions { margin-top: 4px; }
#server-notif-modal .btn-primary { width: 100%; }
/* Sag ust X — 5100 ile ayni olcu/ikon/hover. Main'de `.cd-close` YALNIZ bu
   modalda kullanilir; olu secici uretmemek icin kural buraya kapsanir. */
#delete-channel-modal .modal-content .cd-close,
#server-notif-modal .modal-content .cd-close {
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: 14px; right: 14px;
    width: 28px; height: 28px; border-radius: 6px;
    background: transparent; border: none; cursor: pointer;
    color: var(--text-muted);
    transition: background var(--transition), color var(--transition);
}
#delete-channel-modal .modal-content .cd-close:hover,
#server-notif-modal .modal-content .cd-close:hover {
    background: var(--bg-hover); color: var(--text-primary);
}
/* Baslik X'in altina girmesin */
#delete-channel-modal .modal-content h2,
#server-notif-modal .modal-content h2 { padding-right: 34px; }

/* Kategori bildirim baglam menusu — mevcut .context-menu altyapisini kullanir. */
#category-notif-menu { width: 268px; }
#category-notif-menu .ctx-item.ctx-active { color: var(--accent); }
/* ── 5100 olcu sistemi (kanal + kategori menusu) ─────────────────────────────
   Ikon hizasi: her satirda 16px SABIT slot -> metinler tek dikey cizgide
   baslar; cizgi kalinligi/uc yuvarlamasi tek yerde. Ok ikonu ince ve sonuk.
   Etiket kalan alani alir -> oklar/kutular sag kenarda hizali. TEK olcu
   sozlesmesi: kanal menusu icerikle degil SABIT 268px; satir 7px/10px +
   line-height 16px (metin ve ses kanali ayni menu elemanidir). */
#category-notif-menu .ctx-item > svg:first-child,
#category-notif-menu .ctx-submenu-trigger > svg:first-child,
#channel-ctx-menu .ctx-item > svg:first-child,
#channel-ctx-menu .ctx-submenu-trigger > svg:first-child {
    flex: 0 0 16px; width: 16px; height: 16px;
    stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
    opacity: .9;
}
#category-notif-menu .ctx-item:hover > svg:first-child,
#category-notif-menu .ctx-submenu-trigger:hover > svg:first-child,
#channel-ctx-menu .ctx-item:hover > svg:first-child,
#channel-ctx-menu .ctx-submenu-trigger:hover > svg:first-child { opacity: 1; }
#category-notif-menu .ctx-submenu-arrow,
#channel-ctx-menu .ctx-submenu-arrow {
    flex: 0 0 12px; width: 12px; height: 12px;
    stroke-width: 2; opacity: .55;
}
#category-notif-menu .ctx-submenu-trigger:hover .ctx-submenu-arrow,
#channel-ctx-menu .ctx-submenu-trigger:hover .ctx-submenu-arrow { opacity: .9; }
#category-notif-menu .ctx-item > span:not(.ctx-check-box):not(.ctx-submenu-value),
#category-notif-menu .ctx-submenu-trigger > span:not(.ctx-submenu-value),
#channel-ctx-menu .ctx-item > span:not(.ctx-check-box):not(.ctx-submenu-value),
#channel-ctx-menu .ctx-submenu-trigger > span:not(.ctx-submenu-value) { flex: 1; text-align: left; }
#category-notif-menu .ctx-item,
#category-notif-menu .ctx-submenu-trigger,
#channel-ctx-menu .ctx-item,
#channel-ctx-menu .ctx-submenu-trigger { gap: 10px; padding: 7px 10px; line-height: 16px; }
#channel-ctx-menu { width: 268px; }

/* ── Ses kanali ayarlari (bit hizi / kullanici limiti) ────────────────────── */
.vc-range-head {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline;
    margin-bottom: 10px; font-size: 12px; color: var(--text-muted);
}
.vc-range-head > :last-child { text-align: right; }
.vc-range-head .vc-range-value {
    font-size: 13.5px; font-weight: 700; color: var(--text-primary);
    letter-spacing: 0.01em;
}
/* 5100 sunumu: duz temiz track — dolu kisim accent, kalani notr; kenarlik
   halkasi YOK. Dolgu yuzdesi `--vc-fill` degiskeninden gelir (JS `_vcSyncSliderFill`
   yazar; mantik DEGISMEDI). Tick'lerin USTUNDE kalir. */
.vc-slider {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 6px; border-radius: 999px;
    background:
        linear-gradient(to right, var(--accent) 0%, var(--accent) var(--vc-fill, 0%),
                        var(--bg-active) var(--vc-fill, 0%), var(--bg-active) 100%);
    outline: none; cursor: pointer;
    position: relative; z-index: 1;
}
.vc-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 16px; height: 16px; border-radius: 50%;
    /* 6px track kutusunda thumb ustten hizalanir -> (6-16)/2 = -5px marj
       thumb merkezini track merkezine oturtur. */
    margin-top: -5px;
    background: #fff; border: none; cursor: grab;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .5);
    transition: transform var(--transition), box-shadow var(--transition);
}
.vc-slider:hover::-webkit-slider-thumb { transform: scale(1.08); }
.vc-slider:active::-webkit-slider-thumb {
    transform: scale(1.12); cursor: grabbing;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .55), 0 0 0 5px var(--accent-soft);
}
.vc-slider:focus-visible { outline: none; }
.vc-slider:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 2px 6px rgba(0, 0, 0, .55), 0 0 0 4px var(--accent-soft);
}
.vc-slider::-moz-range-thumb {
    width: 16px; height: 16px; border: none; border-radius: 50%;
    background: #fff; cursor: grab;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .5);
}

/* Kanal listesi: NN/LL katilimci sayaci (yalniz user_limit > 0 iken) */
.voice-channel-count {
    margin-left: auto;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 16px;
    border-radius: 8px;
    color: var(--text-secondary);
    background: var(--bg-active);
    flex-shrink: 0;
}
.voice-channel-count.full { color: #fff; background: var(--dnd); }

/* ── Ozel kanal: kilit rozeti + erisim listesi ────────────────────────────── */
/* 5100 paritesi: kilit, adin YANINDA duran serbest bir ikon DEGIL — kanal
   IKONUNUN kosesine oturan kucuk bir ROZETTIR. Ayni cizim uc yerde kullanilir:
   kanal listesi (metin + ses) ve Kanal Olustur onizlemesi. Rozet satirin
   durum rengini izler; zemini satir zeminiyle uyumlanir. */
.channel-item .channel-icon,
.voice-channel-header .voice-channel-icon { position: relative; }
.ch-lock-badge {
    position: absolute; right: -3px; bottom: -3px;
    width: 10px; height: 10px; display: inline-flex;
    align-items: center; justify-content: center;
    border-radius: 3px; background: var(--bg-secondary);
    color: currentColor; pointer-events: none;
}
.ch-lock-badge svg { width: 8px; height: 8px; display: block; }
.channel-item:hover .ch-lock-badge,
.channel-item.active .ch-lock-badge,
.voice-channel-item:hover .ch-lock-badge,
.voice-channel-item.active .ch-lock-badge { background: var(--bg-hover); }
.chs-access-lead { margin: -6px 0 18px; font-size: 13px; color: var(--text-muted); line-height: 1.5; }
/* ── "Kimler erisebilir?" (kanal + kategori ayarlari) — 5100 duzeni ───────
   TASLAK modeli: secim seciciden yapilir, "ERISIMI OLANLAR" listesi TASLAGI
   yansitir; kalici yazma yalniz "Degisiklikleri Kaydet" ile olur. Eski rozet /
   "Rol veya uye ekle" menusu duzeni KALDIRILDI. */
.chs-access-private { margin-bottom: 14px; }
.chs-access-current {
    margin: 0 0 14px; border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--bg-input); overflow: hidden;
}
.chs-access-current-head {
    padding: 10px 12px 8px; font-size: 10px; font-weight: 700;
    letter-spacing: .6px; color: var(--text-muted); border-bottom: 1px solid var(--border);
}
/* "Erisimi Olanlar" listesi SABIT yukseklik tasir: secim eklenip cikarildikca
   ALTINDAKI "ROL VE UYELER" kutusu OYNAMASIN (kutu akista picker'in USTUNDE
   durdugu icin her yukseklik degisimi tum sayfayi reflow ediyordu).
   132px GERCEK TARAYICI OLCUMUYLE secildi: dogal yukseklikler 0 secim 43px,
   1 rol 62px, "1 rol + 1 uye" 126px -> 132px yaygin durumlari kaydirmadan
   gosterir, fazlasi ICERIDE kaydirilir (dis sayfa uzamaz).
   Kisa viewport'ta oransal kuculur; kaydirma arka plana tasmaz. */
#chs-access-current-list {
    height: min(132px, 26vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--border-hover) transparent;
}

.chs-access-group {
    padding: 9px 12px 4px; font-size: 10px; font-weight: 700;
    letter-spacing: .6px; color: var(--text-muted);
}
.chs-access-row {
    display: flex; align-items: center; gap: 10px; padding: 7px 12px;
    font-size: 13px; color: var(--text-secondary); cursor: default; outline: none;
    transition: background var(--transition);
}
.chs-access-row:hover,
.chs-access-row:focus-visible { background: var(--bg-hover); color: var(--text-primary); }
.chs-access-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chs-access-kind { flex-shrink: 0; font-size: 11px; color: var(--text-muted); }
.chs-access-empty { padding: 12px; font-size: 12.5px; color: var(--text-muted); }
/* Iki sinif: paylasilan `.ccm-private-picker` varsayilan ust boslugunu ezer. */
.ccm-private-picker.chs-access-picker { margin-top: 0; }
/* Yardim metni YALNIZ bu sekmede 5100 olcusunde — create modalinin
   `.ccm-private-help` sunumu (Karar #128 sapmasi) DEGISMEZ. */
.chs-access-private .ccm-private-help {
    margin-top: 5px; font-size: 11.5px; color: var(--text-muted); line-height: 1.45;
}
.chs-access-picker .ccm-picker-list { max-height: 320px; }

/* Erisim listesi: ekleme butonu + menu (Izinler sekmesi menusuyle ayni gorunum) */

/* ═══ 5100 paritesi: OZEL KANAL / KATEGORI olusturma sihirbazi ═══════════════
   Yalniz sunum. Gizlilik kararinin KENDISI backend'dedir (create_channel /
   create_category, override tablosu, ayni transaction). */
.ccm-private-group { margin-top: 4px; }
/* BUG4: satirin TAMAMI anahtari cevirir -> imlec bunu gosterir ve metin
   secilmez. 5100'un hover/arka plan GORSELI BILINCLI olarak PORTLANMADI. */
.ccm-private-row {
    display: flex; align-items: center; gap: 8px;
    cursor: pointer; user-select: none;
}
.ccm-private-icon {
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--text-secondary); flex: 0 0 auto;
}
.ccm-private-label {
    font-size: 14px; font-weight: 600; color: var(--text-primary);
    flex: 1 1 auto;
}
.ccm-private-help {
    margin-top: 4px; font-size: 12px; color: var(--text-secondary); line-height: 1.4;
}
/* Anahtar — mevcut toggle dilinden turer, yeni bir bilesen sistemi YOK. */
.ccm-switch {
    position: relative; flex: 0 0 auto;
    width: 38px; height: 22px; padding: 0; border: none; cursor: pointer;
    border-radius: 11px; background: var(--bg-active);
    transition: background var(--transition);
}
.ccm-switch.on { background: var(--accent); }
.ccm-switch-knob {
    position: absolute; top: 3px; left: 3px;
    width: 16px; height: 16px; border-radius: 50%;
    background: #fff; transition: transform var(--transition);
}
.ccm-switch.on .ccm-switch-knob { transform: translateX(16px); }

/* 2. adim basligi */
.ccm-step2-head {
    display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px;
}
.ccm-step2-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.ccm-step2-desc { margin-top: 2px; font-size: 12px; color: var(--text-secondary); }

/* Erisim secici */
/* 5100 paritesi: secici kutusu (create adim-2 + Kimler erisebilir? sekmesi). Ust bosluk VARSAYILANDIR; create modallarinda adim govdesi zaten bosluk
   verdigi icin orada sifirlanir. */
.ccm-private-picker {
    margin-top: 10px; border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--bg-input); overflow: hidden;
}
#ccm-step-2 .ccm-private-picker,
#ccat-step-2 .ccm-private-picker { margin-top: 0; margin-bottom: 4px; }
/* Liste yuksekligi YALNIZ create adim-2 kapsaminda buyutulur — paylasilan `.ccm-picker-list` tabani (168px) DEGISMEZ. */
#ccm-step-2 .ccm-picker-list,
#ccat-step-2 .ccm-picker-list { max-height: 244px; }
/* BUG2: alt butonlar 5100 ile AYNI olcu/dikey hiza — min-height 40, yatay
   padding 22, agirlik 600. Paylasilan `.btn-primary/.btn-secondary` kurallari
   DEGISMEZ; kapsam yalniz bu modaldir. */
.ccm-modal .modal-actions { align-items: center; }
.ccm-modal .modal-actions .btn-primary,
.ccm-modal .modal-actions .btn-secondary {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 40px; padding: 0 22px; margin-top: 0;
    font-size: 14px; font-weight: 600; line-height: 1;
}
.ccm-picker-head {
    display: flex; flex-direction: column; align-items: stretch; gap: 7px;
    padding: 10px 10px 9px; border-bottom: 1px solid var(--border);
}
.ccm-picker-head > span {
    font-size: 10px; font-weight: 700; letter-spacing: .6px; color: var(--text-muted);
}
.ccm-picker-search {
    width: 100%; min-width: 0; padding: 7px 10px; font-size: 12.5px;
    background: var(--bg-tertiary); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-primary); outline: none;
    transition: border-color var(--transition), background var(--transition);
}
.ccm-picker-search::placeholder { color: var(--text-muted); }
.ccm-picker-search:focus { border-color: var(--accent); background: var(--bg-input); }
.ccm-picker-list {
    max-height: 168px; overflow-y: auto; padding: 6px;
    overscroll-behavior: contain;                 /* kaydirma arka plana tasmaz */
    scrollbar-width: thin; scrollbar-color: var(--border-hover) transparent;
}
.ccm-picker-list::-webkit-scrollbar,
#chs-access-current-list::-webkit-scrollbar { width: 10px; }
.ccm-picker-list::-webkit-scrollbar-track,
#chs-access-current-list::-webkit-scrollbar-track { background: transparent; }
.ccm-picker-list::-webkit-scrollbar-thumb,
#chs-access-current-list::-webkit-scrollbar-thumb {
    background-color: var(--border-hover); border-radius: 6px;
    border: 3px solid transparent; background-clip: content-box;
}
.ccm-picker-sec {
    position: sticky; top: -6px; z-index: 1;
    margin: 2px -6px; padding: 7px 14px 5px;
    background: var(--bg-input);
    font-size: 10px; font-weight: 700; letter-spacing: .6px; color: var(--text-muted);
}
.ccm-picker-item {
    display: flex; align-items: center; gap: 10px; width: 100%;
    min-height: 34px; padding: 6px 8px; border: none; background: none; cursor: pointer;
    border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 13px;
    text-align: left;
    transition: background var(--transition), color var(--transition);
}
.ccm-picker-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.ccm-picker-item.on { color: var(--text-primary); background: var(--accent-tint); }
.ccm-picker-item.on:hover { background: var(--accent-tint-hover); }
.ccm-pick-dot {
    width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto;
    background: var(--text-muted);
}
/* Uye avatari: merkezi `avatarHTML` ciktisi (foto varsa <img>, yoksa renk +
   bas harf). Harf fallback'i ortalanir ve foto daireye kirpilir. */
.ccm-pick-avatar {
    flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: #fff; text-transform: uppercase;
    line-height: 1; user-select: none;
}
.ccm-pick-avatar .avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Izinler hedef listesi daha YOGUN: yalniz OLCU kucultulur — ikinci bir
   nokta/avatar bileseni tanimlanmaz. */
.ccm-pick-dot.cp-pick-sm { flex: 0 0 10px; width: 10px; height: 10px; }
.ccm-pick-avatar.cp-pick-sm { flex: 0 0 22px; width: 22px; height: 22px; font-size: 10px; }
.ccm-pick-text {
    flex: 1 1 auto; min-width: 0; overflow: hidden;
    display: flex; align-items: baseline; gap: 6px;
}
.ccm-pick-name {
    font-size: 13px; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ccm-pick-sub {
    flex: 0 1 auto; min-width: 0; font-size: 11px; color: var(--text-muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Secim isareti — yalniz secilide gorunur (renkten BAGIMSIZ ikincil sinyal). */
.ccm-pick-check {
    flex: 0 0 17px; width: 17px; height: 17px; border-radius: 5px;
    border: 1.5px solid var(--text-muted); box-sizing: border-box; position: relative;
    transition: background var(--transition), border-color var(--transition);
}
.ccm-picker-item:hover .ccm-pick-check { border-color: var(--text-secondary); }
.ccm-picker-item.on .ccm-pick-check {
    background: var(--accent); border-color: var(--accent);
}
/* Tik: 5100 ile AYNI glif (`--cctx-check`), kutuya ortalanmis 11px maske.
   Beyaz dolgu maskeden gecer; durum yine `.on` sinifindan gelir. */
.ccm-picker-item.on .ccm-pick-check::after {
    content: ''; position: absolute; inset: 0; background: #fff;
    -webkit-mask: var(--cctx-check) center / 11px 11px no-repeat;
    mask: var(--cctx-check) center / 11px 11px no-repeat;
}
.ccm-picker-empty {
    padding: 18px 10px; font-size: 12px; color: var(--text-muted);
    line-height: 1.45; text-align: center;
}
.ccm-picker-note {
    padding: 9px 12px; font-size: 11.5px; color: var(--text-muted); line-height: 1.45;
    border-top: 1px solid var(--border); background: var(--bg-surface);
}

/* ═══ 5100 paritesi: sunucu zaman asimi bildirimi ═══════════════════════════ */
.server-timeout-notice {
    display: flex; gap: 12px; align-items: flex-start;
    margin: 12px 16px; padding: 12px 14px;
    background: rgba(239, 68, 68, 0.10);
    border: 1px solid rgba(239, 68, 68, 0.28);
    border-radius: var(--radius-sm);
}
.stn-icon { color: var(--dnd); flex: 0 0 auto; display: flex; }
.stn-body { flex: 1 1 auto; min-width: 0; }
.stn-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.stn-text { margin-top: 2px; font-size: 13px; color: var(--text-secondary); }
.stn-ok {
    margin-top: 8px; padding: 5px 14px; font-size: 13px; font-weight: 600;
    color: var(--text-primary); background: var(--bg-active);
    border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer;
    transition: background var(--transition);
}
.stn-ok:hover { background: var(--bg-hover); }

/* Etkin bildirim modu etiketin ALTINDA yigili gosterilir. PAYLASILAN gorsel
   desen: SUNUCU ve KANAL menuleri AYNI kurallari kullanir -> ikisi ayrisamaz.
   `srvctx-` oneki TARIHSELDIR (desen once sunucu menusunde dogdu); kural artik
   sunucuya OZEL DEGILDIR, bu yuzden silinmeden once iki menu de denetlenmeli.
   GEREKCE (kanal): satir 268px sabittir ve inline duzende deger
   `margin-left:auto` + `max-width:120px` ile yer kapinca etikete yalniz 56px
   kaliyor -> etiket 2 satira sariyor VE deger yine kirpiliyordu (olculdu:
   satir 46px, etiket 56x32, deger scrollW 142 > clientW 120). Yigili duzende
   ikisi de tam sigar. Tipografi mevcut ozet diliyle AYNI.
   KAPSAM: yalnizca GORUNUM. Kanalin kendi bildirim SECENEKLERI ve calisma
   mantigi DEGISMEDI (alt menuyu app.js `_chctxSyncNotif` doldurmaya devam
   eder; sunucunun secenekleri kanala TASINMADI). */
#server-ctx-menu .srvctx-stack-trigger,
#channel-ctx-menu .srvctx-stack-trigger,
#category-notif-menu .srvctx-stack-trigger { align-items: center; }
/* Dikey olcu paritesi: sunucu satiri TABAN `.ctx-submenu-trigger` dolgusunu
   (6px 10px) kullanir; kanal VE kategori menusu ise KENDI ORTAK 5100 olcu
   kuraliyla (7px 10px) onu ezer. Bu yuzden dolgu YALNIZ bu satirda tabana geri
   dondurulur -> 6+6+30 = 42px (sunucuyla AYNI; once 7+7+30 = 44px idi).
   Menulerin DIGER satirlari ETKILENMEZ.
   YATAY dolgu (10px) ve `gap: 10px` BILINCLI KORUNUR: gap'i sunucunun 8px'ine
   cekmek etiketi kardes satirlarin dikey cizgisinden 2px kaydirirdi
   (5100 olcu sistemi: her satirda 16px sabit ikon slotu -> metinler tek
   dikey cizgide). Longhand kullanilir; yatay deger shorthand'den gelir. */
#channel-ctx-menu .srvctx-stack-trigger,
#category-notif-menu .srvctx-stack-trigger { padding-top: 6px; padding-bottom: 6px; }
#server-ctx-menu .srvctx-stack-text,
#channel-ctx-menu .srvctx-stack-text,
#category-notif-menu .srvctx-stack-text {
    display: flex; flex-direction: column; align-items: flex-start;
    min-width: 0; flex: 1 1 auto; line-height: 1.25;
}
#server-ctx-menu .srvctx-sub-value,
#channel-ctx-menu .srvctx-sub-value,
#category-notif-menu .srvctx-sub-value {
    font-size: 11px; color: var(--text-muted);
    max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ═══ #19 (5100 sunumu): tick + dolgu ═══════════════════════════════════════
   Mevcut `.vc-slider` kurallari (yukseklik/thumb/renk) DEGISMEDI --
   burada YALNIZ 5100'un iki sunum ogesi eklenir: track dolgusu ve tick.
   Tick katmani input'un ALTINDA durur; opak track ortalarini orter ->
   cizgiyi "kesen" kisa isaretler gorunur, thumb daima ustte kalir. */
.vc-slider-wrap {
    position: relative; display: flex; align-items: center;
    height: 30px; margin-top: 2px;
}
/* Tick kabi yarim-thumb (8px) iceri cekilir -> isaretler thumb MERKEZININ
   gercek hareket araligiyla hizalanir (uclarda kayma olmaz). */
.vc-ticks {
    position: absolute; left: 8px; right: 8px; top: 50%; height: 0;
    pointer-events: none;
}
.vc-tick {
    position: absolute; top: -7px; width: 2px; height: 14px;
    transform: translateX(-50%); border-radius: 1px;
    background: var(--text-muted);
    opacity: 0.55;
}

/* Goruntu kalitesi: MEVCUT `.channel-type-option` kart dili yeniden kullanilir;
   yalniz radyo noktasi eklenir (yeni kart sistemi YOK). */
.vc-quality-list { display: flex; flex-direction: column; gap: 8px; }
.vc-quality-option { position: relative; cursor: pointer; gap: 12px; }
.vc-quality-option input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.vc-radio-dot {
    width: 16px; height: 16px; flex-shrink: 0; border-radius: 50%;
    border: 2px solid var(--border-hover, var(--border));
    position: relative; transition: border-color var(--transition);
}
.vc-quality-option.active .vc-radio-dot { border-color: var(--accent); }
.vc-quality-option.active .vc-radio-dot::after {
    content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent);
}

/* ═══ Kategori Genel Gorunum — 5100 paritesi ═══════════════════════════════
   Kurallar 5100'den BIREBIR alinmistir ve YALNIZ bu sayfaya scope'ludur
   (`.ccs-*`). Onceki `.chs-cat-emoji*` kurallari bu portla olu kaldigi icin
   KALDIRILDI — iki paralel emoji sunumu birakilmaz. */

/* Alan hatasi (or. bos kategori adi) — mevcut chs-field dili icinde kalir. */
.chs-field-error {
    margin-top: 6px;
    font-size: 12px;
    color: var(--dnd);
}
.chs-field-error.hidden { display: none; }

/* Canli onizleme: kenar cubugunun zemini + hafif accent parilti */
.ccs-preview {
    margin: 0 0 20px;
    padding: 12px 14px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(6,182,212,0.07), transparent 60%),
        var(--bg-primary);
}
.ccs-preview-label {
    display: block; margin-bottom: 10px;
    font-size: 11px; font-weight: 600; letter-spacing: .3px;
    color: var(--text-muted);
}
/* Gercek `.category-header` tipografisiyle ayni (font/spacing/renk) */
.ccs-preview-row {
    display: flex; align-items: center; gap: 4px;
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.8px; color: var(--text-muted);
    user-select: none;
}
.ccs-preview-arrow { flex-shrink: 0; }
.ccs-preview-emoji { font-size: 13px; line-height: 1; }
.ccs-preview-emoji.hidden { display: none; }
.ccs-preview-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccs-preview-plus { opacity: .45; font-size: 13px; line-height: 1; }

/* Emoji secici satiri */
.ccs-emoji-row { display: flex; align-items: center; gap: 14px; }
.ccs-emoji-slot {
    flex: 0 0 56px; width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    border: 1px dashed var(--border);
    border-radius: 14px;
    background: var(--bg-input, var(--bg-secondary));
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition),
                color var(--transition), transform 0.08s ease;
}
.ccs-emoji-slot:hover { border-color: var(--accent); color: var(--text-primary); }
.ccs-emoji-slot:active { transform: scale(0.96); }
.ccs-emoji-slot.has-emoji {
    border-style: solid;
    border-color: rgba(6,182,212,0.35);
    background: rgba(6,182,212,0.08);
}
.ccs-emoji-glyph { font-size: 28px; line-height: 1; }
.ccs-emoji-add.hidden { display: none; }
.ccs-emoji-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ccs-emoji-hint { font-size: 12px; color: var(--text-muted); }
.ccs-emoji-clear {
    align-self: flex-start; padding: 0;
    background: none; border: none;
    font-size: 12px; font-weight: 600; color: var(--dnd);
    cursor: pointer;
}
.ccs-emoji-clear:hover { text-decoration: underline; }
.ccs-emoji-clear.hidden { display: none; }

/* Ad alani: accent odak halkasi + canli karakter sayaci */
.ccs-name-wrap { position: relative; transition: border-color var(--transition), box-shadow var(--transition); }
.ccs-name-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(6,182,212,0.15);
}
.ccs-name-count {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    font-size: 11px; color: var(--text-muted); pointer-events: none;
}
.ccs-name-wrap input { padding-right: 52px; }

/* 5100 sunumu: kanal adi onek kutusu (# / hoparlor). Kutu SABIT olculudur;
   tur degisiminde metin baslangici (padding-left) DEGISMEZ. */
.ccm-name-wrap { position: relative; display: flex; align-items: center; }
.ccm-name-prefix {
    position: absolute; left: 4px; width: 20px; height: 20px;
    font-size: 14px; color: var(--text-muted);
    pointer-events: none; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
}
.ccm-name-prefix > svg { display: block; width: 16px; height: 16px; }
.ccm-name-wrap input { width: 100%; padding-left: 30px; }

/* 5100 sunum paritesi: olusturma sihirbazlari daha ferah bir modal kullanir.
   YALNIZ genislik/ic aralik; davranis, adim akisi ve ID'ler DEGISMEDI. */
.modal-content.ccm-modal {
    max-width: 470px;
    width: min(470px, calc(100vw - 48px));
}
@media (max-width: 560px) {
    .modal-content.ccm-modal { width: calc(100vw - 24px); padding: 24px 20px; }
}
.ccm-modal h2 { margin-bottom: 2px; }
.ccm-modal > p { margin-bottom: 16px; font-size: 13px; }
.ccm-modal .input-group { margin-bottom: 14px; }
/* G4 — 5100 sunumu: kanal turu SECIM KARTLARI. Kurallar `.ccm-type-list`
   ile KAPSAMLIDIR: bare `.channel-type-option` (ses kalitesi seciciyle
   PAYLASILIR) DEGISMEZ. Etiketler cumle duzeni. */
.ccm-modal .input-group > label {
    display: block; margin-bottom: 7px;
    font-size: 11px; font-weight: 700; letter-spacing: .4px;
    text-transform: none; color: var(--text-secondary);
}
.ccm-type-list { display: flex; flex-direction: column; gap: 9px; }
.ccm-type-list .channel-type-option {
    /* Kartlar <label>: genel `.input-group label` kurali margin-bottom
       ekliyordu -> aralik YALNIZ `gap` ile verilir. */
    margin: 0;
    display: flex; align-items: flex-start; gap: 12px;
    padding: 11px 13px; border-radius: var(--radius-md);
}
.ccm-type-icon-box {
    position: relative; flex: 0 0 20px; width: 20px; height: 20px; margin-top: 1px;
    display: inline-flex; color: var(--text-muted);
}
/* Ozel Kanal onizlemesi — kanal listesindeki rozetin AYNISI, yalniz modal
   olcusune gore biraz buyuk. Ikon kutusu BUYUMEZ -> kart/ad hizasi kaymaz. */
.ccm-type-icon-box .ch-lock-badge {
    right: -4px; bottom: -4px; width: 12px; height: 12px;
    background: var(--bg-input);
}
.channel-type-option.active .ccm-type-icon-box .ch-lock-badge { background: var(--accent-soft); }
.ccm-type-icon-box .ch-lock-badge svg { width: 9px; height: 9px; }
.ccm-name-prefix .ch-lock-badge { background: var(--bg-input); }
.ccm-type-list .channel-type-option.active .ccm-type-icon-box { color: var(--accent); }
.ccm-type-icon { width: 100%; height: 100%; display: block; }
.ccm-type-list .channel-type-info { gap: 2px; min-width: 0; }
.ccm-type-list .channel-type-name {
    font-size: 12.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .4px; line-height: 1.2;
}
.ccm-type-list .channel-type-desc {
    font-size: 10.5px; line-height: 1.35;
    white-space: normal; overflow-wrap: anywhere;
}

/* ─── CAPTCHA challenge modalı ────────────────────────────────────────────
   Auth formundan AYRI, ortalanmış bir uygulama modalı. Mevcut `.modal` /
   `.modal-backdrop` / `.modal-content` tabanını ve tasarım token'larını
   yeniden kullanır — yeni bir modal sistemi AÇILMAZ. */
/* KATMANLAMA — olculerek belirlendi:
     `.auth-screen`  z-index 1000
     auth modallari  z-index 1100 (#forgot-password-modal, #verify-modal,
                                   #twofa-login-modal, #delete-account-modal)
   Taban `.modal` 600'dur; challenge modali auth ekraninin ARKASINDA kalir ve
   TIKLANAMAZDI. Ayrica challenge, `#forgot-password-modal`in ICINDEN de
   tetiklenir → o modalin da USTUNDE olmalidir. */
#captcha-modal { z-index: 1200; }
.captcha-content {
    max-width: 400px;
    padding: 30px 30px 22px;
    position: relative;
    text-align: center;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}
.captcha-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 4px;
    transition: color 0.12s;
    z-index: 2;
}
.captcha-close-btn:hover { color: var(--text-primary); }
.captcha-close-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
/* Kalkan + onay işareti: uygulamanın kendi ince çizgili ikon dili ve
   tasarım token'ları. Başka bir ürünün illüstrasyonu KOPYALANMAZ. */
.captcha-mark {
    width: 62px;
    height: 62px;
    margin: 2px auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(6, 182, 212, 0.25);
}
.captcha-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.captcha-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin: 8px 0 0;
    line-height: 1.5;
}
/* Widget kabı: sağlayıcı iframe'i buraya render edilir. Sabit bir yükseklik
   rezerve edilir → widget yüklenirken modal ZIPLAMAZ. */
.captcha-widget {
    margin: 20px 0 0;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.captcha-status {
    font-size: 12.5px;
    color: var(--text-muted);
    margin: 10px 0 0;
    min-height: 18px;
    line-height: 1.4;
}
.captcha-footer {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}
.captcha-footer .btn-secondary { min-width: 120px; }

/* ── B8-3: LiveKit terminal disconnect kurtarma cagrisi ─────────────────
   Ses panelinin icinde, medya satirinin USTUNDE durur. Yalniz SDK kendi
   reconnect denemelerinden VAZGECTIKTEN sonra gorunur. */
.voice-recovery-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 6px 8px 0;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
}
.voice-recovery-text {
    font-size: 12px;
    color: var(--dnd);
    font-weight: 600;
}
.voice-recovery-btn {
    flex: 0 0 auto;
    padding: 4px 10px;
    border: none;
    border-radius: 4px;
    background: var(--dnd);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.voice-recovery-btn:hover:not(:disabled) { filter: brightness(1.1); }
.voice-recovery-btn:disabled { opacity: .6; cursor: default; }

/* ── VOICE-AUDIO-1: ekran sesi onayi + yayin sesi kontrolleri ───────────── */
/* Gonderici onayi — yayin kalitesi modalinin mevcut dili.
   SCREEN-SHARE-AUDIO-CHECKBOX-UI-1 (yalniz gorunum): satir tiklanabilir kart; native kutu appearance:none ile
   projenin ozel onay kutusu dilinde cizilir (Karar #112) — ELEMAN, label tiklamasi, Tab / Space ve
   state.shareScreenAudio baglantisi AYNI. Odak halkasi genel #206 kuralindan (--focus-ring): burada outline YOK. */
.sqm-toggle-row {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgb(var(--overlay-rgb) / 0.08);
    border-radius: 8px;
    background: rgb(var(--overlay-rgb) / 0.03);
    cursor: pointer; user-select: none;
    transition: background var(--transition), border-color var(--transition);
}
.sqm-toggle-row:hover { background: rgb(var(--overlay-rgb) / 0.06); border-color: rgb(var(--overlay-rgb) / 0.14); }
.sqm-toggle-row:has(input:checked) { background: var(--accent-soft); border-color: rgba(6, 182, 212, 0.38); }
.sqm-toggle-row:has(input:checked):hover { border-color: rgba(6, 182, 212, 0.55); }
.sqm-toggle-row:has(input:focus-visible) { border-color: var(--focus-ring); }
.sqm-toggle-row:has(input:disabled) { cursor: not-allowed; background: rgb(var(--overlay-rgb) / 0.02); border-color: rgb(var(--overlay-rgb) / 0.06); }
.sqm-toggle-row:has(input:disabled) .sqm-toggle-text { opacity: 0.55; }
.sqm-toggle-row input[type="checkbox"] {
    appearance: none; -webkit-appearance: none;
    position: relative; flex-shrink: 0; box-sizing: border-box;
    width: 20px; height: 20px; margin: 0;
    border: 2px solid rgb(var(--overlay-rgb) / 0.32);
    border-radius: 6px;
    background: rgb(var(--overlay-rgb) / 0.03);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform 0.1s ease;
}
.sqm-toggle-row:hover input[type="checkbox"]:not(:checked):not(:disabled) { border-color: rgb(var(--overlay-rgb) / 0.65); }
.sqm-toggle-row:hover input[type="checkbox"]:checked:not(:disabled) { filter: brightness(1.08); }
.sqm-toggle-row input[type="checkbox"]:active:not(:disabled) { transform: scale(0.92); }
/* Isaretli: DUZ camgobegi dolgu (--accent-hover = #0891B2, her temada ayni), gradyan / parlama YOK (diger ozel
   kutularla ayni sade dil — Karar #112). Parlak --accent uzerinde beyaz tik kontrasti 3:1'in altinda kalir. Gradyan
   olmadigindan kenarlik altinda tekrarlanan ic kare (DOUBLE-CHECK-1) de olusamaz. */
.sqm-toggle-row input[type="checkbox"]:checked {
    border-color: var(--accent-hover);
    background: var(--accent-hover);
}
/* Tik: CSS ile cizilir (Karar #112 kutulari gibi; ortak --cctx-check maskesi iki yuzeyle SINIRLI kalir) —
   16x16 ic kutuda .cam-preview-always ile AYNI geometri; isaretlenince kisa bir olcek gecisi. */
.sqm-toggle-row input[type="checkbox"]::after {
    content: ''; position: absolute;
    left: 5px; top: 1px; width: 5px; height: 10px;
    border: solid #fff; border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sqm-toggle-row input[type="checkbox"]:checked::after { transform: rotate(45deg) scale(1); }
.sqm-toggle-row input[type="checkbox"]:disabled { opacity: 0.45; cursor: not-allowed; }
.sqm-toggle-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-top: 1px; }
.sqm-toggle-title { font-size: 14px; font-weight: 600; line-height: 18px; color: var(--text-primary); }
.sqm-toggle-hint { font-size: 12px; color: var(--text-secondary); line-height: 1.45; }
@media (prefers-reduced-motion: reduce) {
    .sqm-toggle-row,
    .sqm-toggle-row input[type="checkbox"],
    .sqm-toggle-row input[type="checkbox"]::after { transition: none; }
    .sqm-toggle-row input[type="checkbox"]:active:not(:disabled) { transform: none; }
}

/* Ekran tile'indaki yayin-sesi gostergesi (mevcut .voice-tile-icon dili). */
.voice-tile-icon.stream-audio { color: #fff; background: rgba(6, 182, 212, 0.85); cursor: pointer; }
.voice-tile-icon.stream-audio.muted { background: rgba(239, 68, 68, 0.85); }
.voice-tile-icon.stream-audio:hover { filter: brightness(1.15); }

/* Yayin ses seviyesi popover'i — .streamer-overlay kapsayicisini yeniden kullanir. */
.stream-volume-overlay { flex-direction: column; gap: 8px; padding: 10px; min-width: 190px; }
.stream-volume-overlay .uctx-volume-section { width: 100%; }

/* ═══ VOICE-PAUSE-1: "Yayın duraklatıldı" overlay'i — lobi ekran tile'ı (mesh + LiveKit)
   ve DM arama peer tile'ı AYNI bileşeni kullanır. pointer-events yok: tile tıklaması,
   odak ve izleme butonları etkilenmez; LIVE rozeti / ad plakası üstte kalır. ═══ */
.voice-stream-paused {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    text-align: center;
    background: rgb(var(--bg-primary-rgb) / 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: var(--text-primary);
    pointer-events: none;
}
.voice-stream-paused .vsp-icon {
    color: var(--text-secondary);
    opacity: 0.9;
}
.voice-stream-paused .vsp-title {
    font-size: 14px;
    font-weight: 700;
}
.voice-stream-paused .vsp-sub {
    font-size: 12px;
    line-height: 1.35;
    color: var(--text-secondary);
    max-width: 260px;
}
.voice-tile.stream-paused .voice-tile-name,
.voice-tile.stream-paused .voice-tile-live-badge,
.voice-tile.stream-paused .voice-tile-icons,
.voice-tile.stream-paused .voice-tile-watch-btn,
.voice-tile.stream-paused .voice-tile-type-badge,
.voice-tile.stream-paused .voice-tile-viewers { z-index: 3; }
.dca-tile .voice-stream-paused .vsp-sub { max-width: 200px; font-size: 11px; }
.dca-tile.stream-paused .dca-tile-nameplate { z-index: 3; }
/* Publisher tarafı frame-stall probe'u: görünmez ama compositor'a giden 2px video
   (display:none olsaydı requestVideoFrameCallback hiç tetiklenmezdi). */
.screen-pause-probe {
    position: fixed;
    right: 0; bottom: 0;
    width: 2px; height: 2px;
    opacity: 0.01;
    pointer-events: none;
    z-index: -1;
}

/* ═══ MEDIA-LOADING-1: uzak video "Yükleniyor…" / "Yeniden bağlanıyor…" overlay'i —
   lobi uzak tile'ı (mesh + LiveKit), DM peer tile'ı ve mini oynatıcı AYNI bileşen.
   pointer-events yok; paused overlay (.voice-stream-paused, z-index 1) ile aynı katman:
   ikisi aynı anda çizilmez (paused öncelikli, JS tarafında). ═══ */
.voice-stream-loading {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    text-align: center;
    background: rgb(var(--bg-primary-rgb) / 0.58);
    color: var(--text-primary);
    pointer-events: none;
}
.voice-stream-loading .vsl-spinner {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid rgba(226, 232, 240, 0.22);
    border-top-color: var(--accent);
    animation: vsl-spin 0.9s linear infinite;
}
.voice-stream-loading .vsl-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}
@keyframes vsl-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .voice-stream-loading .vsl-spinner { animation-duration: 1.8s; }
}
.voice-tile.stream-loading .voice-tile-name,
.voice-tile.stream-loading .voice-tile-live-badge,
.voice-tile.stream-loading .voice-tile-icons,
.voice-tile.stream-loading .voice-tile-watch-btn,
.voice-tile.stream-loading .voice-tile-type-badge,
.voice-tile.stream-loading .voice-tile-viewers { z-index: 3; }
.dca-tile.stream-loading .dca-tile-nameplate { z-index: 3; }
.vmp-preview .voice-stream-loading { gap: 5px; padding: 6px; }
.vmp-preview .voice-stream-loading .vsl-spinner { width: 18px; height: 18px; border-width: 2px; }
.vmp-preview .voice-stream-loading .vsl-text { font-size: 11px; }
