/* ============================================================
   style.css — Nexus v53.0
   + Восстановлены stagger-animation-delay
   + Fix: z-index universal-modal
   + Fix: fullscreen screen-viewer
   + Fix: зелёная рамка говорящего
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-deep:#050810; --bg-main:#0c1220; --bg-sidebar:#0c1220;
    --bg-panel:#111a2b; --bg-hover:#162237; --bg-active:#11232f;
    --bg-input:#111a2b; --bg-msg-own:#113443; --bg-msg-other:#111a2b;
    --text-primary:#ede9e8; --text-secondary:#9aa8ba; --text-muted:#718197;
    --accent:#087f96; --accent-light:var(--nx-b);
    --success:#4dd47d; --warning:#f5a623; --danger:#e05353;
    --star-blue:#64b5ef; --star-red:#ff4d4d;
    --shadow-sm:0 1px 2px rgba(0,0,0,.3); --shadow-md:0 4px 14px rgba(0,0,0,.35);
    --shadow-lg:0 20px 60px rgba(0,0,0,.55);
    --radius-sm:6px; --radius-md:10px; --radius-lg:14px; --radius-xl:20px; --radius-full:999px;
    --font:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;
    --sidebar-width: 340px;
    --msg-gap: 3px;
    --font-size: 15px;
    --ease-spring: cubic-bezier(.22,1.4,.36,1);
    --ease-out: cubic-bezier(.22,1,.36,1);
    --ease-in-out: cubic-bezier(.65,.05,.36,1);
}
html[data-theme="darker"] {
    --bg-deep:#000; --bg-main:#050709; --bg-sidebar:#0a0d11;
    --bg-panel:#0e1116; --bg-hover:#161a20; --bg-active:#1a1f26;
    --bg-input:#12161b; --bg-msg-own:#1a4d73; --bg-msg-other:#0f1318;
}
html[data-theme="light"] {
    --bg-deep:#d1d5db; --bg-main:#f3f4f6; --bg-sidebar:#e5e7eb;
    --bg-panel:#ffffff; --bg-hover:#e8ebef; --bg-active:#dbeafe;
    --bg-input:#ffffff; --bg-msg-own:#d0e7ff; --bg-msg-other:#ffffff;
    --text-primary:#111827; --text-secondary:#4b5563; --text-muted:#9ca3af;
    --accent:#3b82f6; --accent-light:#2563eb;
    --star-blue:#2563eb; --star-red:#dc2626;
    --shadow-sm:0 1px 2px rgba(0,0,0,.06);
    --shadow-md:0 4px 14px rgba(0,0,0,.08);
    --shadow-lg:0 20px 60px rgba(0,0,0,.18);
}
html, body { height:100%; width:100%; overflow:hidden; background:var(--bg-deep); color:var(--text-primary); font-family:var(--font); font-size:var(--font-size); line-height:1.45; -webkit-font-smoothing:antialiased; }
body { user-select:text; -webkit-user-select:text; }
button, .icon-btn, .contact, .sidebar-header, .sidebar-tab, .chat-header, .msg-avatar, .date-sep, .msg-meta, .msg-reactions, .scroll-to-bottom, .msg-system, .composer-btn, .composer-mic, .composer-send { user-select:none; -webkit-user-select:none; }
.msg-text { cursor:text; }
input, textarea { user-select:text; font-family:inherit; }
button { font-family:inherit; cursor:pointer; border:none; background:none; color:inherit; position:relative; overflow:hidden; }
.hidden { display:none !important; }
::-webkit-scrollbar { width:8px; height:8px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:rgba(255,255,255,.06); border-radius:4px; }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background:rgba(0,0,0,.15); }

/* ============ KEYFRAMES ============ */
@keyframes fadeIn { from{opacity:0;} to{opacity:1;} }
@keyframes fadeInUp { from{opacity:0;transform:translateY(8px);} to{opacity:1;transform:translateY(0);} }
@keyframes fadeInScale { from{opacity:0;transform:scale(.96);} to{opacity:1;transform:scale(1);} }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.4;} }
@keyframes pop { 0%{transform:scale(.6);opacity:0;} 60%{transform:scale(1.1);opacity:1;} 100%{transform:scale(1);} }
@keyframes slideDown { from{opacity:0;transform:translateY(-6px);} to{opacity:1;transform:translateY(0);} }
@keyframes slideUp { from{opacity:0;transform:translateY(12px);} to{opacity:1;transform:translateY(0);} }
@keyframes popIn { from { opacity:0; transform:translateY(10px) scale(.95); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes slideInRight { from{opacity:0;transform:translateX(40px) scale(.94);} to{opacity:1;transform:translateX(0) scale(1);} }
@keyframes slideInLeft  { from{opacity:0;transform:translateX(-40px) scale(.94);} to{opacity:1;transform:translateX(0) scale(1);} }
@keyframes slideInRightSoft { from{opacity:0;transform:translateX(20px);} to{opacity:1;transform:translateX(0);} }
@keyframes springPop { 0%{transform:scale(.5);opacity:0;} 50%{transform:scale(1.08);opacity:1;} 75%{transform:scale(.97);} 100%{transform:scale(1);} }
@keyframes rippleEffect { to { transform: scale(4); opacity: 0; } }
@keyframes shake { 0%,100%{transform:translateX(0);} 20%,60%{transform:translateX(-4px);} 40%,80%{transform:translateX(4px);} }
@keyframes typingWave { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-5px) scale(1.05); } }
@keyframes starSpin { from{transform:rotate(0deg) scale(1);} 50%{transform:rotate(180deg) scale(1.3);} to{transform:rotate(360deg) scale(1.08);} }
@keyframes starGlow { 0%,100% { text-shadow: 0 0 3px currentColor, 0 0 8px currentColor; } 50% { text-shadow: 0 0 6px currentColor, 0 0 16px currentColor, 0 0 24px currentColor; } }
@keyframes onlinePulse { 0%{box-shadow:0 0 0 0 rgba(77,212,125,.55);} 70%{box-shadow:0 0 0 10px rgba(77,212,125,0);} 100%{box-shadow:0 0 0 0 rgba(77,212,125,0);} }
@keyframes breathing { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:.6;transform:scale(1.15);} }
@keyframes recPulse { 0%,100%{opacity:1; transform:scale(1);} 50%{opacity:.5; transform:scale(.85);} }
@keyframes callTileIn { from { opacity:0; transform:scale(.9) translateY(12px); } to { opacity:1; transform:scale(1) translateY(0); } }
@keyframes pulseRing { 0% { transform:translateX(-50%) scale(.7); opacity:1; } 100% { transform:translateX(-50%) scale(2); opacity:0; } }
@keyframes screenPulse { 0%,100% { box-shadow:0 0 0 0 rgba(var(--nx-a2-rgb),.6); } 50% { box-shadow:0 0 0 14px rgba(var(--nx-a2-rgb),0); } }
@keyframes muteAppear { from { opacity:0; transform:scale(.5); } 60% { transform:scale(1.15); } to { opacity:1; transform:scale(1); } }
@keyframes speakingAvatarPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes speakingRingGreen {
    0%, 100% { box-shadow: 0 0 0 3px #4dd47d, 0 0 26px rgba(77, 212, 125, .55); }
    50%      { box-shadow: 0 0 0 4px #6be092, 0 0 0 34px rgba(77, 212, 125, .75); }
}
@keyframes blobFloat { 0%,100%{transform:translate(0,0) scale(1);} 33%{transform:translate(40px,-30px) scale(1.08);} 66%{transform:translate(-30px,40px) scale(.95);} }
@keyframes cardAppear { from{opacity:0;transform:translateY(20px) scale(.97);} to{opacity:1;transform:translateY(0) scale(1);} }
@keyframes ctxPop { from { opacity:0; transform:scale(.94) translateY(-6px); } to { opacity:1; transform:scale(1) translateY(0); } }
@keyframes highlightFade { 0% { box-shadow: 0 0 0 3px rgba(var(--nx-a2-rgb),.9); } 100% { box-shadow: var(--shadow-sm); } }
@keyframes jelly { 0%{transform:scale(1,1);} 25%{transform:scale(1.2,.85);} 50%{transform:scale(.9,1.15);} 75%{transform:scale(1.05,.95);} 100%{transform:scale(1,1);} }
@keyframes shimmer { 0%{background-position:-400px 0;} 100%{background-position:400px 0;} }
@keyframes glowPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(var(--nx-a2-rgb),.4); } 50% { box-shadow: 0 0 0 8px rgba(var(--nx-a2-rgb),0); } }
@keyframes gradientShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes bounceIn { 0% { transform: scale(.3); opacity:0; } 50% { transform: scale(1.15); opacity:1; } 75% { transform: scale(.95); } 100% { transform: scale(1); } }
@keyframes slideInFromRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInFromLeft { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes notifSlideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes notifSlideOut { to { transform: translateX(120%); opacity: 0; } }
@keyframes notifProgress { from { width: 100%; } to { width: 0%; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ RIPPLE ============ */
.btn-primary, .btn-secondary, .btn-danger, .icon-btn, .composer-btn,
.composer-send, .composer-mic, .auth-tab, .sidebar-tab, .settings-nav-item,
.ctx-item, .reaction-cell, .emoji-cell, .contact, .media-item,
.device-remove, .read-avatar, .poll-option, .role-option, .perm-check,
.star-btn, .theme-opt, .settings-check, .member-pick, .auth-recover-btn,
.select-toolbar-btn { position: relative; overflow: hidden; }
.btn-primary::after, .btn-secondary::after, .btn-danger::after,
.icon-btn::after, .composer-btn::after, .composer-send::after,
.composer-mic::after, .sidebar-tab::after, .settings-nav-item::after,
.ctx-item::after, .select-toolbar-btn::after {
    content: ''; position: absolute; width: 10px; height: 10px; border-radius: 50%;
    background: rgba(255,255,255,.45); opacity: 0; pointer-events: none;
    transform: translate(-50%, -50%) scale(0);
    top: var(--ripple-y, 50%); left: var(--ripple-x, 50%);
}
.btn-primary.rippling::after, .btn-secondary.rippling::after,
.btn-danger.rippling::after, .icon-btn.rippling::after,
.composer-btn.rippling::after, .composer-send.rippling::after,
.composer-mic.rippling::after, .sidebar-tab.rippling::after,
.settings-nav-item.rippling::after, .ctx-item.rippling::after,
.select-toolbar-btn.rippling::after { animation: rippleEffect .6s ease-out; }

/* ============ АВТОРИЗАЦИЯ ============ */
.auth-screen { position:fixed; inset:0; display:flex; align-items:center; justify-content:center; overflow:hidden; background: radial-gradient(ellipse at top left, #16273a 0%, transparent 55%), radial-gradient(ellipse at bottom right, var(--v-1a1a3a) 0%, transparent 55%), linear-gradient(135deg, #070b12 0%, #0b131f 50%, #070b12 100%); }
html[data-theme="light"] .auth-screen { background: radial-gradient(ellipse at top left, #dbeafe 0%, transparent 55%), radial-gradient(ellipse at bottom right, #ede9fe 0%, transparent 55%), linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 50%, #f3f4f6 100%); }
.auth-bg { position:absolute; inset:0; overflow:hidden; z-index:0; }
.auth-grid { position:absolute; inset:0; background-image: linear-gradient(rgba(var(--nx-a2-rgb),.05) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--nx-a2-rgb),.05) 1px, transparent 1px); background-size:44px 44px; mask-image:radial-gradient(ellipse at center,#000 30%, transparent 80%); }
.blob { position:absolute; border-radius:50%; filter:blur(80px); opacity:.55; animation:blobFloat 18s ease-in-out infinite; }
.blob-1{width:420px;height:420px;top:-120px;left:-100px;background:radial-gradient(circle,#3b7cff 0%, transparent 70%);}
.blob-2{width:380px;height:380px;bottom:-140px;right:-80px;background:radial-gradient(circle,#a537f5 0%, transparent 70%);animation-delay:-6s;}
.blob-3{width:320px;height:320px;top:40%;left:55%;background:radial-gradient(circle,#26c2ff 0%, transparent 70%);animation-delay:-12s;}
.auth-card { position:relative; z-index:1; width:100%; max-width:420px; margin:20px; padding:40px 36px 28px; border-radius:var(--radius-xl); background:rgba(var(--v-rgb),.72); backdrop-filter:blur(28px) saturate(180%); border:1px solid rgba(255,255,255,.08); box-shadow:var(--shadow-lg); animation:cardAppear .7s var(--ease-spring); }
html[data-theme="light"] .auth-card { background:rgba(255,255,255,.85); border-color:rgba(0,0,0,.08); }
.auth-logo { display:flex; align-items:center; gap:12px; margin-bottom:6px; animation:fadeInUp .5s var(--ease-out) .15s both; }
.auth-logo-icon { width:48px;height:48px;border-radius:14px; background:linear-gradient(135deg,var(--nx-a2),#8b5cf6); display:flex;align-items:center;justify-content:center; font-weight:800;font-size:22px;color:#fff; box-shadow:0 8px 24px rgba(var(--nx-a2-rgb),.4); transition: transform .25s var(--ease-spring); }
.auth-logo-icon:hover { transform: rotate(-6deg) scale(1.08); }
.auth-logo-text { font-size:24px;font-weight:800;letter-spacing:-.5px; background:linear-gradient(135deg,#fff,#a8c8e8); -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent; }
html[data-theme="light"] .auth-logo-text { background:linear-gradient(135deg,#111827,#4b5563); -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent; }
.auth-tabs { position:relative; display:grid; grid-template-columns:1fr 1fr; background:rgba(0,0,0,.3); border-radius:var(--radius-md); padding:4px; margin-bottom:22px; margin-top:20px; animation:fadeInUp .5s var(--ease-out) .2s both; }
html[data-theme="light"] .auth-tabs { background:rgba(0,0,0,.05); }
.auth-tab { position:relative; z-index:2; padding:10px; text-align:center; font-size:14px; font-weight:500; color:var(--text-secondary); border-radius:7px; transition:color .25s; }
.auth-tab.active { color:#fff; }
.auth-tab-slider { position:absolute; top:4px; left:4px; width:calc(50% - 4px); height:calc(100% - 8px); background:linear-gradient(135deg,var(--nx-a2),var(--nx-a3)); border-radius:7px; transition:transform .4s var(--ease-spring); }
.auth-tabs[data-active="register"] .auth-tab-slider { transform:translateX(100%); }
.auth-form { display:flex; flex-direction:column; gap:14px; }
.form-group { display:flex; flex-direction:column; gap:6px; animation:fadeInUp .4s var(--ease-out) both; }
.form-group:nth-child(1) { animation-delay: .15s; }
.form-group:nth-child(2) { animation-delay: .2s; }
.form-group:nth-child(3) { animation-delay: .25s; }
.form-group:nth-child(4) { animation-delay: .3s; }
.form-group:nth-child(5) { animation-delay: .35s; }
.form-label { font-size:12px; font-weight:500; color:var(--text-secondary); text-transform:uppercase; letter-spacing:.6px; }
.form-input { width:100%; padding:13px 15px; background:rgba(0,0,0,.28); border:1.5px solid transparent; border-radius:var(--radius-md); color:#fff; font-size:15px; outline:none; resize:vertical; transition: border-color .25s, background .25s, box-shadow .25s, transform .15s; }
html[data-theme="light"] .form-input { background:#fff; color:#111827; border-color:rgba(0,0,0,.1); }
.form-input::placeholder { color:var(--text-muted); }
.form-input:focus { border-color:var(--accent); background:rgba(0,0,0,.44); box-shadow:0 0 0 4px rgba(var(--nx-a2-rgb),.16); animation: glowPulse 2s infinite; }
html[data-theme="light"] .form-input:focus { background:#fff; }
.auth-error { min-height:18px; color:#ff7a7a; font-size:13px; opacity:0; transition:opacity .2s; }
.auth-error.visible { opacity:1; animation: shake .4s ease-in-out; }
.btn-primary { display:flex; align-items:center; justify-content:center; gap:8px; padding:12px 20px; background:linear-gradient(135deg,var(--nx-a2),var(--nx-a3)); background-size: 200% 200%; color:#fff; font-size:15px; font-weight:600; border-radius:var(--radius-md); transition: transform .2s var(--ease-spring), box-shadow .25s, filter .25s; box-shadow:0 8px 24px rgba(var(--nx-a2-rgb),.32); }
.btn-primary:hover { filter:brightness(1.1); box-shadow:0 12px 34px rgba(var(--nx-a2-rgb),.5); transform:translateY(-2px); animation: gradientShift 3s ease infinite; }
.btn-primary:active { transform:translateY(0) scale(.97); }
.btn-primary:disabled { opacity:.5; cursor:not-allowed; transform:none; }
.btn-secondary { padding:12px 20px; background:rgba(255,255,255,.06); color:#fff; border-radius:var(--radius-md); font-size:15px; font-weight:500; transition: background .2s, transform .2s var(--ease-spring); }
html[data-theme="light"] .btn-secondary { background:rgba(0,0,0,.06); color:#111827; }
.btn-secondary:hover { background:rgba(255,255,255,.12); transform:translateY(-1px); }
html[data-theme="light"] .btn-secondary:hover { background:rgba(0,0,0,.1); }
.btn-secondary:active { transform:scale(.98); }
.btn-danger { padding:12px 20px; background:rgba(224,83,83,.15); color:#ff8a8a; border-radius:var(--radius-md); font-size:15px; font-weight:500; transition: background .2s, transform .2s var(--ease-spring); }
.btn-danger:hover { background:rgba(224,83,83,.28); transform:translateY(-1px); }
.btn-danger:active { transform:scale(.98); }
.auth-recover-row { margin-top: 10px; text-align: center; animation:fadeInUp .5s var(--ease-out) .4s both; }
.auth-recover-btn { background: none; border: none; color: var(--text-secondary); font-size: 13px; cursor: pointer; padding: 6px 10px; border-radius: 8px; transition: color .2s, background .2s, transform .15s; }
.auth-recover-btn:hover { color: var(--accent-light); background: rgba(var(--nx-a2-rgb),.1); transform:translateY(-1px); }

/* ============ CAP.JS ============ */
#group-captcha { animation: fadeInUp .4s var(--ease-out); display: flex; justify-content: center; }
#group-captcha cap-widget {
    --cap-background: #ffffff; --cap-color: #212121; --cap-border-color: #d0d0d0; --cap-border-radius: 10px;
    --cap-widget-width: 100%; --cap-widget-height: 58px; --cap-widget-padding: 14px; --cap-gap: 15px;
    --cap-checkbox-size: 25px; --cap-checkbox-border: 1px solid #aaaaaa; --cap-checkbox-background: #fafafa; --cap-checkbox-border-radius: 6px;
    --cap-spinner-color: var(--nx-a2); --cap-spinner-background-color: #eeeeee; --cap-spinner-thickness: 3;
    --cap-focus-ring: var(--nx-a2); --cap-font: inherit;
    display: block; width: 100%; max-width: 320px;
}

/* ============ ОСНОВНОЙ ЭКРАН ============ */
.app-screen { display:grid; grid-template-columns: var(--sidebar-width) 4px 1fr; height:100vh; width:100vw; animation: fadeIn .5s var(--ease-out); }
.sidebar { display:flex; flex-direction:column; background:var(--bg-sidebar); border-right:1px solid rgba(255,255,255,.04); overflow:hidden; min-width:0; grid-column:1; animation: slideInFromLeft .5s var(--ease-spring); }
html[data-theme="light"] .sidebar { border-color:rgba(0,0,0,.06); }
.sidebar-resizer { grid-column:2; background:rgba(255,255,255,.03); cursor:ew-resize; transition:background .2s; position:relative; }
html[data-theme="light"] .sidebar-resizer { background:rgba(0,0,0,.04); }
.sidebar-resizer:hover { background:rgba(var(--nx-a2-rgb),.4); }
.sidebar-resizer::after { content:''; position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:2px; height:36px; border-radius:2px; background:rgba(255,255,255,.15); transition: background .2s, height .2s; }
html[data-theme="light"] .sidebar-resizer::after { background:rgba(0,0,0,.15); }
.sidebar-resizer:hover::after { background:var(--accent-light); height:60px; }
.chat-area { grid-column:3; animation: fadeIn .5s var(--ease-out) .1s backwards; }
.sidebar-header { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:12px 14px; border-bottom:1px solid rgba(255,255,255,.05); background:linear-gradient(180deg,var(--v-1d1d38),var(--v-1d1d38)); }
html[data-theme="light"] .sidebar-header { background:linear-gradient(180deg,#eef1f4,#e5e7eb); border-color:rgba(0,0,0,.06); }
.sidebar-actions { display:flex; gap:4px; }
.icon-action { background:rgba(var(--nx-a2-rgb),.15) !important; color:var(--accent-light) !important; border:1px solid rgba(var(--nx-a2-rgb),.25); }
.icon-action:hover { background:rgba(var(--nx-a2-rgb),.35) !important; color:#fff !important; border-color:rgba(var(--nx-a2-rgb),.5); transform: translateY(-2px) scale(1.05) !important; }
.icon-action:active { transform: scale(.92) !important; }
.me-card { display:flex; align-items:center; gap:11px; flex:1; min-width:0; padding:6px; border-radius:var(--radius-md); cursor:pointer; transition: background .2s, transform .15s; }
.me-card:hover { background:rgba(255,255,255,.03); transform: translateX(2px); }
.me-card:active { transform: translateX(0) scale(.99); }
html[data-theme="light"] .me-card:hover { background:rgba(0,0,0,.04); }
.me-info { min-width:0; flex:1; }
.me-name { font-size:14.5px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text-primary); display:flex; align-items:center; gap:4px; }
.me-status { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--text-secondary); margin-top:1px; }
.avatar { flex-shrink:0; width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:15px; color:#fff; background:linear-gradient(135deg,var(--nx-a2),var(--nx-a3)); background-size:cover; background-position:center; text-transform:uppercase; user-select:none; position:relative; overflow:hidden; transition: transform .25s var(--ease-spring), box-shadow .25s; }
.avatar:hover { transform: scale(1.08); box-shadow: 0 0 0 3px rgba(var(--nx-a2-rgb),.3); }
.avatar.nexus-avatar { background:linear-gradient(135deg,var(--nx-a2),#8b5cf6); }
.avatar-me { width:42px; height:42px; }
.avatar-lg { width:84px; height:84px; font-size:32px; }
.avatar-xl { width:120px; height:120px; font-size:44px; }
.avatar-sm { width:32px; height:32px; font-size:13px; }
.icon-btn { display:flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:10px; color:var(--text-secondary); font-size:18px; transition: background .2s, color .2s, transform .2s var(--ease-spring), border-color .2s; }
.icon-btn:hover { background:rgba(255,255,255,.08); color:var(--text-primary); transform: translateY(-2px) scale(1.05); }
html[data-theme="light"] .icon-btn:hover { background:rgba(0,0,0,.06); }
.icon-btn:active { transform: translateY(0) scale(.92); }
.sidebar-search { position:relative; padding:12px 14px 8px; }
.search-input { width:100%; padding:10px 34px 10px 16px; background:var(--bg-input); border:1.5px solid transparent; border-radius:10px; color:var(--text-primary); font-size:14px; outline:none; transition: border-color .25s, box-shadow .25s; }
.search-input::placeholder { color:var(--text-muted); }
.search-input:focus { border-color:var(--accent); box-shadow: 0 0 0 3px rgba(var(--nx-a2-rgb),.15); animation: glowPulse 2s infinite; }
.search-clear { position:absolute; right:22px; top:50%; transform: translateY(-50%); width:22px; height:22px; display:flex; align-items:center; justify-content:center; border-radius:50%; background:rgba(255,255,255,.08); color:var(--text-secondary); font-size:16px; transition: background .2s, transform .2s; }
html[data-theme="light"] .search-clear { background:rgba(0,0,0,.08); }
.search-clear:hover { background:rgba(255,255,255,.18); transform: translateY(-50%) scale(1.12); }
html[data-theme="light"] .search-clear:hover { background:rgba(0,0,0,.15); }
.sidebar-tabs { display:flex; padding:0 14px 10px; gap:4px; overflow-x:auto; scrollbar-width:none; }
.sidebar-tabs::-webkit-scrollbar { display:none; }
.sidebar-tab { position:relative; padding:6px 12px; font-size:12.5px; color:var(--text-secondary); border-radius:var(--radius-full); background:rgba(255,255,255,.03); white-space:nowrap; transition: background .2s, color .2s, transform .2s var(--ease-spring); display:flex; align-items:center; gap:6px; }
html[data-theme="light"] .sidebar-tab { background:rgba(0,0,0,.04); }
.sidebar-tab:hover { background:rgba(255,255,255,.07); color:var(--text-primary); transform: translateY(-1px); }
html[data-theme="light"] .sidebar-tab:hover { background:rgba(0,0,0,.08); }
.sidebar-tab:active { transform: scale(.96); }
.sidebar-tab.active { background:rgba(var(--nx-a2-rgb),.22); color:var(--accent-light); box-shadow: 0 0 0 1px rgba(var(--nx-a2-rgb),.35); }
.tab-badge { display:inline-flex; align-items:center; justify-content:center; min-width:16px; height:16px; padding:0 5px; border-radius:8px; background:var(--danger); color:#fff; font-size:10px; font-weight:700; animation: bounceIn .5s var(--ease-spring); }
.contacts-list { flex:1; overflow-y:auto; padding:0 8px 12px; }
.contact { display:flex; align-items:center; gap:11px; padding:10px 10px; border-radius:var(--radius-md); cursor:pointer; position:relative; transition: background .2s, transform .2s var(--ease-spring); animation: fadeInUp .35s var(--ease-out) both; }
.contact:nth-child(1) { animation-delay: .02s; }
.contact:nth-child(2) { animation-delay: .04s; }
.contact:nth-child(3) { animation-delay: .06s; }
.contact:nth-child(4) { animation-delay: .08s; }
.contact:nth-child(5) { animation-delay: .1s; }
.contact:nth-child(n+6) { animation-delay: .12s; }
.contact:hover { background:var(--bg-hover); transform: translateX(3px); }
.contact:active { transform: translateX(1px) scale(.99); }
.contact.active { background:var(--bg-active); box-shadow: inset 3px 0 0 var(--accent-light); }
.contact.pinned::after {
    content: ''; position: absolute; right: 12px; top: 12px; width: 14px; height: 14px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6a7a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='12' y1='17' x2='12' y2='22'></line><path d='M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24z'></path></svg>");
    background-size: contain; background-repeat: no-repeat; opacity: 0.85; pointer-events: none; animation: fadeIn .3s ease-out;
}
.contact.muted { opacity:.55; }
.contact-avatar-wrap { position:relative; flex-shrink:0; }
.contact-dot { position:absolute; right:-1px; bottom:-1px; width:12px; height:12px; border-radius:50%; border:2.5px solid var(--bg-sidebar); background:#4a5563; transition: background .3s; }
.contact.online .contact-dot { background:var(--success); animation: onlinePulse 2.2s infinite; }
.contact-kind-badge { position:absolute; right:-3px; bottom:-3px; width:16px; height:16px; border-radius:50%; background:var(--accent); display:flex; align-items:center; justify-content:center; font-size:9px; border:2px solid var(--bg-sidebar); animation: fadeInScale .3s var(--ease-spring); }
.contact-kind-badge.channel { background:#8b5cf6; }
.contact-kind-badge.nexus { background:linear-gradient(135deg,var(--nx-a2),#8b5cf6); }
.contact-body { flex:1; min-width:0; }
.contact-name { font-size:14.5px; font-weight:500; color:var(--text-primary); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:flex; align-items:center; gap:4px; }
.contact-status { font-size:12.5px; color:var(--text-secondary); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-top:2px; }
.contact.online .contact-status { color:var(--success); }
.unread-badge { flex-shrink:0; min-width:20px; height:20px; padding:0 6px; border-radius:10px; background:var(--accent-light); color:#fff; font-size:11.5px; font-weight:600; display:flex; align-items:center; justify-content:center; animation: bounceIn .5s var(--ease-spring); }
.empty-contacts { padding:30px 20px; text-align:center; color:var(--text-muted); font-size:13px; line-height:1.6; animation: fadeIn .4s ease-out; }
.dot { display:inline-block; width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.dot-online { background:var(--success); box-shadow:0 0 8px rgba(77,212,125,.6); animation: breathing 2s ease-in-out infinite; }

/* ЗВЁЗДЫ */
.user-star { display: inline-block; font-family: 'Segoe UI Symbol', 'Apple Symbols', 'Arial Unicode MS', -apple-system, BlinkMacSystemFont, sans-serif; font-weight: 900; font-size: 1em; line-height: 1; vertical-align: -0.06em; margin-left: 3px; transform: scale(1.08); transform-origin: center; user-select: none; animation: starSpin .7s var(--ease-spring) both, starGlow 3s ease-in-out infinite; }
.user-star-red { color: var(--star-red); text-shadow: 0 0 3px rgba(255,77,77,.85), 0 0 8px rgba(255,77,77,.45); }
.user-star-blue { color: var(--star-blue); text-shadow: 0 0 3px rgba(100,181,239,.85), 0 0 8px rgba(100,181,239,.45); }
.user-stars { display: flex; gap: 4px; justify-content: center; margin-top: 4px; }
.user-stars .user-star { font-size: 16px; }
.info-name-stars { display: flex; gap: 4px; align-items: center; }
.info-name-stars .user-star { font-size: 20px; }
.contact-name .user-star, .chat-header-name .user-star, .me-name .user-star,
.msg-author .user-star, .info-member-name .user-star { font-size: 13px; vertical-align: 0; }

/* ЧАТ */
.chat-area { position:relative; min-width:0; background: radial-gradient(ellipse at top, rgba(var(--nx-a2-rgb),.06) 0%, transparent 60%), var(--bg-main); display:flex; flex-direction:column; overflow:hidden; }
.chat-empty { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:40px; gap:16px; }
.chat-empty h2 { font-size:22px; font-weight:700; color:var(--text-primary); animation: fadeInUp .5s var(--ease-out) both; }
.chat-empty p { max-width:380px; color:var(--text-secondary); font-size:14px; line-height:1.6; animation: fadeInUp .5s var(--ease-out) .1s both; }
.chat-wrapper { display:flex; flex-direction:column; flex:1; min-height:0; position:relative; animation:fadeIn .35s var(--ease-out); }
.chat-header { display:flex; align-items:center; justify-content:space-between; padding:12px 20px; background:rgba(var(--v-rgb),.85); backdrop-filter:blur(18px); border-bottom:1px solid rgba(255,255,255,.05); z-index:5; gap:8px; animation: slideDown .35s var(--ease-spring); }
html[data-theme="light"] .chat-header { background:rgba(229,231,235,.9); border-color:rgba(0,0,0,.06); }
.chat-header-user { display:flex; align-items:center; gap:12px; min-width:0; flex:1; cursor:pointer; padding:4px 8px 4px 4px; border-radius:var(--radius-md); transition: background .2s, transform .15s; }
.chat-header-user:hover { background:rgba(255,255,255,.04); transform: translateX(2px); }
html[data-theme="light"] .chat-header-user:hover { background:rgba(0,0,0,.04); }
.chat-header-info { min-width:0; }
.chat-header-name { font-size:15.5px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:flex; align-items:center; gap:6px; }
.chat-header-status { font-size:12.5px; color:var(--text-secondary); margin-top:1px; }
.chat-header-status.online { color:var(--success); }
.chat-header-actions { display:flex; gap:4px; }

.messages-wrap { flex:1; position:relative; min-height:0; display:flex; flex-direction:column; }
.scroll-to-bottom { position: absolute; right: 22px; bottom: 20px; width: 44px; height: 44px; border-radius: 50%; background: rgba(30, 43, 58, 0.85); color: #8ba3bc; border: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,.35); cursor: pointer; transition: transform .25s var(--ease-spring), background .2s, color .2s, border-color .2s; z-index: 8; animation: fadeInScale .3s var(--ease-spring); }
.scroll-to-bottom:hover { background: rgba(43, 60, 80, 0.92); color: #b3c8dd; border-color: rgba(255,255,255,.14); transform: scale(1.1) translateY(-2px); }
.scroll-to-bottom:active { transform: scale(.92); }
html[data-theme="light"] .scroll-to-bottom { background: rgba(203, 210, 220, 0.92); color: #4b5563; border-color: rgba(0,0,0,.08); box-shadow: 0 4px 14px rgba(0,0,0,.12); }
html[data-theme="light"] .scroll-to-bottom:hover { background: rgba(180, 190, 205, 0.96); color: #1f2937; }
html[data-theme="darker"] .scroll-to-bottom { background: rgba(15, 22, 30, 0.9); border-color: rgba(255,255,255,.06); }
.scroll-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 5px; box-shadow: 0 2px 8px rgba(224,83,83,.4); animation: bounceIn .4s var(--ease-spring); }

.pinned-bar { display:flex; align-items:center; gap:10px; padding:8px 20px; background:rgba(var(--nx-a2-rgb),.12); border-bottom:1px solid rgba(var(--nx-a2-rgb),.2); font-size:13px; animation: slideDown .35s var(--ease-spring); }
.pinned-bar-content { flex:1; display:flex; align-items:center; gap:8px; min-width:0; cursor:pointer; border-radius:6px; padding:2px 4px; transition: background .2s, transform .15s; }
.pinned-bar-content:hover { background:rgba(255,255,255,.05); transform: translateX(2px); }
.pinned-bar-content svg { color:var(--accent-light); flex-shrink:0; }
.pinned-bar-text { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pinned-bar-nav { display:flex; gap:2px; align-items:center; }
.pinned-bar-close { width:28px; height:28px; font-size:14px; }

.chat-search-bar { display:flex; align-items:center; gap:6px; padding:8px 20px; background:rgba(var(--v-rgb),.9); border-bottom:1px solid rgba(255,255,255,.06); animation: slideDown .3s var(--ease-spring); }
html[data-theme="light"] .chat-search-bar { background:rgba(229,231,235,.95); border-color:rgba(0,0,0,.06); }
.chat-search-bar input { flex:1; padding:8px 12px; background:var(--bg-input); border:1.5px solid transparent; border-radius:8px; color:var(--text-primary); font-size:13.5px; outline:none; transition: border-color .2s; }
.chat-search-bar input:focus { border-color:var(--accent); }
.chat-search-count { font-size:12.5px; color:var(--text-secondary); min-width:52px; text-align:center; }

.messages { flex:1; overflow-y:auto; padding:18px 26px 8px; display:flex; flex-direction:column; gap:var(--msg-gap); scroll-behavior:auto; }
.messages.fade-swap { animation: fadeIn .3s ease; }
.date-sep { align-self:center; margin:14px 0 6px; padding:4px 14px; background:rgba(var(--v-rgb),.85); border-radius:var(--radius-full); font-size:11.5px; font-weight:500; color:var(--text-secondary); animation: fadeInScale .35s var(--ease-spring); }
html[data-theme="light"] .date-sep { background:rgba(229,231,235,.9); }

/* СООБЩЕНИЯ */
.msg { display:flex; margin:1px 0; position:relative; align-items:flex-end; gap:8px; transition: transform .25s var(--ease-spring); }
.msg.new-msg.own { animation: slideInRight .45s var(--ease-spring) both; }
.msg.new-msg.other { animation: slideInLeft .45s var(--ease-spring) both; }
.msg:not(.new-msg) { animation: none; }
.msg.own { justify-content: flex-end; }
.msg.other { justify-content:flex-start; }
.msg-avatar { flex-shrink:0; width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:12.5px; color:#fff; background-size:cover; background-position:center; cursor:pointer; transition: transform .25s var(--ease-spring), box-shadow .25s; box-shadow:0 2px 8px rgba(0,0,0,.3); }
.msg-avatar:hover { transform: scale(1.12) rotate(-3deg); box-shadow: 0 4px 16px rgba(var(--nx-a2-rgb),.5), 0 0 0 3px rgba(var(--nx-a2-rgb),.25); }
.msg-avatar.placeholder { visibility:hidden; }
.msg-system { align-self:center; margin:8px auto; padding:6px 16px; background:rgba(var(--nx-a2-rgb),.1); border-radius:var(--radius-full); font-size:12.5px; color:#89a3bc; font-style:italic; display:flex; align-items:center; gap:6px; max-width:80%; text-align:center; animation: fadeInScale .4s var(--ease-spring); }
.msg-bubble { position:relative; max-width:min(520px, 72%); padding:7px 12px; border-radius:14px; font-size:14.5px; line-height:1.42; word-wrap:break-word; overflow-wrap:anywhere; box-shadow:var(--shadow-sm); cursor:context-menu; transition: transform .25s var(--ease-spring), box-shadow .25s, outline-color .15s; }
.msg-bubble:hover { box-shadow: var(--shadow-md); }
.msg.own .msg-bubble { background:linear-gradient(135deg,var(--nx-a3),var(--nx-a3)); color:#fff; border-bottom-right-radius:4px; }
html[data-theme="light"] .msg.own .msg-bubble { background:linear-gradient(135deg,#d0e7ff,#c7e0fb); color:#111827; }
.msg.other .msg-bubble { background:var(--bg-msg-other); color:#eaeef2; border-bottom-left-radius:4px; }
html[data-theme="light"] .msg.other .msg-bubble { color:#111827; border:1px solid rgba(0,0,0,.06); }
.msg.same-author.prev .msg-avatar.placeholder { visibility:visible; opacity:0; }
.msg.same-author.prev .msg-bubble { border-top-left-radius:6px; border-top-right-radius:6px; }
.msg-author { font-size:12px; font-weight:600; color:var(--accent-light); margin-bottom:2px; display:flex; align-items:center; gap:4px; }
.msg-text { white-space:pre-wrap; word-wrap:break-word; overflow-wrap:anywhere; }
.msg-text::after { content:''; display:inline-block; width:58px; height:1px; vertical-align:bottom; margin-right:-4px; }
.msg-text.own::after { width:64px; }
.msg-text.edited::before { content:'(ред.) '; font-size:11px; opacity:.6; }
.msg.deleted .msg-bubble { opacity:.6; }
.msg.deleted .msg-text { font-style:italic; color:var(--text-muted); }
.msg-meta { position:absolute; right:8px; bottom:5px; display:inline-flex; align-items:center; gap:3px; font-size:11px; line-height:1; color:rgba(255,255,255,.55); pointer-events:none; }
.msg.other .msg-meta { color:var(--text-muted); }
html[data-theme="light"] .msg.own .msg-meta { color:rgba(17,24,39,.5); }
.msg-check { color:rgba(255,255,255,.55); transition: color .35s ease; }
html[data-theme="light"] .msg.own .msg-check { color:rgba(17,24,39,.45); }
.msg-check.read { color:#7dd3fc; text-shadow:0 0 6px rgba(125,211,252,.5); animation: bounceIn .5s var(--ease-spring); }
html[data-theme="light"] .msg.own .msg-check.read { color:#2563eb; text-shadow:none; }
.msg.swiping .msg-bubble::before { content: '↩'; position: absolute; left: -28px; top: 50%; transform: translateY(-50%); font-size: 16px; color: var(--accent-light); opacity: 1; animation: fadeIn .2s; }
.msg-reply-preview { display:flex; gap:8px; padding:6px 8px; background:rgba(0,0,0,.22); border-left:3px solid var(--accent-light); border-radius:6px; margin-bottom:4px; cursor:pointer; transition: background .2s, transform .15s; }
.msg-reply-preview:hover { background:rgba(0,0,0,.32); transform: translateX(-2px); }
html[data-theme="light"] .msg-reply-preview { background:rgba(0,0,0,.06); }
html[data-theme="light"] .msg-reply-preview:hover { background:rgba(0,0,0,.1); }
.msg-reply-preview:active { transform: scale(.98); }
.msg-reply-preview .rp-author { font-weight:600; color:var(--accent-light); font-size:12px; }
.msg-reply-preview .rp-text { color:var(--text-secondary); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:200px; font-size:13px; }
.msg-forwarded { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--accent-light); margin-bottom:4px; padding-bottom:4px; border-bottom:1px dashed rgba(100,181,239,.2); opacity:.9; }
.msg-attachment { display:block; margin:-3px -6px 5px; border-radius:10px; overflow:hidden; max-width:340px; cursor:pointer; transition: transform .35s var(--ease-spring); }
.msg-attachment:hover { transform: scale(1.02); }
.msg-attachment img { display:block; width:100%; max-height:420px; object-fit:cover; opacity:0; transition: opacity .5s ease; }
.msg-attachment img.loaded { opacity:1; animation: fadeInScale .4s var(--ease-out); }
.msg-attachment video { display:block; width:100%; max-height:420px; background:#000; border-radius:10px; }

.voice-msg { display:flex; align-items:center; gap:10px; padding:6px 4px; min-width:220px; max-width:340px; }
.voice-play { flex-shrink:0; width:40px; height:40px; border-radius:50%; background:rgba(255,255,255,.15); display:flex; align-items:center; justify-content:center; color:#fff; font-size:16px; transition: background .2s, transform .2s var(--ease-spring); }
.voice-play:hover { background:rgba(255,255,255,.28); transform: scale(1.08); }
.voice-play:active { transform: scale(.92); }
.voice-body { flex:1; min-width:0; display:flex; align-items:center; gap:8px; }
.voice-wave { flex:1; display:flex; align-items:center; gap:2px; height:22px; }
.voice-wave span { display:block; width:2px; border-radius:2px; background:rgba(255,255,255,.4); transition: background .2s; }
.voice-wave.playing span { background:rgba(125,211,252,1); animation: breathing 1s ease-in-out infinite; animation-delay: calc(var(--i, 0) * .05s); }
.voice-time { font-size:12px; color:rgba(255,255,255,.7); min-width:34px; text-align:right; }
.msg.other .voice-play { background:rgba(0,0,0,.25); }
.msg.other .voice-time { color:var(--text-secondary); }
.msg.other .voice-wave span { background:rgba(255,255,255,.2); }
.msg-file { display:flex; align-items:center; gap:10px; padding:8px 10px; background:rgba(0,0,0,.18); border-radius:10px; margin:-2px 0 4px; text-decoration:none; color:inherit; max-width:340px; transition: background .2s, transform .2s var(--ease-spring); }
.msg-file:hover { background:rgba(0,0,0,.28); transform: translateY(-1px); }
.msg-file-icon { flex-shrink:0; width:36px; height:36px; border-radius:9px; background:linear-gradient(135deg,var(--nx-a2),var(--nx-a3)); display:flex; align-items:center; justify-content:center; }
.msg-file-info { min-width:0; flex:1; }
.msg-file-name { font-size:13.5px; font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.msg-file-size { font-size:11.5px; color:var(--text-secondary); margin-top:2px; }

.msg-reactions { display:flex; flex-wrap:wrap; gap:4px; margin-top:5px; margin-bottom:-2px; }
.reaction-badge { display:inline-flex; align-items:center; gap:4px; padding:2px 8px; background:rgba(var(--nx-a2-rgb),.25); border-radius:12px; font-size:12px; color:#fff; cursor:pointer; user-select:none; animation: bounceIn .4s var(--ease-spring); transition: background .2s, transform .2s var(--ease-spring); }
html[data-theme="light"] .reaction-badge { color:#111827; }
.reaction-badge.mine { background:rgba(var(--nx-a2-rgb),.5); }
.reaction-badge .reaction-av { width:18px; height:18px; border-radius:50%; flex:none; display:flex; align-items:center; justify-content:center; font-size:8px; font-weight:700; color:#fff; overflow:hidden; }
.reaction-badge:has(.reaction-av) { padding-left:3px; }
html[data-theme="light"] .reaction-badge.mine { color:#fff; }
.reaction-badge:hover { background:rgba(var(--nx-a2-rgb),.45); transform: scale(1.12); }
.reaction-badge:active { animation: jelly .5s ease; }

.msg-read-by { display: flex; align-items: center; margin-top: 6px; margin-bottom: -2px; padding-top: 5px; border-top: 1px dashed rgba(255,255,255,.1); cursor: pointer; min-height: 20px; transition: opacity .2s; }
html[data-theme="light"] .msg-read-by { border-color: rgba(0,0,0,.08); }
.msg.own .msg-read-by { border-color: rgba(255,255,255,.14); }
html[data-theme="light"] .msg.own .msg-read-by { border-color: rgba(0,0,0,.1); }
.msg-read-by:hover .read-avatar { transform: translateY(-2px) scale(1.05); }
.msg-read-by .read-avatar { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--nx-a2), var(--nx-a3)); background-size: cover; background-position: center; margin-left: -6px; border: 2px solid rgba(43,82,120,1); transition: transform .25s var(--ease-spring), border-color .2s, z-index .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); position: relative; z-index: 1; text-transform: uppercase; user-select: none; animation: pop .35s var(--ease-spring); }
.msg.other .msg-read-by .read-avatar { border-color: var(--bg-msg-other); }
html[data-theme="light"] .msg.own .msg-read-by .read-avatar { border-color: #d0e7ff; }
html[data-theme="light"] .msg.other .msg-read-by .read-avatar { border-color: #fff; }
.msg-read-by .read-avatar:first-child { margin-left: 0; }
.msg-read-by .read-avatar:hover { transform: scale(1.25) translateY(-2px); z-index: 5; }
.msg-read-by .read-more { margin-left: 2px; padding: 0 6px; height: 20px; border-radius: 10px; background: rgba(255,255,255,.14); font-size: 10.5px; font-weight: 600; color: rgba(255,255,255,.9); line-height: 20px; user-select: none; transition: background .2s; }
html[data-theme="light"] .msg-read-by .read-more { background: rgba(0,0,0,.1); color: #4b5563; }

/* READ MODAL */
.readby-card { max-width: 440px; max-height: 80vh; display: flex; flex-direction: column; }
.readby-card .modal-body { overflow-y: auto; }
.readby-section { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.readby-section:last-child { margin-bottom: 0; }
.readby-title { font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); padding: 2px 4px 8px; border-bottom: 1px solid rgba(255,255,255,.06); margin-bottom: 4px; }
html[data-theme="light"] .readby-title { border-color: rgba(0,0,0,.06); }
.readby-title span { color: var(--text-secondary); margin-left: 4px; }
.readby-list { display: flex; flex-direction: column; gap: 3px; }
.read-by-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.03); transition: background .2s, transform .2s var(--ease-spring); animation: fadeInUp .3s var(--ease-out) both; }
.read-by-item:nth-child(2) { animation-delay: .03s; }
.read-by-item:nth-child(3) { animation-delay: .06s; }
.read-by-item:nth-child(4) { animation-delay: .09s; }
.read-by-item:nth-child(n+5) { animation-delay: .12s; }
html[data-theme="light"] .read-by-item { background: rgba(0,0,0,.03); }
.read-by-item:hover { background: rgba(var(--nx-a2-rgb),.12); transform: translateX(3px); }
.read-by-item-unread { opacity: .6; }
.read-by-info { flex: 1; min-width: 0; }
.read-by-name { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.read-by-time { font-size: 11.5px; color: var(--text-secondary); margin-top: 2px; font-variant-numeric: tabular-nums; }

/* COMMENTS */
.comments-btn { display: block; margin-top: 6px; padding: 4px 10px; background: rgba(var(--nx-a2-rgb),.15); border: none; border-radius: 8px; color: var(--accent-light); font-size: 12.5px; font-weight: 500; cursor: pointer; transition: background .2s, transform .2s var(--ease-spring); }
.comments-btn:hover { background: rgba(var(--nx-a2-rgb),.3); transform: translateY(-1px); }
.comments-btn:active { transform: scale(.97); }
html[data-theme="light"] .comments-btn { background: rgba(59,130,246,.12); }
html[data-theme="light"] .comments-btn:hover { background: rgba(59,130,246,.22); }
.comments-card { max-width: 520px; height: 80vh; display: flex; flex-direction: column; }
.comments-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.comment-post-preview { padding: 10px 14px; background: rgba(var(--nx-a2-rgb),.08); border-left: 3px solid var(--accent); border-radius: 8px; font-size: 13.5px; flex-shrink: 0; }
.comment-post-preview .cp-author { font-weight: 600; color: var(--accent-light); margin-bottom: 3px; }
.comment-post-preview .cp-text { color: var(--text-secondary); white-space: pre-wrap; word-break: break-word; }
.comments-list { display: flex; flex-direction: column; gap: 8px; }
.comments-empty { text-align: center; padding: 24px; color: var(--text-muted); font-size: 13px; }
.comment-item { display: flex; gap: 10px; padding: 6px 0; animation: fadeInUp .3s var(--ease-out) both; }
.comment-item:nth-child(2) { animation-delay: .04s; }
.comment-item:nth-child(3) { animation-delay: .08s; }
.comment-item:nth-child(4) { animation-delay: .12s; }
.comment-item:nth-child(n+5) { animation-delay: .16s; }
.comment-avatar { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: #fff; background: linear-gradient(135deg,var(--nx-a2),var(--nx-a3)); background-size: cover; background-position: center; text-transform: uppercase; }
.comment-body { flex: 1; min-width: 0; }
.comment-author { font-size: 13px; font-weight: 600; color: var(--accent-light); }
.comment-text { font-size: 14px; margin-top: 2px; word-break: break-word; white-space: pre-wrap; }
.comment-time { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.comments-composer { display: flex; gap: 8px; align-items: flex-end; padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.06); }
html[data-theme="light"] .comments-composer { border-color: rgba(0,0,0,.06); }
.comments-composer .composer-input { flex: 1; min-height: 40px; max-height: 120px; }
.comments-composer .composer-send { width: 40px; height: 40px; flex-shrink: 0; }

/* FORMATTING */
.msg-text b { font-weight: 700; }
.msg-text i { font-style: italic; }
.msg-text code { font-family: 'SF Mono', Consolas, 'Courier New', monospace; font-size: 13px; background: rgba(0,0,0,.35); padding: 1px 5px; border-radius: 4px; color: #7dd3fc; }
html[data-theme="light"] .msg-text code { background: rgba(0,0,0,.08); color: #0369a1; }
.msg.own .msg-text code { background: rgba(0,0,0,.4); color: #bae6fd; }
html[data-theme="light"] .msg.own .msg-text code { background: rgba(0,0,0,.06); color: #0c4a6e; }
.msg-text s { text-decoration: line-through; opacity: .8; }
.msg-text .spoiler { background: #2a3542; color: transparent; border-radius: 3px; padding: 0 4px; cursor: pointer; user-select: none; transition: background .25s, color .25s; }
html[data-theme="light"] .msg-text .spoiler { background: #b8bfcc; }
.msg-text .spoiler.open { background: transparent; color: inherit; }
.msg-text .mention { background: rgba(var(--nx-a2-rgb),.3); color: var(--accent-light); padding: 1px 6px; border-radius: 5px; font-weight: 600; cursor: pointer; user-select: none; transition: background .2s, transform .2s; }
.msg-text .mention-me { background: rgba(77,212,125,.3); color: var(--success); animation: breathing 2.5s ease-in-out infinite; }
.msg.own .msg-text .mention { background: rgba(255,255,255,.2); color: #fff; }
html[data-theme="light"] .msg.own .msg-text .mention { background: rgba(0,0,0,.1); color: #111827; }
.msg-text .mention:hover { background: rgba(var(--nx-a2-rgb),.55); transform: scale(1.05); display: inline-block; }

/* POLLS */
.poll-block { padding:10px 12px; background:rgba(0,0,0,.12); border-radius:10px; margin:-2px -4px 4px; min-width:260px; max-width:400px; }
html[data-theme="light"] .poll-block { background:rgba(0,0,0,.04); }
.poll-question { font-weight:600; font-size:14.5px; margin-bottom:10px; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.poll-multiple-badge { font-size:10px; padding:2px 6px; background:rgba(var(--nx-a2-rgb),.3); border-radius:8px; font-weight:500; }
.poll-options { display:flex; flex-direction:column; gap:6px; }
.poll-option { position:relative; display:block; padding:8px 12px; background:rgba(255,255,255,.06); border-radius:8px; cursor:pointer; overflow:hidden; text-align:left; transition: background .2s, transform .2s var(--ease-spring); }
html[data-theme="light"] .poll-option { background:rgba(0,0,0,.05); }
.poll-option:hover { background:rgba(255,255,255,.1); transform: translateX(2px); }
html[data-theme="light"] .poll-option:hover { background:rgba(0,0,0,.08); }
.poll-option:active { transform: scale(.99); }
.poll-option.mine { background:rgba(var(--nx-a2-rgb),.2); }
.poll-option.mine::after { content:'✓'; position:absolute; right:10px; top:50%; transform:translateY(-50%); font-weight:700; color:var(--accent-light); animation: bounceIn .4s var(--ease-spring); }
.poll-option.disabled { cursor:default; opacity:.7; }
.poll-option.disabled:hover { background:rgba(255,255,255,.06); }
.poll-option-fill { position:absolute; left:0; top:0; bottom:0; background:rgba(var(--nx-a2-rgb),.25); transition: width .5s var(--ease-out); }
.poll-option.mine .poll-option-fill { background:rgba(var(--nx-a2-rgb),.4); }
.poll-option-text { position:relative; display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:13.5px; }
.poll-option-label { flex:1; }
.poll-option-count { font-size:12px; color:var(--text-secondary); font-weight:500; white-space:nowrap; }
.poll-footer { font-size:11.5px; color:var(--text-secondary); margin-top:8px; }
.poll-closed { opacity:.85; }
.msg.highlight .msg-bubble { animation: highlightFade 2.4s var(--ease-out); }

/* FIRST UNREAD */
.msg.first-unread { position: relative; margin-top: 22px; }
.msg.first-unread::before { content: 'Непрочитанные'; position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--danger); background: var(--bg-main); padding: 2px 14px; border-radius: 10px; white-space: nowrap; z-index: 1; animation: bounceIn .55s var(--ease-spring); }
.msg.first-unread::after { content: ''; position: absolute; top: -6px; left: 0; right: 0; height: 1.5px; background: linear-gradient(90deg, transparent, rgba(224,83,83,.5), transparent); pointer-events: none; animation: fadeIn .5s ease-out; }

/* SELECT MODE */
.messages.select-mode .msg-bubble { cursor: pointer; }
.messages.select-mode .msg { padding-left: 32px; }
.messages.select-mode .msg::before { content: ''; position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); transition: background .2s, border-color .2s, transform .25s var(--ease-spring); }
html[data-theme="light"] .messages.select-mode .msg::before { border-color:rgba(0,0,0,.25); }
.messages.select-mode .msg:hover::before { border-color: var(--accent-light); }
.messages.select-mode .msg.selected::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 2px rgba(var(--nx-a2-rgb),.3); transform: translateY(-50%) scale(1.15); }
.messages.select-mode .msg.selected .msg-bubble { outline: 2px solid var(--accent); outline-offset: 2px; }
.select-toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 18px; background: linear-gradient(180deg, rgba(var(--nx-a2-rgb),.18), rgba(var(--nx-a2-rgb),.08)); border-top: 1px solid rgba(var(--nx-a2-rgb),.3); animation: slideUp .3s var(--ease-spring); z-index: 6; }
.select-toolbar-info { flex: 1; font-size: 13.5px; font-weight: 600; color: var(--accent-light); }
.select-toolbar-info span { font-size: 15px; }
.select-toolbar-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; background: rgba(255,255,255,.08); color: #fff; font-size: 13.5px; font-weight: 500; transition: background .2s, transform .2s var(--ease-spring); }
html[data-theme="light"] .select-toolbar-btn { background: rgba(0,0,0,.08); color:#111827; }
.select-toolbar-btn:hover { background: rgba(255,255,255,.16); transform: translateY(-1px); }
html[data-theme="light"] .select-toolbar-btn:hover { background: rgba(0,0,0,.14); }
.select-toolbar-btn:active { transform: scale(.96); }
.select-toolbar-btn.danger { background: rgba(224,83,83,.2); color: #ff9a9a; }
.select-toolbar-btn.danger:hover { background: rgba(224,83,83,.35); }

/* TYPING + COMPOSER */
.typing-indicator { display:flex; align-items:center; gap:10px; padding:2px 28px 6px; font-size:12.5px; color:var(--text-secondary); animation: fadeIn .25s ease-out; }
.typing-dots { display:inline-flex; gap:4px; padding:8px 12px; background:var(--bg-msg-other); border-radius:14px; }
.typing-dots i { display:block; width:6px; height:6px; background:var(--text-secondary); border-radius:50%; animation: typingWave 1.4s ease-in-out infinite; }
.typing-dots i:nth-child(2) { animation-delay:.15s; }
.typing-dots i:nth-child(3) { animation-delay:.3s; }
.attach-preview, .reply-preview { display:flex; align-items:center; gap:12px; padding:10px 20px; background:rgba(var(--v-rgb),.6); border-top:1px solid rgba(255,255,255,.05); animation: slideUp .3s var(--ease-spring); position:relative; }
html[data-theme="light"] .attach-preview, html[data-theme="light"] .reply-preview { background:rgba(229,231,235,.7); border-color:rgba(0,0,0,.05); }
.attach-preview-body { flex:1; min-width:0; display:flex; align-items:center; gap:12px; }
.attach-preview-body img { max-height:60px; max-width:80px; object-fit:cover; border-radius:8px; animation: fadeInScale .3s var(--ease-spring); }
.attach-preview-body video { max-height:60px; max-width:100px; border-radius:8px; }
.attach-preview-info { min-width:0; }
.attach-preview-name { font-size:13.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.attach-preview-size { font-size:11.5px; color:var(--text-secondary); margin-top:2px; }
.attach-uploading { font-size:13.5px; color:var(--text-secondary); }
.attach-progress { position:absolute; left:0; right:0; bottom:0; height:3px; background:rgba(128,128,128,.2); }
.attach-progress-bar { height:100%; width:0%; background:linear-gradient(90deg,var(--nx-a2),var(--nx-a3),var(--nx-a2)); background-size: 200% 100%; animation: gradientShift 2s linear infinite; transition: width .3s var(--ease-out); }
.reply-preview-body { flex:1; min-width:0; border-left:3px solid var(--accent); padding-left:10px; }
.reply-preview-author { font-size:12px; font-weight:600; color:var(--accent-light); }
.reply-preview-text { font-size:13px; color:var(--text-secondary); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.composer-wrap { position:relative; }
.comments-toggle { display:flex; align-items:center; gap:8px; padding:8px 20px; background:var(--bg-sidebar); border-top:1px solid rgba(255,255,255,.05); font-size:13px; color:var(--text-secondary); cursor:pointer; animation: slideDown .3s var(--ease-spring); transition: background .2s; }
html[data-theme="light"] .comments-toggle { border-color:rgba(0,0,0,.05); }
.comments-toggle:hover { background: var(--bg-hover); }
.comments-toggle input { accent-color:var(--accent); width:16px; height:16px; cursor:pointer; transition: transform .15s var(--ease-spring); }
.comments-toggle input:active { transform: scale(1.15); }
.composer { display:flex; align-items:flex-end; gap:6px; padding:12px 18px 16px; background:linear-gradient(180deg, transparent 0%, rgba(0,0,0,.18) 100%); position:relative; }
html[data-theme="light"] .composer { background:linear-gradient(180deg, transparent 0%, rgba(0,0,0,.03) 100%); }
.composer-btn { flex-shrink:0; display:flex; align-items:center; justify-content:center; width:42px; height:42px; border-radius:50%; background:var(--bg-input); color:var(--text-secondary); font-size:20px; transition: background .25s, color .25s, transform .25s var(--ease-spring); }
.composer-btn:hover { background:var(--bg-hover); color:var(--text-primary); transform: scale(1.08) rotate(-5deg); }
.composer-btn:active { transform: scale(.92); }
.composer-input { flex:1; min-height:42px; max-height:180px; padding:11px 16px; background:var(--bg-input); border:1.5px solid transparent; border-radius:22px; color:var(--text-primary); font-size:14.5px; line-height:1.4; outline:none; resize:none; overflow-y:auto; transition: border-color .25s, box-shadow .25s, height .15s ease; }
.composer-input::placeholder { color:var(--text-muted); }
.composer-input:focus { border-color:rgba(var(--nx-a2-rgb),.5); box-shadow: 0 0 0 3px rgba(var(--nx-a2-rgb),.12); }
.composer-input:disabled { opacity:.6; cursor:not-allowed; }
.composer-send { flex-shrink:0; display:flex; align-items:center; justify-content:center; width:42px; height:42px; border-radius:50%; background:linear-gradient(135deg,var(--nx-a2),var(--nx-a3)); background-size: 200% 200%; color:#fff; font-size:18px; box-shadow:0 4px 14px rgba(var(--nx-a2-rgb),.35); transition: transform .25s var(--ease-spring), filter .2s, box-shadow .25s; animation: bounceIn .4s var(--ease-spring); }
.composer-send:hover { filter:brightness(1.15); transform: scale(1.1) rotate(-3deg); box-shadow: 0 8px 22px rgba(var(--nx-a2-rgb),.55); animation: gradientShift 2s ease infinite; }
.composer-send:active { transform: scale(.9); }
.composer-mic { flex-shrink:0; display:flex; align-items:center; justify-content:center; width:42px; height:42px; border-radius:50%; background:var(--bg-input); color:var(--text-secondary); transition: background .25s, color .25s, transform .25s var(--ease-spring); }
.composer-mic:hover { background:var(--bg-hover); color:var(--text-primary); transform: scale(1.08); }
.composer-mic:active { transform: scale(.92); }
.composer.recording { gap:12px; }
.rec-cancel, .rec-stop { flex-shrink:0; width:42px; height:42px; border-radius:50%; display:flex; align-items:center; justify-content:center; color:#fff; transition: background .2s, transform .2s var(--ease-spring); }
.rec-cancel { background:rgba(224,83,83,.25); }
.rec-cancel:hover { background:rgba(224,83,83,.4); transform: scale(1.06); }
.rec-stop { background:linear-gradient(135deg,var(--nx-a2),var(--nx-a3)); box-shadow:0 4px 14px rgba(var(--nx-a2-rgb),.35); }
.rec-stop:hover { filter:brightness(1.15); transform: scale(1.06); }
.rec-dot { flex-shrink:0; width:10px; height:10px; border-radius:50%; background:var(--danger); animation: recPulse 1s infinite; }
.rec-timer { font-size:15px; font-weight:600; color:var(--text-primary); min-width:52px; font-variant-numeric:tabular-nums; }
.rec-waves { flex:1; display:flex; align-items:center; gap:2px; height:32px; overflow:hidden; }
.rec-waves span { display:block; width:3px; border-radius:2px; background:var(--accent-light); animation: fadeIn .15s ease-out; }
.display-mode-btn { flex-shrink:0; width:42px; height:42px; border-radius:50%; background:transparent; display:flex; align-items:center; justify-content:center; transition: transform .25s var(--ease-spring); position:relative; }
.display-mode-btn:hover { transform: scale(1.12); }
.display-mode-btn::after { content:''; position:absolute; inset:2px; border-radius:50%; border:2px solid var(--accent); opacity:0; transition: opacity .25s; }
.display-mode-btn.channel-mode::after { opacity:1; animation: glowPulse 2s infinite; }
.display-mode-avatar { width:34px; height:34px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:13px; color:#fff; background:linear-gradient(135deg,var(--nx-a2),var(--nx-a3)); background-size:cover; background-position:center; text-transform:uppercase; }
.display-mode-avatar.nexus-avatar { background:linear-gradient(135deg,var(--nx-a2),#8b5cf6); }
.display-mode-menu { position:absolute; bottom:76px; right:120px; min-width:240px; padding:6px; background:var(--bg-panel); border:1px solid rgba(255,255,255,.08); border-radius:12px; box-shadow:var(--shadow-lg); z-index:60; animation: ctxPop .25s var(--ease-spring); }
html[data-theme="light"] .display-mode-menu { border-color:rgba(0,0,0,.08); }
.display-mode-item { display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:8px; cursor:pointer; transition: background .2s, transform .2s var(--ease-spring); }
.display-mode-item:hover { background:rgba(var(--nx-a2-rgb),.15); transform: translateX(3px); }
.display-mode-item.active { background:rgba(var(--nx-a2-rgb),.25); }
.display-mode-item-avatar { width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:14px; color:#fff; background:linear-gradient(135deg,var(--nx-a2),var(--nx-a3)); background-size:cover; background-position:center; text-transform:uppercase; flex-shrink:0; }
.display-mode-item-avatar.nexus-avatar { background:linear-gradient(135deg,var(--nx-a2),#8b5cf6); }
.display-mode-item-info { flex:1; min-width:0; }
.display-mode-item-title { font-size:14px; font-weight:500; }
.display-mode-item-sub { font-size:12px; color:var(--text-secondary); margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* EMOJI */
.emoji-picker { position:absolute; bottom:76px; left:60px; width:340px; max-height:360px; display:flex; flex-direction:column; background:rgba(var(--v-rgb),.97); border:1px solid rgba(255,255,255,.08); border-radius:14px; box-shadow:var(--shadow-lg); overflow:hidden; z-index:50; animation: slideUp .3s var(--ease-spring); }
html[data-theme="light"] .emoji-picker { background:#fff; border-color:rgba(0,0,0,.08); }
.emoji-tabs { display:flex; padding:6px 6px 0; gap:2px; border-bottom:1px solid rgba(255,255,255,.06); overflow-x:auto; scrollbar-width:none; }
.emoji-tabs::-webkit-scrollbar { display:none; }
html[data-theme="light"] .emoji-tabs { border-color:rgba(0,0,0,.06); }
.emoji-tab { padding:8px 12px; font-size:12.5px; color:var(--text-secondary); border-bottom:2px solid transparent; white-space:nowrap; transition: color .2s, border-color .2s, transform .15s; background:none; border-top:none; border-left:none; border-right:none; cursor:pointer; }
.emoji-tab.active { color:var(--accent-light); border-bottom-color:var(--accent-light); }
.emoji-tab:hover { color:var(--text-primary); transform: translateY(-1px); }
.emoji-grid { flex:none; height:134px; overflow-y:auto; display:grid; grid-template-columns:repeat(8, 1fr); grid-auto-rows:38px; align-content:start; gap:2px; padding:8px; }
.emoji-grid .emoji-cell { aspect-ratio:auto; height:38px; }
.emoji-cell { aspect-ratio:1; display:flex; align-items:center; justify-content:center; font-size:22px; border-radius:6px; cursor:pointer; transition: background .15s, transform .2s var(--ease-spring); animation: fadeInScale .25s var(--ease-spring) both; }
.emoji-cell:nth-child(2) { animation-delay: .01s; }
.emoji-cell:nth-child(3) { animation-delay: .02s; }
.emoji-cell:nth-child(4) { animation-delay: .03s; }
.emoji-cell:nth-child(5) { animation-delay: .04s; }
.emoji-cell:nth-child(n+6) { animation-delay: .05s; }
.emoji-cell:hover { background:rgba(255,255,255,.1); animation: jelly .55s ease; }
html[data-theme="light"] .emoji-cell:hover { background:rgba(0,0,0,.08); }
.emoji-cell:active { transform: scale(.9); }

/* MENTION */
.mention-popup { position: absolute; bottom: 76px; left: 16px; width: min(360px, calc(100% - 32px)); max-height: 280px; overflow-y: auto; background: var(--bg-panel); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 4px; z-index: 60; animation: slideUp .3s var(--ease-spring); }
html[data-theme="light"] .mention-popup { border-color: rgba(0,0,0,.08); }
.mention-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; transition: background .15s, transform .15s; animation: fadeInUp .25s var(--ease-out) both; }
.mention-item:hover, .mention-item.active { background: rgba(var(--nx-a2-rgb),.2); transform: translateX(2px); }
.mention-item .mention-avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 12px; background-size: cover; background-position: center; background-color: var(--nx-a2); flex-shrink: 0; text-transform: uppercase; }
.mention-item .mention-info { min-width: 0; flex: 1; }
.mention-item .mention-name { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.mention-item .mention-username { font-size: 11.5px; color: var(--text-secondary); margin-top: 1px; }

/* MODALS */
.modal { position:fixed; inset:0; z-index:1000; display:flex; align-items:center; justify-content:center; padding:20px; animation: fadeIn .25s ease; }
.modal-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.6); backdrop-filter:blur(6px); animation: fadeIn .3s ease; }
html[data-theme="light"] .modal-backdrop { background:rgba(0,0,0,.35); }
.modal-card { position:relative; z-index:1; width:100%; max-width:440px; background:rgba(var(--v-rgb),.98); border:1px solid rgba(255,255,255,.08); border-radius:var(--radius-lg); box-shadow:var(--shadow-lg); overflow:hidden; animation: popIn .35s var(--ease-spring); display:flex; flex-direction:column; max-height:90vh; }
html[data-theme="light"] .modal-card { background:#fff; border-color:rgba(0,0,0,.08); }
.modal-header { display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid rgba(255,255,255,.06); }
html[data-theme="light"] .modal-header { border-color:rgba(0,0,0,.06); }
.modal-header h3 { font-size:16px; font-weight:600; }
.modal-body { padding:20px; display:flex; flex-direction:column; gap:16px; overflow-y:auto; }
.modal-footer { display:flex; gap:10px; padding:14px 20px; border-top:1px solid rgba(255,255,255,.06); justify-content:flex-end; flex-wrap:wrap; }
html[data-theme="light"] .modal-footer { border-color:rgba(0,0,0,.06); }

.profile-view-block { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px 0 8px; }
.profile-view-block .avatar-xl { box-shadow: 0 8px 28px rgba(0,0,0,.35); border: 3px solid rgba(var(--nx-a2-rgb),.25); animation: popIn .5s var(--ease-spring); }
.profile-view-name { font-size: 22px; font-weight: 700; text-align: center; margin-top: 4px; word-break: break-word; animation: fadeInUp .5s var(--ease-out) .1s both; }
.profile-view-bio { padding: 14px 18px; background: rgba(255,255,255,.03); border-radius: 12px; font-size: 14px; color: var(--text-secondary); line-height: 1.5; text-align: center; word-break: break-word; white-space: pre-wrap; animation: fadeInUp .5s var(--ease-out) .15s both; }
html[data-theme="light"] .profile-view-bio { background: rgba(0,0,0,.04); }
.profile-view-block .profile-username { font-size: 13px; color: var(--text-muted); animation: fadeInUp .5s var(--ease-out) .1s both; }
.profile-avatar-block { display:flex; flex-direction:column; align-items:center; gap:10px; margin-bottom:8px; }
.profile-avatar-wrap { position:relative; cursor:pointer; border-radius:50%; overflow:hidden; transition: transform .3s var(--ease-spring); }
.profile-avatar-wrap:hover { transform: scale(1.05); }
.profile-avatar-overlay { position:absolute; inset:0; border-radius:50%; background:rgba(0,0,0,.55); display:flex; align-items:center; justify-content:center; opacity:0; transition: opacity .3s; color:#fff; font-size:28px; }
.profile-avatar-wrap:hover .profile-avatar-overlay { opacity:1; }
.profile-username { font-size:13px; color:var(--text-secondary); }
.user-profile-name { font-size:18px; font-weight:600; }
.user-profile-bio { padding:10px 14px; background:rgba(255,255,255,.03); border-radius:10px; font-size:14px; color:var(--text-secondary); }
html[data-theme="light"] .user-profile-bio { background:rgba(0,0,0,.04); }
.user-profile-status { font-size:13px; }
.user-profile-status.online { color:var(--success); }
.user-profile-since { font-size:12.5px; color:var(--text-muted); }
.member-picker { display:flex; flex-direction:column; gap:4px; max-height:200px; overflow-y:auto; padding:4px; background:rgba(0,0,0,.2); border-radius:10px; }
html[data-theme="light"] .member-picker { background:rgba(0,0,0,.04); }
.member-pick { display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:8px; cursor:pointer; transition: background .2s, transform .2s var(--ease-spring); }
.member-pick:hover { background:rgba(255,255,255,.05); transform: translateX(2px); }
html[data-theme="light"] .member-pick:hover { background:rgba(0,0,0,.04); }
.member-pick.selected { background:rgba(var(--nx-a2-rgb),.15); }
.member-pick .avatar { width:32px; height:32px; font-size:13px; }
.member-pick-name { flex:1; font-size:14px; }
.member-pick-check { width:18px; height:18px; border-radius:50%; border:2px solid rgba(255,255,255,.2); display:flex; align-items:center; justify-content:center; font-size:12px; color:#fff; transition: background .25s, border-color .25s, transform .25s var(--ease-spring); }
html[data-theme="light"] .member-pick-check { border-color:rgba(0,0,0,.2); }
.member-pick.selected .member-pick-check { background:var(--accent); border-color:var(--accent); transform: scale(1.15); animation: bounceIn .4s var(--ease-spring); }
.info-section-title { font-size:12px; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:.6px; padding-top:8px; }
.info-members { display:flex; flex-direction:column; gap:4px; }
.info-member { display:flex; align-items:center; gap:10px; padding:6px 8px; border-radius:8px; animation: fadeInUp .3s var(--ease-out) both; transition: background .2s, transform .2s var(--ease-spring); cursor:pointer; }
.info-member:nth-child(2) { animation-delay: .03s; }
.info-member:nth-child(3) { animation-delay: .06s; }
.info-member:nth-child(4) { animation-delay: .09s; }
.info-member:nth-child(n+5) { animation-delay: .12s; }
.info-member:hover { background:rgba(255,255,255,.04); transform: translateX(3px); }
html[data-theme="light"] .info-member:hover { background:rgba(0,0,0,.03); }
.info-member .avatar { width:34px; height:34px; font-size:13px; }
.info-member-info { flex:1; min-width:0; }
.info-member-name { font-size:14px; font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:flex; align-items:center; gap:4px; }
.info-member-role { font-size:11.5px; color:var(--text-muted); }
.info-member-role.owner { color:var(--warning); }
.info-member-role.deputy { color:var(--nx-l); }
.info-member-role.admin { color:var(--accent-light); }
.info-member-role.member, .info-member-role.subscriber { color:var(--text-muted); }
.info-member-status { font-size:11px; }
.info-member-status.online { color: var(--success); }
.info-member-status.offline { color: var(--text-muted); }
.info-member-actions { display:flex; gap:4px; }
.info-name { font-size:18px; font-weight:600; }
.info-name-row { display:flex; align-items:center; gap:8px; }
.info-desc { font-size:13px; color:var(--text-secondary); text-align:center; }
.invite-link-box { display:flex; gap:8px; }
.invite-link-box input { flex:1; font-size:13px; padding:10px 12px; }
.info-tabs { display: flex; gap: 4px; padding: 4px; background: rgba(0,0,0,.25); border-radius: var(--radius-md); margin-bottom: 8px; }
html[data-theme="light"] .info-tabs { background: rgba(0,0,0,.05); }
.info-tab { flex: 1; padding: 8px 12px; font-size: 13.5px; color: var(--text-secondary); border-radius: 7px; transition: background .2s, color .2s, transform .15s; }
.info-tab:hover { transform: translateY(-1px); }
.info-tab.active { background: rgba(var(--nx-a2-rgb),.25); color: var(--text-primary); font-weight: 500; }
.info-panel { animation: fadeInUp .3s var(--ease-out); }
.media-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.media-item { aspect-ratio: 1; border-radius: 8px; overflow: hidden; cursor: pointer; background: rgba(0,0,0,.3); transition: transform .3s var(--ease-spring), box-shadow .3s; animation: fadeInScale .4s var(--ease-spring) backwards; }
.media-item:nth-child(1){animation-delay:0ms}.media-item:nth-child(2){animation-delay:40ms}.media-item:nth-child(3){animation-delay:80ms}.media-item:nth-child(4){animation-delay:120ms}.media-item:nth-child(5){animation-delay:160ms}.media-item:nth-child(6){animation-delay:200ms}.media-item:nth-child(n+7){animation-delay:240ms}
.media-item:hover { transform: scale(1.06); box-shadow: 0 10px 25px rgba(0,0,0,.5); }
.media-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-empty { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 13.5px; }
.settings-section-title { font-size:12.5px; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:.6px; margin-top:8px; }
.settings-note { font-size:12.5px; color:var(--warning); padding:8px 12px; background:rgba(245,166,35,.08); border-radius:8px; border-left:3px solid var(--warning); }
.settings-check { display:flex; align-items:center; gap:10px; padding:10px 12px; background:rgba(255,255,255,.03); border-radius:10px; cursor:pointer; transition: background .2s, transform .15s; }
html[data-theme="light"] .settings-check { background:rgba(0,0,0,.04); }
.settings-check:hover { background:rgba(255,255,255,.06); transform: translateX(2px); }
html[data-theme="light"] .settings-check:hover { background:rgba(0,0,0,.07); }
.settings-check input { width:18px; height:18px; accent-color:var(--accent); cursor:pointer; transition: transform .15s var(--ease-spring); }
.settings-check input:active { transform: scale(1.15); }
.theme-selector { display:grid; grid-template-columns:1fr 1fr 1fr; gap:8px; }
.theme-opt { display:flex; flex-direction:column; gap:8px; padding:8px; border-radius:10px; background:rgba(255,255,255,.03); border:2px solid transparent; transition: border-color .25s, background .2s, transform .25s var(--ease-spring); font-size:12.5px; text-align:center; }
html[data-theme="light"] .theme-opt { background:rgba(0,0,0,.04); }
.theme-opt:hover { background:rgba(255,255,255,.06); transform: translateY(-2px); }
html[data-theme="light"] .theme-opt:hover { background:rgba(0,0,0,.07); }
.theme-opt.active { border-color:var(--accent); box-shadow: 0 0 0 3px rgba(var(--nx-a2-rgb),.15); }
.theme-preview { width:100%; aspect-ratio:16/10; border-radius:8px; border:1px solid rgba(255,255,255,.06); }
html[data-theme="light"] .theme-preview { border-color:rgba(0,0,0,.06); }
.theme-light { background:#f3f4f6; position:relative; }
.theme-light::before { content:''; position:absolute; left:10%; top:20%; width:40%; height:8%; background:#3b82f6; border-radius:3px; }
.theme-light::after { content:''; position:absolute; right:10%; bottom:25%; width:50%; height:12%; background:#d0e7ff; border-radius:3px; }
.theme-dark { background: linear-gradient(135deg, var(--v-1d1d38) 0%, var(--v-1d1d38) 100%); position:relative; }
.theme-dark::before { content:''; position:absolute; left:10%; top:20%; width:40%; height:8%; background:var(--nx-a2); border-radius:3px; }
.theme-dark::after { content:''; position:absolute; right:10%; bottom:25%; width:50%; height:12%; background:var(--nx-a3); border-radius:3px; }
.theme-darker { background: #000; position:relative; }
.theme-darker::before { content:''; position:absolute; left:10%; top:20%; width:40%; height:8%; background:#1a4d73; border-radius:3px; }
.theme-darker::after { content:''; position:absolute; right:10%; bottom:25%; width:50%; height:12%; background:#0f1318; border-radius:3px; }

/* ROLES */
.role-card { max-width: 480px; }
.role-user-line { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: rgba(255,255,255,.04); border-radius: 10px; font-size: 14px; }
html[data-theme="light"] .role-user-line { background:rgba(0,0,0,.04); }
.role-options { display: flex; flex-direction: column; gap: 6px; }
.role-option { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; background: rgba(255,255,255,.03); border: 1.5px solid transparent; border-radius: 10px; cursor: pointer; transition: background .2s, border-color .25s, transform .25s var(--ease-spring); }
html[data-theme="light"] .role-option { background: rgba(0,0,0,.03); }
.role-option:hover { background: rgba(255,255,255,.06); transform: translateY(-2px); }
html[data-theme="light"] .role-option:hover { background: rgba(0,0,0,.06); }
.role-option input[type="radio"] { display: none; }
.role-option:has(input:checked) { border-color: var(--accent); background: linear-gradient(135deg, rgba(var(--nx-a2-rgb),.15), rgba(var(--nx-a2-rgb),.08)); box-shadow: 0 6px 16px rgba(var(--nx-a2-rgb),.25); }
.role-option-body { flex: 1; }
.role-option-title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.role-icon { font-size: 15px; }
.role-option-desc { font-size: 12.5px; color: var(--text-secondary); margin-top: 3px; line-height: 1.4; }
.role-perms-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.role-perms-reset { padding: 4px 10px; font-size: 12px; color: var(--accent-light); background: rgba(var(--nx-a2-rgb),.15); border-radius: 6px; transition: background .2s, transform .2s var(--ease-spring); }
.role-perms-reset:hover { background: rgba(var(--nx-a2-rgb),.3); transform: translateY(-1px); }
.role-perms-hint { font-size: 12.5px; color: var(--text-muted); padding: 8px 12px; background: rgba(var(--nx-a2-rgb),.06); border-left: 3px solid var(--accent); border-radius: 6px; margin-bottom: 12px; line-height: 1.45; }
.perm-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.perm-group-title { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted); font-weight: 600; padding: 4px 4px 2px; }
.perm-check { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; background: rgba(255,255,255,.03); border-radius: 8px; cursor: pointer; font-size: 13.5px; transition: background .2s, transform .15s; }
html[data-theme="light"] .perm-check { background: rgba(0,0,0,.03); }
.perm-check:hover { background: rgba(255,255,255,.06); transform: translateX(2px); }
html[data-theme="light"] .perm-check:hover { background: rgba(0,0,0,.06); }
.perm-check input[type="checkbox"] { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.perm-check span { display: flex; flex-direction: column; gap: 2px; }
.perm-check span b { font-size: 13.5px; font-weight: 500; color: var(--text-primary); }
.perm-check span em { font-size: 12px; font-style: normal; color: var(--text-secondary); line-height: 1.3; }
.star-grant-block { display:flex; flex-direction:column; gap:8px; padding:12px; background:rgba(100,181,239,.08); border:1px solid rgba(100,181,239,.2); border-radius:10px; }
.star-buttons { display:flex; gap:8px; flex-wrap:wrap; }
.star-btn { padding:8px 14px; border-radius:8px; font-size:13.5px; font-weight:500; transition: transform .25s var(--ease-spring), filter .2s, box-shadow .25s; }
.star-btn:hover { transform: translateY(-2px) scale(1.03); filter:brightness(1.15); box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.star-btn:active { transform: scale(.95); }
.star-btn-blue { background:rgba(100,181,239,.2); color:#7dd3fc; }
.star-btn-red { background:rgba(224,83,83,.2); color:#ff8a8a; }
.star-hint { font-size:11.5px; color:var(--text-muted); font-style:italic; }

/* CTX MENU */
.ctx-menu { position:fixed; z-index:1500; min-width:200px; padding:6px; background:rgba(var(--v-rgb),.98); border:1px solid rgba(255,255,255,.08); border-radius:12px; box-shadow:var(--shadow-lg); backdrop-filter:blur(12px); animation: ctxPop .3s var(--ease-spring); }
html[data-theme="light"] .ctx-menu { background:#fff; border-color:rgba(0,0,0,.08); }
.ctx-item { display:flex; align-items:center; gap:10px; width:100%; padding:9px 12px; font-size:14px; color:var(--text-primary); border-radius:8px; text-align:left; transition: background .2s, transform .15s; }
.ctx-item:hover { background:rgba(var(--nx-a2-rgb),.22); transform: translateX(3px); }
.ctx-item:active { transform: scale(.98); }
.ctx-item svg { flex-shrink:0; opacity:.7; transition: opacity .15s; }
.ctx-item:hover svg { opacity: 1; }
.ctx-item.danger { color:#ff8a8a; }
.ctx-item.danger:hover { background:rgba(224,83,83,.18); }
.ctx-call-user { padding:8px 12px 4px; font-size:14px; font-weight:600; color:var(--accent-light); }
.ctx-call-status { padding:0 12px 4px; font-size:12px; color:var(--text-secondary); display:flex; align-items:center; gap:6px; }
.ctx-volume-block { padding:8px 12px; display:flex; flex-direction:column; gap:6px; }
.ctx-volume-block label { font-size:12.5px; color:var(--text-secondary); }
.ctx-volume-block input[type="range"] { width:100%; -webkit-appearance:none; appearance:none; height:4px; background:rgba(255,255,255,.1); border-radius:2px; outline:none; cursor:pointer; }
html[data-theme="light"] .ctx-volume-block input[type="range"] { background:rgba(0,0,0,.1); }
.ctx-volume-block input[type="range"]::-webkit-slider-thumb { -webkit-appearance:none; appearance:none; width:16px; height:16px; border-radius:50%; background:var(--accent-light); cursor:pointer; box-shadow:0 0 8px rgba(var(--nx-a2-rgb),.6); transition: transform .2s var(--ease-spring); }
.ctx-volume-block input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }
.ctx-volume-block input[type="range"]::-moz-range-thumb { width:16px; height:16px; border-radius:50%; background:var(--accent-light); cursor:pointer; border:none; }
.ctx-divider { height:1px; background:rgba(255,255,255,.06); margin:6px 0; }
html[data-theme="light"] .ctx-divider { background:rgba(0,0,0,.06); }
.call-ctx { z-index: 4000 !important; }
.reaction-picker { position:fixed; z-index:1500; display:flex; gap:2px; padding:6px; background:rgba(var(--v-rgb),.98); border:1px solid rgba(255,255,255,.08); border-radius:999px; box-shadow:var(--shadow-lg); backdrop-filter:blur(12px); animation: ctxPop .3s var(--ease-spring); }
html[data-theme="light"] .reaction-picker { background:#fff; border-color:rgba(0,0,0,.08); }
.reaction-cell { width:38px; height:38px; display:flex; align-items:center; justify-content:center; font-size:22px; border-radius:50%; transition: transform .25s var(--ease-spring), background .2s; }
.reaction-cell:hover { background:rgba(255,255,255,.1); transform: scale(1.3) rotate(-8deg); }
html[data-theme="light"] .reaction-cell:hover { background:rgba(0,0,0,.08); }
.reaction-cell:active { transform: scale(1.05); animation: jelly .5s ease; }

/* LIGHTBOX */
.lightbox { position:fixed; inset:0; z-index:2000; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.92); cursor:zoom-out; padding:60px 80px; animation: fadeIn .3s ease; }
.lightbox img { max-width:100%; max-height:100%; object-fit:contain; border-radius:8px; cursor:default; transition: opacity .4s ease, transform .4s var(--ease-spring); animation: fadeInScale .5s var(--ease-spring); }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .25s, transform .25s var(--ease-spring); backdrop-filter: blur(8px); z-index: 2; }
.lightbox-nav:hover { background: rgba(255,255,255,.25); transform: translateY(-50%) scale(1.12); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-counter { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); padding: 6px 14px; background: rgba(0,0,0,.7); border-radius: 20px; font-size: 13px; color: #fff; backdrop-filter: blur(8px); animation: slideUp .3s var(--ease-spring); }

/* ============ CALLS ============ */
.call-screen { position:fixed; inset:0; z-index:3000; display:flex; flex-direction:column; background:#000; overflow:hidden; animation: fadeIn .35s ease; }
.call-bg { position:absolute; inset:0; background: radial-gradient(ellipse at top, #16273a 0%, transparent 60%), radial-gradient(ellipse at bottom, var(--v-1a1a3a) 0%, transparent 60%), #06090f; }
.call-topbar { position:relative; z-index:2; display:flex; align-items:center; justify-content:space-between; padding:14px 20px; background:linear-gradient(180deg, rgba(0,0,0,.6), transparent); animation: slideDown .4s var(--ease-spring); }
.call-topbar-info { display:flex; align-items:center; gap:8px; font-size:14px; font-weight:500; color:#fff; }
.call-topbar-min { width:36px; height:36px; border-radius:8px; display:flex; align-items:center; justify-content:center; color:#fff; background:rgba(255,255,255,.1); font-size:16px; transition: background .2s, transform .2s var(--ease-spring); }
.call-topbar-min:hover { background:rgba(255,255,255,.2); transform: scale(1.08); }
.call-live-dot { width:8px; height:8px; border-radius:50%; background:var(--success); box-shadow:0 0 8px var(--success); animation: pulse 1.6s infinite; }
.call-quality-badge { font-size:10px; letter-spacing:-1px; padding:3px 8px; border-radius:10px; font-weight:600; animation: fadeInScale .4s var(--ease-spring); }
.call-quality-badge.good { color:#4dd47d; background:rgba(77,212,125,.15); }
.call-quality-badge.medium { color:#f5a623; background:rgba(245,166,35,.15); }
.call-quality-badge.bad { color:#e05353; background:rgba(224,83,83,.15); animation: fadeInScale .4s var(--ease-spring), pulse 1.5s infinite; }
.call-grid { flex:1; position:relative; z-index:1; display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); gap:10px; padding:10px; overflow:auto; align-content:start; }
.call-tile { position:relative; background:linear-gradient(135deg,#141a24,#1a212e); border-radius:14px; overflow:hidden; display:flex; align-items:center; justify-content:center; aspect-ratio: 16 / 9; width: 100%; animation: callTileIn .5s var(--ease-spring); transition: box-shadow .3s, transform .3s var(--ease-spring); }
.call-tile:hover { box-shadow:0 0 0 2px rgba(var(--nx-a2-rgb),.4); transform: translateY(-2px); }
.call-tile video { width:100%; height:100%; object-fit:contain; display:block; background:#000; }
.call-tile.local video { transform:scaleX(-1); }
.call-tile.local.sharing video { transform:none; }
.call-tile-name { position:absolute; left:10px; bottom:10px; padding:5px 12px; background:rgba(0,0,0,.7); border-radius:8px; font-size:12.5px; color:#fff; backdrop-filter:blur(6px); font-weight:500; z-index:2; }
.call-tile-sharing { position:absolute; left:10px; top:10px; padding:4px 10px; background:rgba(224,83,83,.85); border-radius:8px; font-size:11.5px; color:#fff; font-weight:600; animation: pulse 2s infinite; z-index:2; }
.call-tile-avatar { width:80px; height:80px; border-radius:50%; font-size:32px; box-shadow:0 8px 24px rgba(0,0,0,.5); position:relative; z-index:1; }
.call-tile-mute { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border-radius: 50%; background: rgba(224, 83, 83, .92); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; line-height: 1; box-shadow: 0 4px 14px rgba(224, 83, 83, .5); animation: muteAppear .4s var(--ease-spring); z-index: 3; overflow: hidden; user-select: none; }
.call-tile-mute::after { content: ''; position: absolute; left: -10%; top: 50%; width: 120%; height: 2.5px; background: #fff; border-radius: 2px; transform: translateY(-50%) rotate(-45deg); box-shadow: 0 0 0 1px rgba(0,0,0,.25); pointer-events: none; }
.call-tile.speaking { box-shadow: 0 0 0 3px #4dd47d, 0 0 26px rgba(77, 212, 125, .55); animation: speakingRingGreen 1.8s ease-in-out infinite; transition: box-shadow .18s ease; }
.call-tile.speaking .call-tile-avatar { animation: speakingAvatarPulse 1.2s ease-in-out infinite; }
.call-tile.screen { background:linear-gradient(135deg,#1e2a3a,#141a24); border:2px solid rgba(var(--nx-a2-rgb),.4); cursor:pointer; transition: border-color .25s, transform .25s var(--ease-spring); }
.call-tile.screen:hover { border-color:rgba(var(--nx-a2-rgb),.9); transform: translateY(-3px) scale(1.01); }
.call-tile.screen .call-tile-screen-preview { width:100%; height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; padding:14px; }
.call-tile-screen-icon { width:56px; height:56px; border-radius:50%; background:linear-gradient(135deg,var(--nx-a2),#8b5cf6); display:flex; align-items:center; justify-content:center; color:#fff; animation: screenPulse 2s infinite; font-size: 26px; }
.call-tile-screen-label { font-size:14px; font-weight:600; color:#fff; text-align:center; }
.call-tile-screen-btn { padding:8px 18px; background:linear-gradient(135deg,var(--nx-a2),var(--nx-a3)); color:#fff; font-size:13px; font-weight:600; border-radius:20px; box-shadow:0 4px 14px rgba(var(--nx-a2-rgb),.4); transition: transform .25s var(--ease-spring), box-shadow .25s; }
.call-tile-screen-btn:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 10px 26px rgba(var(--nx-a2-rgb),.65); }
.call-controls { position:relative; z-index:2; display:flex; justify-content:center; gap:14px; padding:20px 24px 28px; background:linear-gradient(0deg, rgba(0,0,0,.6), transparent); animation: slideUp .4s var(--ease-spring); }
.call-btn { width:56px; height:56px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,.12); color:#fff; transition: background .25s, transform .25s var(--ease-spring); backdrop-filter:blur(10px); }
.call-btn:hover { background:rgba(255,255,255,.25); transform: translateY(-3px) scale(1.05); }
.call-btn:active { transform: scale(.92); }
.call-btn.active { background:rgba(var(--nx-a2-rgb),.65); }
.call-btn.off { background:rgba(224,83,83,.65); }
.call-btn-end { background:var(--danger); }
.call-btn-end:hover { background:#e86f6f; animation: pulse 1s infinite; }
.call-btn-accept { background:var(--success); }
.call-btn-accept:hover { background:#6be092; animation: glowPulse 1.5s infinite; }
.call-mini { position: fixed; right: 20px; bottom: 20px; z-index: 3001; width: 300px; background: rgba(var(--v-rgb),.98); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; user-select: none; animation: popIn .35s var(--ease-spring); }
html[data-theme="light"] .call-mini { background:#fff; border-color:rgba(0,0,0,.1); }
.call-mini.dragging { cursor: grabbing; box-shadow: 0 20px 60px rgba(0,0,0,.7); transform: scale(1.02); }
.call-mini-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: linear-gradient(180deg, rgba(var(--nx-a2-rgb),.18), rgba(var(--nx-a2-rgb),.05)); border-bottom: 1px solid rgba(255,255,255,.06); cursor: grab; touch-action: none; }
html[data-theme="light"] .call-mini-header { border-color:rgba(0,0,0,.06); }
.call-mini-info { display:flex; align-items:center; gap:8px; min-width:0; pointer-events: none; }
.call-mini-title { font-size:13.5px; font-weight:600; color:var(--text-primary); }
.call-mini-status { font-size:11px; color:var(--text-secondary); margin-top:1px; }
.call-mini-avatars { display:flex; pointer-events: none; }
.call-mini-avatars .avatar { width:26px; height:26px; font-size:11px; border:2px solid var(--bg-panel); margin-left:-8px; transition: transform .25s var(--ease-spring); }
.call-mini-avatars .avatar:hover { transform: translateY(-3px) scale(1.15); z-index: 5; }
.call-mini-avatars .avatar:first-child { margin-left:0; }
.call-mini-controls { display:flex; justify-content:center; gap:6px; padding:10px; background:rgba(0,0,0,.2); }
html[data-theme="light"] .call-mini-controls { background:rgba(0,0,0,.03); }
.call-mini-btn { width:38px; height:38px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,.1); color:#fff; font-size:16px; transition: background .2s, transform .25s var(--ease-spring); }
html[data-theme="light"] .call-mini-btn { background:rgba(0,0,0,.1); color:#111827; }
.call-mini-btn:hover { background:rgba(255,255,255,.22); transform: scale(1.12); }
html[data-theme="light"] .call-mini-btn:hover { background:rgba(0,0,0,.18); }
.call-mini-btn.active { background:rgba(var(--nx-a2-rgb),.65); color:#fff; }
.call-mini-btn.off { background:rgba(224,83,83,.65); color:#fff; }
.call-mini-btn.call-mini-end { background:var(--danger); color:#fff; }
.incoming-card { position:relative; z-index:1; display:flex; flex-direction:column; align-items:center; gap:14px; padding:36px 40px; background:rgba(var(--v-rgb),.98); border:1px solid rgba(255,255,255,.08); border-radius:var(--radius-xl); box-shadow:var(--shadow-lg); min-width:300px; animation: popIn .4s var(--ease-spring); }
html[data-theme="light"] .incoming-card { background:#fff; border-color:rgba(0,0,0,.08); }
.call-pulse-ring { position:absolute; top:36px; left:50%; transform:translateX(-50%); width:120px; height:120px; border-radius:50%; background:radial-gradient(circle, rgba(77,212,125,.4), transparent 70%); animation:pulseRing 2s ease-out infinite; pointer-events:none; }
.incoming-name { font-size:20px; font-weight:600; }
.incoming-type { color:var(--text-secondary); font-size:14px; }
.incoming-actions { display:flex; gap:24px; margin-top:10px; }
.incoming-actions .call-btn-accept { animation: pulse 1.5s infinite; }
.screen-viewer { position:fixed; inset:0; z-index:3500; background:rgba(0,0,0,.97); display:flex; flex-direction:column; animation: fadeIn .35s ease; }
.screen-viewer-header { display:flex; align-items:center; justify-content:space-between; padding:14px 20px; background:linear-gradient(180deg, rgba(0,0,0,.6), transparent); color:#fff; position:relative; z-index:2; gap: 12px; animation: slideDown .35s var(--ease-spring); }
.screen-viewer-title { font-size:15px; font-weight:600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen-viewer-btn { width: 40px; height: 40px; border-radius:50%; background:rgba(255,255,255,.15); color:#fff; display:flex; align-items:center; justify-content:center; transition: background .2s, transform .25s var(--ease-spring); }
.screen-viewer-btn:hover { background:rgba(255,255,255,.28); transform: scale(1.1); }
.screen-viewer-close { width:40px; height:40px; border-radius:50%; background:rgba(224,83,83,.85); color:#fff; display:flex; align-items:center; justify-content:center; font-size:18px; transition: background .2s, transform .25s var(--ease-spring); }
.screen-viewer-close:hover { background:#e86f6f; transform: scale(1.1); }
.screen-viewer video { flex:1; width:100%; height:100%; object-fit:contain; background:#000; animation: fadeIn .4s ease; }

/* TOAST */
.toast { position:fixed; bottom:26px; left:50%; transform: translate(-50%, 100px); padding:12px 18px; background:rgba(var(--v-rgb),.96); border:1px solid rgba(255,255,255,.08); border-radius:var(--radius-md); font-size:14px; color:var(--text-primary); box-shadow:var(--shadow-lg); opacity:0; pointer-events:none; transition: transform .45s var(--ease-spring), opacity .3s; z-index:5000; backdrop-filter:blur(12px); max-width:80vw; display: flex; align-items: center; gap: 10px; }
html[data-theme="light"] .toast { background:#fff; border-color:rgba(0,0,0,.08); }
.toast-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; font-size: 15px; flex-shrink: 0; }
.toast-icon:empty { display: none; }
.toast-text { text-align: left; line-height: 1.4; }
.toast.show { transform: translate(-50%, 0); opacity:1; animation: bounceIn .55s var(--ease-spring); }
.toast.success { border-color:rgba(77,212,125,.4); }
.toast.success .toast-icon { color: var(--success); animation: bounceIn .5s var(--ease-spring); }
.toast.error { border-color:rgba(224,83,83,.4); animation: shake .5s ease-in-out; }
.toast.error .toast-icon { color: var(--danger); }
.toast.mention { border-color:rgba(100,181,239,.5); }
.toast.mention .toast-icon { color: var(--star-blue); }

/* POLL CREATE */
.poll-options-list { display:flex; flex-direction:column; gap:6px; }
.poll-option-row { display:flex; gap:6px; align-items:center; animation: fadeInUp .3s var(--ease-out) both; }
.poll-option-input { flex:1; }
.poll-option-remove { flex-shrink:0; width:32px; height:32px; border-radius:50%; background:rgba(224,83,83,.15); color:#ff8a8a; font-size:14px; transition: background .2s, transform .2s var(--ease-spring); }
.poll-option-remove:hover { background:rgba(224,83,83,.3); transform: scale(1.1) rotate(90deg); }
.poll-add-btn { align-self:flex-start; padding:8px 14px; font-size:13px; }

/* SETTINGS */
.settings-window { position: relative; z-index: 1; display: flex; width: min(66vw, 1100px); height: min(66vh, 700px); background: rgba(var(--v-rgb),.98); border: 1px solid rgba(255,255,255,.08); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; animation: popIn .4s var(--ease-spring); }
html[data-theme="light"] .settings-window { background: #fff; border-color: rgba(0,0,0,.08); }
html[data-theme="darker"] .settings-window { background: #050709; }
.settings-sidebar { width: 240px; flex-shrink: 0; background: rgba(0,0,0,.2); border-right: 1px solid rgba(255,255,255,.06); display: flex; flex-direction: column; animation: slideInFromLeft .4s var(--ease-spring); }
html[data-theme="light"] .settings-sidebar { background: rgba(0,0,0,.03); border-color: rgba(0,0,0,.06); }
.settings-sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 14px; border-bottom: 1px solid rgba(255,255,255,.05); }
html[data-theme="light"] .settings-sidebar-header { border-color: rgba(0,0,0,.05); }
.settings-sidebar-header h3 { font-size: 17px; font-weight: 700; }
.settings-nav { flex: 1; overflow-y: auto; padding: 12px 10px; display: flex; flex-direction: column; gap: 4px; }
.settings-nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; color: var(--text-secondary); font-size: 14px; font-weight: 500; text-align: left; transition: background .25s, color .25s, transform .25s var(--ease-spring); background: none; border: none; cursor: pointer; width: 100%; animation: fadeInUp .35s var(--ease-out) both; }
.settings-nav-item:nth-child(1) { animation-delay: .05s; }
.settings-nav-item:nth-child(2) { animation-delay: .1s; }
.settings-nav-item:nth-child(3) { animation-delay: .15s; }
.settings-nav-item:nth-child(4) { animation-delay: .2s; }
.settings-nav-item:nth-child(5) { animation-delay: .25s; }
.settings-nav-item:hover { background: rgba(255,255,255,.06); color: var(--text-primary); transform: translateX(3px); }
html[data-theme="light"] .settings-nav-item:hover { background: rgba(0,0,0,.05); }
.settings-nav-item.active { background: rgba(var(--nx-a2-rgb),.22); color: var(--accent-light); box-shadow: inset 3px 0 0 var(--accent-light); }
.sni-icon { font-size: 17px; flex-shrink: 0; width: 22px; text-align: center; transition: transform .25s var(--ease-spring); }
.settings-nav-item:hover .sni-icon { transform: scale(1.15) rotate(-5deg); }
.settings-nav-item.active .sni-icon { transform: scale(1.2); }
.settings-content { flex: 1; min-width: 0; overflow-y: auto; padding: 32px 40px 40px; }
.settings-section { display: none; }
.settings-section.active { display: block; animation: slideInFromRight .4s var(--ease-spring); }
.settings-section h2 { font-size: 24px; font-weight: 700; margin-bottom: 24px; }
.settings-section .form-group { gap: 10px; margin-bottom: 20px; }
.settings-section .form-input { padding: 14px 16px; font-size: 15px; }
.settings-subtitle { font-size: 16px; font-weight: 600; margin: 4px 0 12px; color: var(--text-primary); }
.settings-divider { height: 1px; background: rgba(255,255,255,.08); margin: 28px 0; }
html[data-theme="light"] .settings-divider { background: rgba(0,0,0,.08); }
.settings-hint { font-size: 12.5px; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }
.settings-list { display: flex; flex-direction: column; gap: 8px; }
.settings-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.settings-empty { padding: 40px 20px; text-align: center; color: var(--text-muted); font-size: 13.5px; }
.settings-avatar-row { display: flex; align-items: center; gap: 24px; padding: 20px 24px; background: rgba(255,255,255,.03); border-radius: 14px; margin-bottom: 28px; animation: fadeInUp .4s var(--ease-out) both; }
html[data-theme="light"] .settings-avatar-row { background: rgba(0,0,0,.03); }
.settings-avatar-hint { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.settings-range { width: 100%; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 3px; background: rgba(255,255,255,.1); outline: none; cursor: pointer; margin-top: 8px; transition: background .2s; }
html[data-theme="light"] .settings-range { background: rgba(0,0,0,.12); }
.settings-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(135deg, var(--nx-a2), var(--nx-a3)); cursor: pointer; box-shadow: 0 2px 8px rgba(var(--nx-a2-rgb),.5); transition: transform .25s var(--ease-spring), box-shadow .2s; }
.settings-range::-webkit-slider-thumb:hover { transform: scale(1.25); box-shadow: 0 4px 14px rgba(var(--nx-a2-rgb),.75); }
.settings-range::-webkit-slider-thumb:active { transform: scale(1.15); }
.settings-range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(135deg, var(--nx-a2), var(--nx-a3)); cursor: pointer; border: none; box-shadow: 0 2px 8px rgba(var(--nx-a2-rgb),.5); }
.settings-preview { padding: 18px; background: var(--bg-main); border-radius: 12px; border: 1px solid rgba(255,255,255,.06); display: flex; flex-direction: column; gap: var(--preview-gap, 3px); min-height: 150px; font-size: var(--preview-font-size, 15px); margin-top: 8px; transition: gap .25s ease, font-size .25s ease; }
html[data-theme="light"] .settings-preview { border-color: rgba(0,0,0,.06); }
.sp-msg { display: flex; transition: transform .25s var(--ease-spring); }
.sp-msg.sp-own { justify-content: flex-end; }
.sp-bubble { max-width: 70%; padding: 7px 12px; border-radius: 14px; font-size: var(--preview-font-size, 15px); line-height: 1.4; word-wrap: break-word; }
.sp-msg.sp-other .sp-bubble { background: var(--bg-msg-other); color: #eaeef2; border-bottom-left-radius: 4px; }
.sp-msg.sp-own .sp-bubble { background: linear-gradient(135deg,var(--nx-a3),var(--nx-a3)); color: #fff; border-bottom-right-radius: 4px; }
html[data-theme="light"] .sp-msg.sp-other .sp-bubble { color: #111827; border: 1px solid rgba(0,0,0,.06); }
html[data-theme="light"] .sp-msg.sp-own .sp-bubble { background: linear-gradient(135deg,#d0e7ff,#c7e0fb); color: #111827; }
.settings-email-block { display: flex; flex-direction: column; gap: 16px; }
.settings-email-status { display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: rgba(255,255,255,.04); font-size: 13.5px; color: var(--text-secondary); align-self: flex-start; transition: background .25s, color .25s; animation: fadeInUp .35s var(--ease-out) both; }
html[data-theme="light"] .settings-email-status { background: rgba(0,0,0,.04); }
.settings-email-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; transition: background .3s, box-shadow .3s; }
.settings-email-status.attached { background: rgba(77,212,125,.12); color: var(--success); animation: fadeInUp .35s var(--ease-out), glowPulse 2.5s infinite; }
.settings-email-status.attached .settings-email-dot { background: var(--success); box-shadow: 0 0 8px var(--success); animation: breathing 2s ease-in-out infinite; }
.settings-email-row { display: flex; gap: 10px; align-items: stretch; }
.settings-email-row input { flex: 1; }
.settings-email-row .btn-primary { padding: 12px 20px; white-space: nowrap; }
.settings-devices { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.device-item { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); border-radius: 12px; transition: background .25s, border-color .25s, transform .25s var(--ease-spring); animation: fadeInUp .4s var(--ease-out) both; }
.device-item:nth-child(1) { animation-delay: 0ms; }
.device-item:nth-child(2) { animation-delay: 60ms; }
.device-item:nth-child(3) { animation-delay: 120ms; }
.device-item:nth-child(4) { animation-delay: 180ms; }
.device-item:nth-child(5) { animation-delay: 240ms; }
.device-item:nth-child(n+6) { animation-delay: 300ms; }
.device-item:hover { transform: translateX(3px); background: rgba(255,255,255,.05); }
html[data-theme="light"] .device-item { background: rgba(0,0,0,.02); border-color: rgba(0,0,0,.06); }
.device-item.current { border-color: rgba(var(--nx-a2-rgb),.5); background: rgba(var(--nx-a2-rgb),.08); }
html[data-theme="light"] .device-item.current { background: rgba(var(--nx-a2-rgb),.06); }
.device-icon { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, var(--nx-a2), var(--nx-a3)); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; transition: transform .25s var(--ease-spring); }
.device-item:hover .device-icon { transform: scale(1.08) rotate(-3deg); }
.device-icon.mobile { background: linear-gradient(135deg, #8b5cf6, var(--nx-l)); }
.device-icon.desktop { background: linear-gradient(135deg, var(--nx-a2), var(--nx-a3)); }
.device-icon.tablet { background: linear-gradient(135deg, #14b8a6, #2dd4bf); }
.device-info { flex: 1; min-width: 0; }
.device-name { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.device-current-badge { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 8px; background: rgba(77,212,125,.2); color: var(--success); text-transform: uppercase; letter-spacing: .4px; animation: pulse 2s infinite; }
.device-meta { font-size: 12.5px; color: var(--text-secondary); margin-top: 4px; line-height: 1.45; }
.device-remove { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: rgba(224,83,83,.15); color: #ff8a8a; font-size: 16px; transition: background .2s, transform .25s var(--ease-spring); }
.device-remove:hover { background: rgba(224,83,83,.4); transform: scale(1.15) rotate(90deg); }
.device-remove:active { transform: scale(.92); }
.recover-step.hidden { display: none; }
.recover-step { animation: slideInFromRight .4s var(--ease-spring); }
.recover-username-box { padding: 12px 16px; background: rgba(var(--nx-a2-rgb),.1); border-radius: 12px; margin-bottom: 16px; animation: fadeInUp .35s var(--ease-out); }
.recover-username { font-size: 17px; font-weight: 600; color: var(--accent-light); margin-top: 4px; font-family: 'SF Mono', Consolas, monospace; }
.username-status { font-size: 12.5px; margin-top: 6px; line-height: 1.4; min-height: 16px; animation: fadeInUp .3s var(--ease-out); }
.username-status.ok { color: var(--success); animation: fadeInUp .3s var(--ease-out), glowPulse 2s infinite; }
.username-status.taken { color: var(--danger); animation: shake .4s ease-in-out; }
.username-status.checking { color: var(--text-muted); }
.username-status.warn { color: var(--warning); }
.password-strength { margin-top: 8px; animation: fadeInUp .3s var(--ease-out); }
.password-strength-bar { height: 5px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; }
html[data-theme="light"] .password-strength-bar { background: rgba(0,0,0,.08); }
.password-strength-fill { height: 100%; width: 0%; border-radius: 3px; transition: width .5s var(--ease-spring), background .3s ease; }
.password-strength-fill.weak { width: 33%; background: linear-gradient(90deg, #e05353, #ff7a7a); }
.password-strength-fill.medium { width: 66%; background: linear-gradient(90deg, #f5a623, #ffc95c); }
.password-strength-fill.strong { width: 100%; background: linear-gradient(90deg, #4dd47d, #6be092); animation: glowPulse 2s infinite; }
.password-strength-text { font-size: 12.5px; margin-top: 5px; color: var(--text-secondary); transition: color .3s; }
.password-strength-text.weak { color: var(--danger); }
.password-strength-text.medium { color: var(--warning); }
.password-strength-text.strong { color: var(--success); }
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,.03) 25%, rgba(255,255,255,.08) 50%, rgba(255,255,255,.03) 75%); background-size: 400px 100%; animation: shimmer 1.4s linear infinite; border-radius: 6px; }
html[data-theme="light"] .skeleton { background: linear-gradient(90deg, rgba(0,0,0,.03) 25%, rgba(0,0,0,.08) 50%, rgba(0,0,0,.03) 75%); background-size: 400px 100%; }

/* MOBILE */
.mobile-back { display: none; }
@supports (-webkit-touch-callout: none) { input, textarea, .form-input, .composer-input, .search-input { font-size: 16px !important; } }
@media (hover: hover) and (pointer: fine) { .contact:hover { background: var(--bg-hover); } }
@media (max-width: 720px) {
    html, body { font-size: 14px; height: 100dvh; overflow: hidden; }
    .app-screen { grid-template-columns: 1fr !important; grid-template-rows: 1fr; height: 100dvh; }
    .sidebar { display: flex !important; grid-column: 1; grid-row: 1; width: 100%; border-right: none; }
    .sidebar-resizer { display: none; }
    .chat-area { grid-column: 1; grid-row: 1; display: none; }
    .app-screen.chat-open .sidebar   { display: none !important; }
    .app-screen.chat-open .chat-area { display: flex; }
    .mobile-back { display: flex !important; margin-right: 2px; }
    .chat-header { padding: 8px 10px; padding-top: calc(8px + env(safe-area-inset-top, 0px)); gap: 4px; }
    .chat-header-user { padding: 2px 6px 2px 2px; gap: 8px; }
    .chat-header-name { font-size: 15px; }
    .chat-header-actions .icon-btn { width: 32px; height: 32px; }
    .messages { padding: 12px 10px 6px; }
    .msg-bubble { max-width: 82%; font-size: 14.5px; padding: 7px 11px; }
    .msg-avatar { width: 28px; height: 28px; font-size: 11px; }
    .msg-read-by .read-avatar { width: 18px; height: 18px; font-size: 9px; }
    .msg.first-unread { margin-top: 26px; }
    .msg.first-unread::before { font-size: 10px; padding: 2px 10px; }
    .pinned-bar, .chat-search-bar { padding: 6px 10px; }
    .scroll-to-bottom { right: 12px; bottom: 12px; width: 40px; height: 40px; }
    .select-toolbar { padding: 8px 12px; }
    .select-toolbar-btn { padding: 6px 10px; font-size: 12.5px; }
    .composer { padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)) 10px; gap: 4px; }
    .composer-input { font-size: 16px; padding: 9px 14px; min-height: 40px; border-radius: 20px; }
    .composer-btn, .composer-send, .composer-mic, .display-mode-btn { width: 38px; height: 38px; font-size: 18px; }
    .display-mode-avatar { width: 30px; height: 30px; font-size: 12px; }
    .display-mode-menu { right: 8px; left: 8px; min-width: 0; bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
    .modal { padding: 10px; }
    .modal-card { max-width: 100% !important; max-height: 92dvh; }
    .modal-footer button { flex: 1; min-width: 100px; }
    .auth-card { padding: 26px 22px 20px; margin: 12px; }
    .sidebar-header { padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
    .incoming-card { padding: 26px 22px; min-width: auto; width: 100%; max-width: 340px; }
    .call-grid { grid-template-columns: 1fr; padding: 6px; gap: 6px; }
    .call-tile { min-height: 140px; }
    .call-controls { padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px)); gap: 10px; }
    .call-btn { width: 48px; height: 48px; }
    .call-topbar { padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
    .call-mini { width: calc(100% - 20px); left: 10px !important; right: 10px !important; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
    .ctx-menu { min-width: 180px; max-width: calc(100vw - 16px); }
    .reaction-picker { max-width: calc(100vw - 16px); }
    .emoji-picker { left: 8px !important; right: 8px; width: auto; bottom: calc(60px + env(safe-area-inset-bottom, 0px)); max-height: 55dvh; }
    .emoji-grid { grid-template-columns: repeat(7, 1fr); }
    .toast { left: 10px !important; right: 10px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateY(100px); max-width: none; }
    .toast.show { transform: translateY(0); }
    .lightbox { padding: 12px; }
    .lightbox-nav { width: 42px; height: 42px; }
    .lightbox-prev { left: 6px; }
    .lightbox-next { right: 6px; }
    .media-gallery { grid-template-columns: repeat(3, 1fr); }
    .role-card { max-width: 100%; }
    .theme-selector { grid-template-columns: 1fr 1fr; }
    .comments-card { max-width: 100%; height: 90dvh; }
    .mention-popup { left: 8px; right: 8px; width: auto; bottom: calc(60px + env(safe-area-inset-bottom, 0px)); max-height: 45dvh; }
    .readby-card { max-width: 100%; }
    .settings-window { width: 100vw; height: 100dvh; max-width: 100%; max-height: 100%; border-radius: 0; flex-direction: column; }
    .settings-sidebar { width: 100%; border-right: none; border-bottom: 1px solid rgba(255,255,255,.06); flex-shrink: 0; }
    .settings-sidebar-header { padding: 14px 16px; padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
    .settings-nav { flex-direction: row; overflow-x: auto; padding: 10px 12px; gap: 6px; scrollbar-width: none; }
    .settings-nav::-webkit-scrollbar { display: none; }
    .settings-nav-item { flex-shrink: 0; padding: 10px 14px; font-size: 12.5px; white-space: nowrap; flex-direction: column; gap: 4px; }
    .settings-nav-item.active { box-shadow: inset 0 -3px 0 var(--accent-light); }
    .sni-icon { font-size: 18px; }
    .settings-content { padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 0px)); }
    .settings-section h2 { font-size: 20px; margin-bottom: 18px; }
    .settings-section .form-group { margin-bottom: 16px; }
    .settings-avatar-row { flex-direction: column; text-align: center; gap: 14px; padding: 16px; }
    .settings-email-row { flex-direction: column; }
    .settings-email-row .btn-primary { width: 100%; }
    .settings-actions { flex-direction: column; }
    .settings-actions button { width: 100%; }
    .device-item { padding: 12px 14px; gap: 12px; }
    .device-icon { width: 38px; height: 38px; font-size: 18px; }
    .profile-view-name { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ============ ADMIN PANEL v2 (карточки юзеров/групп/каналов) ============ */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 18px; }
.admin-stat { padding: 16px 14px; background: linear-gradient(135deg, rgba(var(--nx-a2-rgb),.10), rgba(139,92,246,.06)); border: 1px solid rgba(var(--nx-a2-rgb),.18); border-radius: 14px; display: flex; flex-direction: column; gap: 6px; transition: transform .3s var(--ease-spring), box-shadow .3s, border-color .3s; position: relative; overflow: hidden; }
.admin-stat::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--nx-a2), #8b5cf6); opacity: .6; transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease-out); }
.admin-stat:hover::before { transform: scaleX(1); }
.admin-stat:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(var(--nx-a2-rgb),.2); border-color: rgba(var(--nx-a2-rgb),.35); }
.admin-stat-value { font-size: 28px; font-weight: 800; color: var(--text-primary); line-height: 1; letter-spacing: -1px; }
.admin-stat-label { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .6px; font-weight: 600; }
.admin-stat.online::before { background: linear-gradient(90deg, #4dd47d, #6be092); opacity: 1; }
.admin-stat.online .admin-stat-value { color: var(--success); }
.admin-stat.admin::before { background: linear-gradient(90deg, #e05353, #ff8a8a); opacity: 1; }
.admin-stat.admin .admin-stat-value { color: #ff8a8a; }
.admin-tabs-new { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 6px; background: rgba(0,0,0,.28); border-radius: 14px; margin-bottom: 16px; animation: fadeInUp .35s var(--ease-out) both; }
html[data-theme="light"] .admin-tabs-new { background: rgba(0,0,0,.05); }
.admin-tab-new { padding: 11px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--text-secondary); background: transparent; border: none; cursor: pointer; transition: all .25s var(--ease-spring); display: flex; align-items: center; justify-content: center; gap: 6px; position: relative; overflow: hidden; }
.admin-tab-new:hover { color: var(--text-primary); background: rgba(255,255,255,.06); transform: translateY(-1px); }
html[data-theme="light"] .admin-tab-new:hover { background: rgba(0,0,0,.05); }
.admin-tab-new.active { background: linear-gradient(135deg, var(--nx-a2), var(--nx-a3)); color: #fff; box-shadow: 0 4px 14px rgba(var(--nx-a2-rgb),.45); transform: none; }
.admin-tab-new.active:hover { transform: none; }
.admin-list { display: flex; flex-direction: column; gap: 8px; }
.admin-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--bg-panel); border: 1px solid rgba(255,255,255,.06); border-radius: 14px; transition: transform .25s var(--ease-spring), box-shadow .25s, border-color .25s; animation: fadeInUp .35s var(--ease-out) both; position: relative; overflow: hidden; }
.admin-card:nth-child(1) { animation-delay: 0ms; }
.admin-card:nth-child(2) { animation-delay: 40ms; }
.admin-card:nth-child(3) { animation-delay: 80ms; }
.admin-card:nth-child(4) { animation-delay: 120ms; }
.admin-card:nth-child(5) { animation-delay: 160ms; }
.admin-card:nth-child(6) { animation-delay: 200ms; }
.admin-card:nth-child(n+7) { animation-delay: 240ms; }
html[data-theme="light"] .admin-card { border-color: rgba(0,0,0,.07); }
.admin-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,.32); border-color: rgba(var(--nx-a2-rgb),.35); }
html[data-theme="light"] .admin-card:hover { box-shadow: 0 12px 32px rgba(0,0,0,.09); }
.admin-card.online { border-color: rgba(77,212,125,.35); background: linear-gradient(135deg, rgba(77,212,125,.05), transparent); }
.admin-card.system { border-color: rgba(var(--nx-a2-rgb),.4); background: linear-gradient(135deg, rgba(var(--nx-a2-rgb),.08), rgba(139,92,246,.04)); }
.admin-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; transition: background .25s; }
.admin-card.online::before { background: linear-gradient(180deg, #4dd47d, #6be092); }
.admin-card.system::before { background: linear-gradient(180deg, var(--nx-a2), #8b5cf6); }
.admin-card-avatar { position: relative; flex-shrink: 0; }
.admin-card-avatar .avatar { width: 46px; height: 46px; font-size: 16px; border: 2px solid rgba(255,255,255,.08); transition: transform .3s var(--ease-spring); box-shadow: 0 4px 12px rgba(0,0,0,.2); }
html[data-theme="light"] .admin-card-avatar .avatar { border-color: rgba(0,0,0,.08); }
.admin-card:hover .admin-card-avatar .avatar { transform: scale(1.08); }
.admin-card-status { position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--bg-panel); background: #4a5563; transition: background .3s, box-shadow .3s; }
.admin-card.online .admin-card-status { background: var(--success); box-shadow: 0 0 10px rgba(77,212,125,.8); animation: onlinePulse 2.2s infinite; }
.admin-card-icon-avatar { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff; flex-shrink: 0; transition: transform .3s var(--ease-spring); box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.admin-card:hover .admin-card-icon-avatar { transform: scale(1.08) rotate(-4deg); }
.admin-card-icon-avatar.group { background: linear-gradient(135deg,var(--nx-a2),#3b7cff); }
.admin-card-icon-avatar.channel { background: linear-gradient(135deg,#8b5cf6,#6d28d9); }
.admin-card-icon-avatar.system { background: linear-gradient(135deg,var(--nx-a2),#8b5cf6); }
.admin-card-body { flex: 1; min-width: 0; }
.admin-card-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; font-weight: 600; color: var(--text-primary); line-height: 1.3; margin-bottom: 4px; }
.admin-card-title .username { color: var(--accent-light); font-weight: 500; font-size: 13px; font-family: 'SF Mono', Consolas, monospace; }
.admin-card-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-secondary); line-height: 1.5; align-items: center; }
.admin-card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.admin-card-meta .meta-icon { opacity: .75; font-size: 13px; line-height: 1; }
.admin-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 8px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; line-height: 1; white-space: nowrap; }
.admin-badge.creator { background: linear-gradient(135deg,#f5a623,#ffc95c); color: #000; box-shadow: 0 2px 10px rgba(245,166,35,.4); animation: glowPulse 3s infinite; }
.admin-badge.admin { background: linear-gradient(135deg,#e05353,#ff8a8a); color: #fff; box-shadow: 0 2px 10px rgba(224,83,83,.4); }
.admin-badge.system { background: linear-gradient(135deg,var(--nx-a2),#8b5cf6); color: #fff; box-shadow: 0 2px 10px rgba(var(--nx-a2-rgb),.4); }
.admin-badge.star { background: rgba(245,166,35,.18); color: #f5a623; border: 1px solid rgba(245,166,35,.4); }
.admin-card-actions { display: flex; gap: 6px; flex-shrink: 0; }
.admin-action-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.04); color: var(--text-secondary); font-size: 16px; cursor: pointer; transition: all .2s var(--ease-spring); display: flex; align-items: center; justify-content: center; position: relative; }
html[data-theme="light"] .admin-action-btn { border-color: rgba(0,0,0,.09); background: rgba(0,0,0,.03); }
.admin-action-btn:hover { transform: translateY(-2px) scale(1.08); background: rgba(var(--nx-a2-rgb),.18); border-color: rgba(var(--nx-a2-rgb),.5); color: var(--accent-light); box-shadow: 0 6px 16px rgba(var(--nx-a2-rgb),.25); }
.admin-action-btn:active { transform: translateY(0) scale(.95); }
.admin-action-btn.danger:hover { background: rgba(224,83,83,.18); border-color: rgba(224,83,83,.5); color: #ff8a8a; box-shadow: 0 6px 16px rgba(224,83,83,.25); }
.admin-action-btn[title]:hover::after { content: attr(title); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); padding: 6px 11px; background: rgba(0,0,0,.92); color: #fff; font-size: 11.5px; border-radius: 7px; white-space: nowrap; pointer-events: none; z-index: 100; animation: fadeInUp .2s var(--ease-out); box-shadow: 0 4px 12px rgba(0,0,0,.3); }
.admin-action-btn[title]:hover::before { content: ''; position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: rgba(0,0,0,.92); z-index: 100; pointer-events: none; }
html[data-theme="light"] .admin-action-btn[title]:hover::after { background: #111; }
.admin-empty { padding: 56px 24px; text-align: center; color: var(--text-muted); font-size: 13.5px; line-height: 1.6; animation: fadeIn .4s; }
.admin-empty-icon { font-size: 52px; margin-bottom: 14px; opacity: .35; display: block; }
.admin-loading { padding: 64px 20px; text-align: center; color: var(--text-secondary); font-size: 13.5px; }
.admin-loading .spinner { width: 36px; height: 36px; border: 3px solid rgba(var(--nx-a2-rgb),.2); border-top-color: var(--accent); border-radius: 50%; margin: 0 auto 14px; animation: spin 0.9s linear infinite; }
.admin-search-wrap { position: relative; margin-bottom: 14px; animation: fadeInUp .3s var(--ease-out) both; }
.admin-search-wrap input { width: 100%; padding: 12px 14px 12px 42px; background: var(--bg-input); border: 1.5px solid transparent; border-radius: 12px; color: var(--text-primary); font-size: 13.5px; outline: none; transition: border-color .25s, box-shadow .25s, background .25s; }
.admin-search-wrap input::placeholder { color: var(--text-muted); }
.admin-search-wrap input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--nx-a2-rgb),.15); background: rgba(0,0,0,.3); }
html[data-theme="light"] .admin-search-wrap input:focus { background: #fff; }
.admin-search-wrap::before { content: '🔍'; position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font-size: 14px; opacity: .5; pointer-events: none; transition: opacity .2s; }
.admin-search-wrap:focus-within::before { opacity: .9; }
.admin-panel { animation: fadeInUp .35s var(--ease-out) both; }
.admin-panel.hidden { display: none; }

/* IN-APP NOTIFICATIONS */
.notif-stack { position: fixed; right: 20px; bottom: 20px; z-index: 4500; display: flex; flex-direction: column-reverse; gap: 8px; max-width: 380px; width: calc(100vw - 40px); pointer-events: none; }
.notif-toast { pointer-events: auto; display: flex; gap: 12px; padding: 12px 14px; background: rgba(var(--v-rgb),.97); border: 1px solid rgba(var(--nx-a2-rgb),.3); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(var(--nx-a2-rgb),.08); cursor: pointer; backdrop-filter: blur(16px) saturate(180%); transition: transform .3s var(--ease-spring), opacity .3s; animation: notifSlideIn .5s var(--ease-spring); position: relative; overflow: hidden; user-select: none; }
html[data-theme="light"] .notif-toast { background: rgba(255,255,255,.98); border-color: rgba(var(--nx-a2-rgb),.4); box-shadow: 0 12px 40px rgba(0,0,0,.15); }
.notif-toast::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--nx-a2), #8b5cf6); }
.notif-toast.call-notif::before { background: linear-gradient(180deg, #4dd47d, #6be092); }
.notif-toast.mention-notif::before { background: linear-gradient(180deg, #f5a623, #ffc95c); }
.notif-toast.closing { animation: notifSlideOut .3s var(--ease-out) forwards; }
.notif-avatar { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; color: #fff; background-size: cover; background-position: center; text-transform: uppercase; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 14px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 6px; margin-bottom: 3px; padding-right: 22px; }
.notif-title .notif-badge { font-size: 9.5px; padding: 2px 7px; border-radius: 6px; background: rgba(var(--nx-a2-rgb),.3); color: var(--accent-light); text-transform: uppercase; letter-spacing: .4px; font-weight: 700; white-space: nowrap; }
.notif-title .notif-badge.call { background: rgba(77,212,125,.25); color: var(--success); }
.notif-title .notif-badge.mention { background: rgba(245,166,35,.25); color: #ffc95c; }
.notif-text { font-size: 13px; color: var(--text-secondary); line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.notif-close { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.08); color: var(--text-secondary); font-size: 12px; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s, background .2s, transform .2s; cursor: pointer; border: none; padding: 0; }
.notif-toast:hover .notif-close { opacity: 1; }
.notif-close:hover { background: rgba(224,83,83,.3); color: #fff; transform: scale(1.15); }
.notif-progress { position: absolute; bottom: 0; left: 0; height: 2px; background: linear-gradient(90deg, var(--nx-a2), #8b5cf6); animation-name: notifProgress; animation-timing-function: linear; animation-fill-mode: forwards; }
.notif-toast.call-notif .notif-progress { background: linear-gradient(90deg, #4dd47d, #6be092); }
.notif-toast.mention-notif .notif-progress { background: linear-gradient(90deg, #f5a623, #ffc95c); }

/* ADMIN USER DETAILS v2 */
.admin-user-card { max-width: 640px; max-height: 90vh; display: flex; flex-direction: column; }
.admin-user-card .modal-body { overflow-y: auto; gap: 0; padding: 0; }
.adm-header { position: relative; padding: 24px 24px 16px; display: flex; gap: 18px; align-items: center; background: linear-gradient(135deg, rgba(var(--nx-a2-rgb),.12), rgba(139,92,246,.06)); border-bottom: 1px solid rgba(255,255,255,.06); animation: fadeInUp .35s var(--ease-out) both; }
html[data-theme="light"] .adm-header { border-color: rgba(0,0,0,.06); }
.adm-header-avatar { width: 76px; height: 76px; font-size: 28px; flex-shrink: 0; border: 3px solid rgba(255,255,255,.1); box-shadow: 0 8px 24px rgba(0,0,0,.3); transition: transform .3s var(--ease-spring); }
.adm-header-avatar:hover { transform: scale(1.05); }
.adm-header-info { flex: 1; min-width: 0; }
.adm-header-name { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adm-header-username { font-size: 13px; color: var(--accent-light); font-family: 'SF Mono', Consolas, monospace; margin-top: 3px; }
.adm-header-uid { font-size: 11px; color: var(--text-muted); margin-top: 4px; font-family: monospace; }
.adm-back { position: absolute; top: 12px; left: 12px; width: 32px; height: 32px; background: rgba(0,0,0,.35); border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff; font-size: 20px; line-height: 1; border: none; transition: background .2s, transform .2s var(--ease-spring); }
.adm-back:hover { background: rgba(var(--nx-a2-rgb),.55); transform: translateX(-2px); }
html[data-theme="light"] .adm-back { background: rgba(0,0,0,.2); }
.adm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; padding: 14px 24px; border-bottom: 1px solid rgba(255,255,255,.06); }
html[data-theme="light"] .adm-stats { border-color: rgba(0,0,0,.06); }
.adm-stat { display: flex; flex-direction: column; gap: 4px; padding: 10px 8px; background: rgba(255,255,255,.03); border-radius: 10px; text-align: center; transition: transform .25s var(--ease-spring), background .2s; }
.adm-stat:hover { transform: translateY(-2px); background: rgba(var(--nx-a2-rgb),.1); }
html[data-theme="light"] .adm-stat { background: rgba(0,0,0,.04); }
.adm-stat.online .adm-stat-value { color: var(--success); }
.adm-stat.warn .adm-stat-value { color: #ff8a8a; }
.adm-stat-value { font-size: 18px; font-weight: 800; line-height: 1; letter-spacing: -0.5px; }
.adm-stat-label { font-size: 10px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .4px; font-weight: 600; }
.adm-info-line { display: flex; gap: 16px; flex-wrap: wrap; padding: 10px 24px 14px; font-size: 12.5px; color: var(--text-secondary); }
.adm-info-line b { color: var(--text-primary); font-weight: 600; }
.adm-section { padding: 12px 24px 16px; border-top: 1px solid rgba(255,255,255,.06); }
html[data-theme="light"] .adm-section { border-color: rgba(0,0,0,.06); }
.adm-section-title { font-size: 11.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .55px; margin-bottom: 10px; }
.adm-email-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: rgba(var(--nx-a2-rgb),.1); border: 1px solid rgba(var(--nx-a2-rgb),.25); border-radius: 12px; animation: fadeInUp .3s var(--ease-out); }
.adm-email-row.empty { background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.06); }
.adm-email-row.pending { background: rgba(245,166,35,.08); border-color: rgba(245,166,35,.3); }
html[data-theme="light"] .adm-email-row.empty { background: rgba(0,0,0,.03); border-color: rgba(0,0,0,.08); }
.adm-email-icon { font-size: 18px; }
.adm-email-value { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-primary); }
.adm-email-unbind { padding: 8px 14px; border-radius: 8px; background: rgba(224,83,83,.18); color: #ff8a8a; font-size: 13px; font-weight: 600; border: 1px solid rgba(224,83,83,.3); cursor: pointer; transition: background .2s, transform .2s var(--ease-spring); }
.adm-email-unbind:hover { background: rgba(224,83,83,.35); color: #fff; transform: translateY(-1px); }
.adm-email-unbind:active { transform: scale(.96); }
.adm-star-block { padding: 14px 24px; border-top: 1px solid rgba(255,255,255,.06); background: linear-gradient(135deg, rgba(245,166,35,.05), rgba(255,201,92,.02)); }
html[data-theme="light"] .adm-star-block { border-color: rgba(0,0,0,.06); }
.adm-star-title { font-size: 11.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .55px; margin-bottom: 10px; }
.adm-star-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-star-btn { flex: 1; min-width: 140px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; font-size: 13.5px; font-weight: 600; color: var(--text-primary); cursor: pointer; transition: background .2s, transform .25s var(--ease-spring), border-color .2s, box-shadow .25s; }
.adm-star-btn:hover:not(.disabled) { background: rgba(245,166,35,.12); border-color: rgba(245,166,35,.4); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(245,166,35,.2); }
.adm-star-btn:active:not(.disabled) { transform: scale(.98); }
.adm-star-btn.on { background: rgba(224,83,83,.15); border-color: rgba(224,83,83,.5); }
.adm-star-btn.on-blue { background: rgba(100,181,239,.15); border-color: rgba(100,181,239,.5); }
.adm-star-btn.disabled { opacity: .5; cursor: not-allowed; }
.adm-star-glyph { font-size: 18px; }
.adm-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px 24px 10px; background: rgba(0,0,0,.18); border-top: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06); }
html[data-theme="light"] .adm-tabs { background: rgba(0,0,0,.03); border-color: rgba(0,0,0,.06); }
.adm-tab { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; background: transparent; border: 1px solid transparent; border-radius: 10px; color: var(--text-secondary); font-size: 11.5px; font-weight: 600; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease-spring); position: relative; }
.adm-tab:hover { color: var(--text-primary); background: rgba(255,255,255,.05); transform: translateY(-1px); }
html[data-theme="light"] .adm-tab:hover { background: rgba(0,0,0,.05); }
.adm-tab.active { background: linear-gradient(135deg, rgba(var(--nx-a2-rgb),.25), rgba(139,92,246,.15)); border-color: rgba(var(--nx-a2-rgb),.5); color: var(--text-primary); box-shadow: 0 6px 18px rgba(var(--nx-a2-rgb),.25); }
.adm-tab-icon { font-size: 18px; }
.adm-tab-label { text-transform: uppercase; letter-spacing: .4px; }
.adm-tab-count { position: absolute; top: 4px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: rgba(255,255,255,.12); color: var(--text-primary); font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.adm-tab.active .adm-tab-count { background: rgba(var(--nx-a2-rgb),.6); color: #fff; }
.adm-panel-wrap { padding: 14px 24px 16px; }
.adm-search-wrap { position: relative; margin-bottom: 10px; }
.adm-search-input { width: 100%; padding: 10px 14px 10px 38px; background: rgba(0,0,0,.25); border: 1.5px solid transparent; border-radius: 10px; color: var(--text-primary); font-size: 13.5px; outline: none; transition: border-color .2s, background .2s, box-shadow .2s; }
html[data-theme="light"] .adm-search-input { background: #fff; color: #111827; border-color: rgba(0,0,0,.08); }
.adm-search-input::placeholder { color: var(--text-muted); }
.adm-search-input:focus { border-color: var(--accent); background: rgba(0,0,0,.35); box-shadow: 0 0 0 3px rgba(var(--nx-a2-rgb),.15); }
html[data-theme="light"] .adm-search-input:focus { background: #fff; }
.adm-search-wrap::before { content: '🔍'; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 13px; opacity: .5; pointer-events: none; }
.adm-panel-list { max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding-right: 4px; }
.adm-panel-list::-webkit-scrollbar { width: 6px; }
.adm-panel-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 3px; }
html[data-theme="light"] .adm-panel-list::-webkit-scrollbar-thumb { background: rgba(0,0,0,.15); }
.adm-group-label { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .55px; color: var(--text-muted); padding: 10px 4px 4px; margin-top: 4px; }
.adm-group-label:first-child { margin-top: 0; }
.adm-entity-row, .adm-item-row, .adm-friend-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; background: rgba(255,255,255,.03); border-radius: 10px; cursor: pointer; transition: background .2s, transform .25s var(--ease-spring); animation: fadeInUp .3s var(--ease-out) both; }
.adm-item-row { cursor: default; }
.adm-friend-row:nth-child(2), .adm-entity-row:nth-child(2) { animation-delay: .03s; }
.adm-friend-row:nth-child(3), .adm-entity-row:nth-child(3) { animation-delay: .06s; }
.adm-friend-row:nth-child(4), .adm-entity-row:nth-child(4) { animation-delay: .09s; }
html[data-theme="light"] .adm-entity-row, html[data-theme="light"] .adm-item-row, html[data-theme="light"] .adm-friend-row { background: rgba(0,0,0,.03); }
.adm-entity-row:hover, .adm-friend-row:hover { background: rgba(var(--nx-a2-rgb),.15); transform: translateX(3px); }
.adm-icon { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 16px; color: #fff; flex-shrink: 0; box-shadow: 0 3px 10px rgba(0,0,0,.2); }
.adm-icon.group { background: linear-gradient(135deg,var(--nx-a2),#3b7cff); }
.adm-icon.channel { background: linear-gradient(135deg,#8b5cf6,#6d28d9); }
.adm-icon.device { background: linear-gradient(135deg,#14b8a6,#2dd4bf); }
.adm-item-body { flex: 1; min-width: 0; }
.adm-item-name { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-item-meta { font-size: 11.5px; color: var(--text-secondary); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; }
.adm-mini-badge { font-size: 9.5px; padding: 2px 7px; border-radius: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.adm-mini-badge.system { background: rgba(var(--nx-a2-rgb),.25); color: #8bb9e8; }
.adm-mini-badge.creator { background: linear-gradient(135deg,#f5a623,#ffc95c); color: #000; }
.adm-role { padding: 3px 9px; border-radius: 8px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .35px; flex-shrink: 0; white-space: nowrap; }
.adm-role.owner { background: rgba(245,166,35,.2); color: #f5a623; }
.adm-role.deputy { background: rgba(167,139,250,.2); color: var(--nx-l); }
.adm-role.admin { background: rgba(100,181,239,.2); color: #64b5ef; }
.adm-role.member, .adm-role.subscriber { background: rgba(255,255,255,.08); color: var(--text-secondary); }
.adm-friend-avatar { width: 34px; height: 34px; font-size: 13px; flex-shrink: 0; border: 1px solid rgba(255,255,255,.06); }
.adm-online-dot { width: 9px; height: 9px; border-radius: 50%; background: #4a5563; flex-shrink: 0; transition: background .3s, box-shadow .3s; }
.adm-online-dot.on { background: var(--success); box-shadow: 0 0 8px var(--success); animation: breathing 2s ease-in-out infinite; }
.adm-empty { padding: 32px 14px; text-align: center; color: var(--text-muted); font-size: 13px; font-style: italic; }
.adm-footer-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; padding: 14px 24px 18px; border-top: 1px solid rgba(255,255,255,.06); background: rgba(0,0,0,.15); }
html[data-theme="light"] .adm-footer-actions { border-color: rgba(0,0,0,.06); background: rgba(0,0,0,.02); }
.adm-footer-actions button { font-size: 13.5px; padding: 10px 16px; }

@media (max-width: 720px) {
    .notif-stack { right: 10px; left: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); width: auto; max-width: none; }
    .notif-toast { padding: 10px 12px; }
    .notif-avatar { width: 38px; height: 38px; font-size: 14px; }
    .notif-title { font-size: 13.5px; }
    .notif-text { font-size: 12.5px; }
    .admin-user-card { max-width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; }
    .adm-header { padding: 20px 16px 14px; }
    .adm-header-avatar { width: 60px; height: 60px; font-size: 22px; }
    .adm-header-name { font-size: 17px; }
    .adm-stats { padding: 12px 16px; grid-template-columns: repeat(3, 1fr); }
    .adm-info-line { padding: 8px 16px 12px; font-size: 12px; }
    .adm-section { padding: 10px 16px 14px; }
    .adm-star-block { padding: 12px 16px; }
    .adm-tabs { padding: 8px 16px; }
    .adm-tab { font-size: 10.5px; padding: 8px 4px; }
    .adm-tab-icon { font-size: 16px; }
    .adm-tab-count { font-size: 9px; min-width: 16px; height: 16px; top: 3px; right: 4px; }
    .adm-panel-wrap { padding: 12px 16px; }
    .adm-panel-list { max-height: 45dvh; }
    .adm-footer-actions { padding: 12px 16px 18px; }
    .adm-footer-actions button { flex: 1; min-width: 120px; }
}

/* ============================================================
   ★★★ ФИКСЫ v53.0 (добавлены в конец — перебивают всё выше)
   ============================================================ */

/* ФИКС 1: Универсальная модалка — поверх ВСЕХ модалок, включая admin-user-modal */
#universal-modal { z-index: 2600 !important; }
#universal-modal .modal-backdrop { z-index: 1; }
#universal-modal .modal-card { z-index: 2; }

/* ФИКС 2: Screen viewer — на весь экран без рамок */
.screen-viewer:fullscreen,
.screen-viewer:-webkit-full-screen {
    padding: 0;
    background: #000;
    border: none;
}
.screen-viewer:fullscreen video,
.screen-viewer:-webkit-full-screen video {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    max-width: none;
    max-height: none;
    border-radius: 0;
}
.screen-viewer:fullscreen .screen-viewer-header,
.screen-viewer:-webkit-full-screen .screen-viewer-header {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 10;
    background: linear-gradient(180deg, rgba(0,0,0,.8), transparent);
    opacity: 0;
    transition: opacity .25s;
    padding: 14px 20px;
}
.screen-viewer:fullscreen:hover .screen-viewer-header,
.screen-viewer:-webkit-full-screen:hover .screen-viewer-header {
    opacity: 1;
}
/* Кнопка fullscreen в шапке viewer'а */
.screen-viewer-fullscreen {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,.15); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; cursor: pointer; border: none;
    transition: background .2s, transform .25s var(--ease-spring);
}
.screen-viewer-fullscreen:hover { background: rgba(255,255,255,.28); transform: scale(1.1); }

/* ФИКС 3: Зелёная рамка говорящего — уже есть выше (.call-tile.speaking).
   Этот блок гарантирует что ничего не перебьёт её. */
.call-tile.speaking {
    box-shadow: 0 0 0 3px #4dd47d, 0 0 26px rgba(77, 212, 125, .55) !important;
    animation: speakingRingGreen 1.8s ease-in-out infinite !important;
}


/* ============================================================
   ★★★ v55.5: значки группового звонка в списке чатов и шапке
   ============================================================ */
.contact-call-badge,
.chat-call-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 8px;
    background: rgba(77, 212, 125, .18);
    color: var(--success);
    border: 1px solid rgba(77, 212, 125, .35);
    animation: breathing 2.4s ease-in-out infinite;
    line-height: 1;
    white-space: nowrap;
    vertical-align: middle;
}
.chat-call-badge {
    font-size: 11px;
    padding: 3px 9px;
    margin-left: 4px;
}
html[data-theme="light"] .contact-call-badge,
html[data-theme="light"] .chat-call-badge {
    background: rgba(34, 160, 90, .14);
    border-color: rgba(34, 160, 90, .35);
    color: #16a34a;
}


/* ============================================================
   v55.5: значки группового звонка (аватарки участников)
   ============================================================ */
.group-call-icons {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    vertical-align: middle;
    animation: fadeInScale .3s var(--ease-spring);
}
.group-call-icons .call-mini-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg,var(--nx-a2),var(--nx-a3));
    background-size: cover;
    background-position: center;
    color: #fff;
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    border: 2px solid var(--bg-sidebar);
    margin-left: -7px;
    box-shadow: 0 1px 4px rgba(0,0,0,.35);
    overflow: hidden;
    transition: transform .25s var(--ease-spring);
}
.group-call-icons .call-mini-avatar:first-child { margin-left: 0; }
.group-call-icons .call-mini-avatar:hover { transform: translateY(-2px) scale(1.15); z-index: 3; }
.chat-header-name .group-call-icons .call-mini-avatar {
    width: 22px;
    height: 22px;
    font-size: 10.5px;
    border-color: rgba(var(--v-rgb),.85);
}
html[data-theme="light"] .chat-header-name .group-call-icons .call-mini-avatar {
    border-color: rgba(229,231,235,.9);
}
.group-call-icons .call-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: rgba(var(--nx-a2-rgb),.35);
    color: var(--accent-light);
    font-size: 10px;
    font-weight: 700;
    margin-left: -5px;
    border: 2px solid var(--bg-sidebar);
}
html[data-theme="light"] .group-call-icons .call-more {
    background: rgba(59,130,246,.25);
    color: #1d4ed8;
}

/* v55.5: разные значки muted — микрофон красный, наушники янтарные, стакаются */
.call-tile-mute.mic {
    background: rgba(224,83,83,.92);
    box-shadow: 0 4px 14px rgba(224,83,83,.5);
}
.call-tile-mute.headphones {
    top: 52px;
    background: rgba(245,166,35,.92);
    box-shadow: 0 4px 14px rgba(245,166,35,.5);
}
.call-tile-mute.headphones::after {
    background: #fff;
}


/* v55.5: иконки-аватарки участников группового звонка */
.group-call-icons {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    vertical-align: middle;
    animation: fadeInScale .3s var(--ease-spring);
}
.group-call-icons .call-mini-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg,var(--nx-a2),var(--nx-a3));
    background-size: cover;
    background-position: center;
    color: #fff;
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    border: 2px solid var(--bg-sidebar);
    margin-left: -7px;
    box-shadow: 0 1px 4px rgba(0,0,0,.35);
    overflow: hidden;
    transition: transform .25s var(--ease-spring);
}
.group-call-icons .call-mini-avatar:first-child { margin-left: 0; }
.group-call-icons .call-mini-avatar:hover { transform: translateY(-2px) scale(1.15); z-index: 3; }
.chat-header-name .group-call-icons .call-mini-avatar {
    width: 22px;
    height: 22px;
    font-size: 10.5px;
    border-color: rgba(var(--v-rgb),.85);
}
html[data-theme="light"] .chat-header-name .group-call-icons .call-mini-avatar {
    border-color: rgba(229,231,235,.9);
}
.group-call-icons .call-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: rgba(var(--nx-a2-rgb),.35);
    color: var(--accent-light);
    font-size: 10px;
    font-weight: 700;
    margin-left: -5px;
    border: 2px solid var(--bg-sidebar);
}
html[data-theme="light"] .group-call-icons .call-more {
    background: rgba(59,130,246,.25);
    color: #1d4ed8;
}

/* v55.5: разные значки mute — микрофон красный, наушники янтарные */
.call-tile-mute.mic {
    background: rgba(224,83,83,.92);
    box-shadow: 0 4px 14px rgba(224,83,83,.5);
}
.call-tile-mute.headphones {
    top: 52px;
    background: rgba(245,166,35,.92);
    box-shadow: 0 4px 14px rgba(245,166,35,.5);
}


/* v55.5: иконки-аватарки участников группового звонка */
.group-call-icons {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    vertical-align: middle;
    animation: fadeInScale .3s var(--ease-spring);
}
.group-call-icons .call-mini-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg,var(--nx-a2),var(--nx-a3));
    background-size: cover;
    background-position: center;
    color: #fff;
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    border: 2px solid var(--bg-sidebar);
    margin-left: -7px;
    box-shadow: 0 1px 4px rgba(0,0,0,.35);
    overflow: hidden;
    transition: transform .25s var(--ease-spring);
}
.group-call-icons .call-mini-avatar:first-child { margin-left: 0; }
.group-call-icons .call-mini-avatar:hover { transform: translateY(-2px) scale(1.15); z-index: 3; }
.chat-header-name .group-call-icons .call-mini-avatar {
    width: 22px;
    height: 22px;
    font-size: 10.5px;
    border-color: rgba(var(--v-rgb),.85);
}
html[data-theme="light"] .chat-header-name .group-call-icons .call-mini-avatar {
    border-color: rgba(229,231,235,.9);
}
.group-call-icons .call-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: rgba(var(--nx-a2-rgb),.35);
    color: var(--accent-light);
    font-size: 10px;
    font-weight: 700;
    margin-left: -5px;
    border: 2px solid var(--bg-sidebar);
}
html[data-theme="light"] .group-call-icons .call-more {
    background: rgba(59,130,246,.25);
    color: #1d4ed8;
}

/* v55.5: разные значки mute — микрофон и наушники */
.call-tile-mute.mic {
    background: rgba(224,83,83,.92);
    box-shadow: 0 4px 14px rgba(224,83,83,.5);
}
.call-tile-mute.headphones {
    top: 52px;
    background: rgba(245,166,35,.92);
    box-shadow: 0 4px 14px rgba(245,166,35,.5);
}

.screen-viewer-vol{display:flex;align-items:center;gap:6px;color:#fff;font-size:12px;background:rgba(0,0,0,.4);padding:4px 10px;border-radius:18px}
.screen-viewer-vol input{width:120px;accent-color:var(--nx-a2)}
.screen-viewer-vol b{min-width:38px;font-weight:600}
.screen-viewer .call-ctx{z-index:100000 !important}

/* ===== v57: РЕДИЗАЙН НАСТРОЕК ===== */
@media (min-width: 721px) {
  .settings-window { width: min(92vw, 1080px); height: min(88vh, 760px); border-radius: 20px; }
  .settings-sidebar { width: 252px; }
}
.settings-sidebar-header { padding: 22px 22px 16px; }
.settings-sidebar-header h3 { font-size: 18px; letter-spacing: .2px; }
.settings-nav { padding: 14px 12px; gap: 6px; }
.settings-nav-item { padding: 11px 14px; border-radius: 12px; font-size: 14px; }
.settings-nav-item .sni-icon { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: rgba(255,255,255,.05); font-size: 16px; }
.settings-nav-item.active .sni-icon { background: rgba(var(--nx-a2-rgb),.3); }
html[data-theme="light"] .settings-nav-item .sni-icon { background: rgba(0,0,0,.05); }
.settings-content { padding: 30px 38px 44px; scrollbar-width: thin; }
.settings-section h2 { font-size: 26px; letter-spacing: .2px; margin-bottom: 22px; }
.settings-lead { margin: -14px 0 24px; font-size: 13.5px; color: var(--text-secondary); line-height: 1.5; }
.settings-section .settings-subtitle { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .9px; color: var(--text-secondary); margin: 26px 0 10px; }
.ss-ico { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; background: rgba(var(--nx-a2-rgb),.2); font-size: 13px; }
.settings-section .settings-divider { height: 0; margin: 8px 0; background: transparent; }
.settings-section .settings-list { gap: 0; padding: 0; overflow: hidden; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07); border-radius: 16px; margin-bottom: 8px; }
html[data-theme="light"] .settings-section .settings-list { background: #fff; border-color: rgba(0,0,0,.08); box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.settings-window .settings-check { justify-content: space-between; gap: 14px; padding: 14px 16px; border-radius: 0; background: none !important; transform: none !important; font-size: 14.5px; border-bottom: 1px solid rgba(255,255,255,.05); }
html[data-theme="light"] .settings-window .settings-check { border-color: rgba(0,0,0,.06); }
.settings-window .settings-check:last-child { border-bottom: none; }
.settings-window .settings-check:hover { background: rgba(255,255,255,.04) !important; }
html[data-theme="light"] .settings-window .settings-check:hover { background: rgba(0,0,0,.035) !important; }
.sc-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sc-text b { font-weight: 600; font-size: 14.5px; }
.sc-text small { font-size: 12.5px; color: var(--text-secondary); line-height: 1.4; }
.settings-window .settings-check input[type=checkbox] { -webkit-appearance: none; appearance: none; order: 2; flex-shrink: 0; width: 44px; height: 26px; margin: 0; border-radius: 13px; background: rgba(255,255,255,.16); position: relative; cursor: pointer; transition: background .25s; }
html[data-theme="light"] .settings-window .settings-check input[type=checkbox] { background: rgba(0,0,0,.18); }
.settings-window .settings-check input[type=checkbox]::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.35); transition: transform .28s var(--ease-spring); }
.settings-window .settings-check input[type=checkbox]:checked { background: linear-gradient(135deg,var(--nx-a2),var(--nx-a3)); }
.settings-window .settings-check input[type=checkbox]:checked::after { transform: translateX(18px); }
.settings-window .settings-check input[type=checkbox]:disabled { opacity: .4; cursor: not-allowed; }
.settings-window .settings-check input[type=checkbox]:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }
.settings-window .settings-check input[type=checkbox]:active { transform: scale(.94); }
.settings-list .settings-hint { margin: 0; padding: 11px 16px 13px; background: rgba(0,0,0,.14); border-top: 1px solid rgba(255,255,255,.05); }
html[data-theme="light"] .settings-list .settings-hint { background: rgba(0,0,0,.03); border-color: rgba(0,0,0,.06); }
.settings-section .form-group:has(.settings-range) { gap: 6px; padding: 16px 18px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07); border-radius: 16px; }
html[data-theme="light"] .settings-section .form-group:has(.settings-range) { background: #fff; border-color: rgba(0,0,0,.08); }
.settings-section .form-group:has(.settings-range) .form-label { font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--text-primary); }
.settings-section .form-label span { color: var(--accent-light); font-weight: 700; }
.settings-range { background: linear-gradient(90deg, var(--accent-light) var(--fill, 50%), rgba(255,255,255,.12) var(--fill, 50%)); }
html[data-theme="light"] .settings-range { background: linear-gradient(90deg, var(--accent) var(--fill, 50%), rgba(0,0,0,.12) var(--fill, 50%)); }
.settings-section .form-input { padding: 12px 15px; font-size: 14.5px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1.5px solid rgba(255,255,255,.07); }
html[data-theme="light"] .settings-section .form-input { background: #fff; border-color: rgba(0,0,0,.12); color: var(--text-primary); }
.settings-section .form-input:hover { border-color: rgba(255,255,255,.16); }
.settings-section .form-input:focus { border-color: var(--accent); }
.settings-section select.form-input { -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 42px; color: var(--text-primary); text-overflow: ellipsis; background: rgba(0,0,0,.25) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%237d8b99' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 15px center / 12px; }
html[data-theme="light"] .settings-section select.form-input { background-color: #fff; }
.settings-section select.form-input option { background: var(--v-1d1d38); color: #fff; }
html[data-theme="light"] .settings-section select.form-input option { background: #fff; color: #111827; }
.settings-device { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 10px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07); border-radius: 16px; }
html[data-theme="light"] .settings-device { background: #fff; border-color: rgba(0,0,0,.08); }
.sd-ico { flex-shrink: 0; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; font-size: 21px; border-radius: 13px; background: linear-gradient(135deg, rgba(var(--nx-a2-rgb),.3), rgba(139,92,246,.22)); }
.sd-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.settings-avatar-row { border: 1px solid rgba(255,255,255,.07); background: linear-gradient(135deg, rgba(var(--nx-a2-rgb),.13), rgba(139,92,246,.08)); }
.settings-note { padding: 12px 14px; border-radius: 12px; line-height: 1.5; margin-bottom: 16px; }
.theme-selector { gap: 12px; }
.theme-opt { padding: 10px; border-radius: 14px; }
.settings-actions .btn-primary, .settings-actions .btn-secondary, .settings-actions .btn-danger { padding: 11px 22px; font-size: 14px; border-radius: 12px; }
.device-item { padding: 14px 16px; border-radius: 14px; }
@media (max-width: 720px) {
  .settings-content { padding: 18px 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
  .settings-lead { margin: -10px 0 18px; }
  .settings-device { padding: 12px; gap: 12px; }
  .sd-ico { width: 40px; height: 40px; font-size: 18px; }
  .settings-nav-item .sni-icon { width: 28px; height: 28px; font-size: 15px; }
}

/* v58: без полосы прокрутки в настройках */
.settings-content, .settings-nav { scrollbar-width: none; -ms-overflow-style: none; }
.settings-content::-webkit-scrollbar, .settings-nav::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* ===== Nexus v58: визуальная полировка ===== */
::selection { background: rgba(100,181,239,.35); }
:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }
.composer-input:focus-visible { outline: none; }
.composer-input:focus { border-color: rgba(100,181,239,.55); box-shadow: 0 0 0 4px rgba(var(--nx-a2-rgb),.16); }
.composer { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.messages { overscroll-behavior: contain; scroll-padding-bottom: 12px; }
.msg-text { text-wrap: pretty; }
.msg-bubble { border-radius: 18px; }
html:not([data-theme="light"]) .msg.own .msg-bubble { background: linear-gradient(135deg,#2f6aa3 0%,#3a5fb8 55%,#5b53c9 100%); box-shadow: 0 2px 12px rgba(58,95,184,.35); }
html:not([data-theme="light"]) .msg.other .msg-bubble { background: linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,.02)), var(--bg-msg-other); border: 1px solid rgba(255,255,255,.05); }
.contact.active { background: linear-gradient(90deg,rgba(var(--nx-a2-rgb),.30),rgba(var(--nx-a2-rgb),.07)); }
.chat-header { box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 10px 26px -14px rgba(0,0,0,.55); }
.date-sep { backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.05); }
.notif-toast { backdrop-filter: blur(16px) saturate(160%); border: 1px solid rgba(255,255,255,.08); }
@media (hover: hover) { ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.2); } }
@supports (-moz-appearance: none) { * { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.14) transparent; } }

/* ===== v58 design ===== */
html[data-theme="indigo"]{--bg-deep:#0b0a1f;--bg-main:#0b0a1f;--bg-sidebar:#14123a;--bg-panel:#1a1847;--bg-hover:#221f58;--bg-active:#2b2770;--bg-input:#221f58;--bg-msg-own:#4f46e5;--bg-msg-other:#1a1847;--accent:#818cf8;--accent-light:#a5b4fc}
html[data-theme="aurora"]{--bg-deep:#071a1c;--bg-main:#071a1c;--bg-sidebar:#0a2326;--bg-panel:#0e2d31;--bg-hover:#133a3f;--bg-active:#17484e;--bg-input:#133a3f;--bg-msg-own:#0f766e;--bg-msg-other:#0e2d31;--accent:#2dd4bf;--accent-light:#5eead4}
html[data-theme="sunset"]{--bg-deep:#1c0f14;--bg-main:#1c0f14;--bg-sidebar:#26131a;--bg-panel:#31171f;--bg-hover:#3e1d27;--bg-active:#4b2430;--bg-input:#3e1d27;--bg-msg-own:#c2410c;--bg-msg-other:#31171f;--accent:#fb923c;--accent-light:#fdba74}
html[data-theme="forest"]{--bg-deep:#0d1710;--bg-main:#0d1710;--bg-sidebar:#112015;--bg-panel:#16291b;--bg-hover:#1c3523;--bg-active:#23432c;--bg-input:#1c3523;--bg-msg-own:#2f6b3f;--bg-msg-other:#16291b;--accent:#4ade80;--accent-light:#86efac}
.theme-indigo{background:linear-gradient(135deg,#100f2b,#1a1847);--a:#818cf8;--m:#4f46e5}.theme-aurora{background:linear-gradient(135deg,#071a1c,#0e2d31);--a:#2dd4bf;--m:#0f766e}.theme-sunset{background:linear-gradient(135deg,#1c0f14,#31171f);--a:#fb923c;--m:#c2410c}.theme-forest{background:linear-gradient(135deg,#0d1710,#16291b);--a:#4ade80;--m:#2f6b3f}
.theme-indigo,.theme-aurora,.theme-sunset,.theme-forest{position:relative}
.theme-indigo::before,.theme-aurora::before,.theme-sunset::before,.theme-forest::before{content:'';position:absolute;left:10%;top:20%;width:40%;height:8%;background:var(--a);border-radius:3px}
.theme-indigo::after,.theme-aurora::after,.theme-sunset::after,.theme-forest::after{content:'';position:absolute;right:10%;bottom:25%;width:50%;height:12%;background:var(--m);border-radius:3px}
.theme-opt{transition:transform .25s var(--ease-spring)}.theme-opt:hover{transform:translateY(-3px) scale(1.04)}
.modal-card{animation:popIn .35s var(--ease-spring)}
.btn-primary,.btn-secondary,.btn-danger{transition:transform .2s var(--ease-spring),box-shadow .2s,background .2s}
.btn-primary:hover,.btn-secondary:hover,.btn-danger:hover{transform:translateY(-1px)}
.btn-primary:active,.btn-secondary:active,.btn-danger:active{transform:scale(.95)}
.avatar{box-shadow:inset 0 1px 0 rgba(255,255,255,.25),inset 0 -6px 12px rgba(0,0,0,.15)}
.adm-header-avatar{transition:transform .4s var(--ease-spring)}.adm-header-avatar:hover{transform:scale(1.08) rotate(-4deg)}
.adm-stat{transition:transform .25s var(--ease-spring),box-shadow .25s;animation:fadeInUp .5s var(--ease-out) backwards}
.adm-stat:hover{transform:translateY(-3px);box-shadow:var(--shadow-md)}
.adm-stat:nth-child(2){animation-delay:.05s}.adm-stat:nth-child(3){animation-delay:.1s}.adm-stat:nth-child(4){animation-delay:.15s}.adm-stat:nth-child(5){animation-delay:.2s}.adm-stat:nth-child(6){animation-delay:.25s}
.adm-star-btn{transition:transform .25s var(--ease-spring),box-shadow .25s}.adm-star-btn:not(.disabled):hover{transform:translateY(-2px) scale(1.03);box-shadow:var(--shadow-md)}
.adm-star-glyph{display:inline-block;transition:transform .35s var(--ease-spring)}.adm-star-btn:hover .adm-star-glyph{transform:rotate(20deg) scale(1.25)}
.adm-act{display:inline-flex;align-items:center;gap:8px;padding:10px 16px;border-radius:12px;font:600 13.5px var(--font);border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.05);color:var(--text-primary);cursor:pointer;position:relative;overflow:hidden;transition:transform .2s var(--ease-spring),background .2s,border-color .2s,box-shadow .2s}
.adm-act svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .3s var(--ease-spring)}
.adm-act::after{content:'';position:absolute;inset:0;background:linear-gradient(110deg,transparent 30%,rgba(255,255,255,.2) 50%,transparent 70%);transform:translateX(-120%);transition:transform .6s}
.adm-act:hover{transform:translateY(-2px);background:rgba(var(--nx-a2-rgb),.18);border-color:var(--accent);box-shadow:0 6px 18px rgba(var(--nx-a2-rgb),.25)}
.adm-act:hover::after{transform:translateX(120%)}.adm-act:hover svg{transform:rotate(-12deg) scale(1.15)}.adm-act:active{transform:scale(.95)}
.adm-act-danger{color:#ff8a8a;border-color:rgba(224,83,83,.35);background:rgba(224,83,83,.1)}
.adm-act-danger:hover{background:var(--danger);color:#fff;border-color:var(--danger);box-shadow:0 6px 18px rgba(224,83,83,.4)}
.adm-email-unbind{transition:transform .2s var(--ease-spring),background .2s}.adm-email-unbind:hover{transform:scale(1.06)}

.msg-failed{display:inline-grid;place-items:center;width:16px;height:16px;border-radius:50%;background:var(--danger);color:#fff;font-weight:800;font-size:11px;animation:bounceIn .5s var(--ease-spring),failPulse 2s .5s infinite}
@keyframes failPulse{0%,100%{box-shadow:0 0 0 0 rgba(224,83,83,.6)}50%{box-shadow:0 0 0 6px rgba(224,83,83,0)}}
.msg:has(.msg-failed){filter:saturate(.7)}
.failed-menu{position:fixed;z-index:3000;min-width:170px;padding:6px;border-radius:14px;background:var(--bg-panel);border:1px solid rgba(255,255,255,.1);box-shadow:var(--shadow-lg);animation:popIn .22s var(--ease-spring);display:flex;flex-direction:column}
.failed-menu button{display:flex;align-items:center;gap:10px;padding:10px 12px;border:0;border-radius:9px;background:none;color:var(--text-primary);font:500 14px var(--font);cursor:pointer;transition:background .15s,transform .15s}
.failed-menu button:hover{background:var(--bg-hover);transform:translateX(2px)}.failed-menu .danger{color:var(--danger)}
.failed-menu svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.notif-banner{position:fixed;top:14px;left:50%;transform:translate(-50%,-140%);z-index:2000;display:flex;align-items:center;gap:12px;max-width:min(520px,calc(100vw - 24px));padding:12px 14px;border-radius:16px;background:var(--bg-panel);border:1px solid rgba(255,255,255,.1);box-shadow:var(--shadow-lg);opacity:0;transition:transform .5s var(--ease-spring),opacity .3s}
.notif-banner.in{transform:translate(-50%,0);opacity:1}
.nb-ico{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(135deg,var(--accent),var(--accent-light));color:#fff;flex:none}
.nb-ico svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transform-origin:50% 10%;animation:nbRing 2.4s ease-in-out infinite}
@keyframes nbRing{0%,60%,100%{transform:rotate(0)}10%{transform:rotate(14deg)}20%{transform:rotate(-12deg)}30%{transform:rotate(8deg)}40%{transform:rotate(-6deg)}}
.nb-txt{display:flex;flex-direction:column;gap:2px;min-width:0;font-size:13px}.nb-txt span{color:var(--text-secondary);font-size:12px}
.nb-go{padding:8px 14px;border:0;border-radius:10px;background:var(--accent);color:#fff;font-weight:600;cursor:pointer;transition:transform .2s var(--ease-spring)}.nb-go:hover{transform:scale(1.06)}.nb-go:active{transform:scale(.94)}
.nb-x{background:none;border:0;color:var(--text-muted);cursor:pointer;padding:6px;font-size:14px}.nb-x:hover{color:var(--text-primary)}
.notif-help{position:fixed;inset:0;z-index:2100;display:grid;place-items:center;padding:20px;background:rgba(0,0,0,.6);backdrop-filter:blur(6px);opacity:0;transition:opacity .25s}.notif-help.in{opacity:1}
.nh-card{max-width:420px;padding:22px;border-radius:20px;background:var(--bg-panel);border:1px solid rgba(255,255,255,.08);box-shadow:var(--shadow-lg);transform:scale(.94);transition:transform .35s var(--ease-spring)}.notif-help.in .nh-card{transform:scale(1)}
.nh-card h3{margin:0 0 10px}.nh-card ol{margin:0 0 10px 18px;padding:0;display:flex;flex-direction:column;gap:8px;font-size:14px}.nh-card p{color:var(--text-secondary);font-size:12.5px;margin:0 0 14px}.nh-btns{display:flex;gap:10px;justify-content:flex-end}
@media (prefers-reduced-motion:reduce){.adm-stat,.nb-ico svg,.msg-failed{animation:none}}

.push-diag{margin:8px 0 14px;padding:12px 14px;border-radius:14px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);font-size:13px;animation:fadeInUp .4s var(--ease-out)}
.pd-row{display:flex;justify-content:space-between;gap:12px;padding:4px 0}.pd-row span{color:var(--text-secondary)}.pd-row b{font-weight:600;word-break:break-all;text-align:right}
.pd-err b{color:var(--danger)}.pd-hint{margin:8px 0;padding:8px 10px;border-radius:10px;background:rgba(245,166,35,.12);color:var(--warning);font-size:12.5px}
.pd-btns{display:flex;gap:8px;justify-content:flex-end;margin-top:10px;flex-wrap:wrap}

.notif-tips{margin:8px 0;font-size:12.5px;color:var(--text-secondary)}
.notif-tips summary{cursor:pointer;font-weight:600}
.notif-tips ol{margin:8px 0 0;padding-left:20px;display:grid;gap:6px}



/* v61: иконки зрителей демонстрации */
.screen-viewers{display:flex;align-items:center;padding:3px 10px 3px 8px;border-radius:999px;background:rgba(0,0,0,.6);backdrop-filter:blur(6px);color:#fff;font-size:12px;z-index:5;pointer-events:auto}
.screen-viewers.hidden{display:none}
.screen-viewers .sv-eye{margin-right:6px;font-size:13px}
.screen-viewers .sv-avatar{width:22px;height:22px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;color:#fff;background-size:cover;background-position:center;margin-left:-6px;border:2px solid #1a212e;animation:svIn .3s var(--ease-spring)}
.screen-viewers .sv-avatar:first-of-type{margin-left:0}
.screen-viewers .sv-more{margin-left:6px;font-size:11px;opacity:.85}
.call-tile.screen>.screen-viewers{position:absolute;right:10px;top:10px}
#sv-own{position:absolute;top:12px;right:12px}
#sv-overlay{flex:none;margin:0 12px}
@keyframes svIn{from{transform:scale(.4);opacity:0}to{transform:scale(1);opacity:1}}

/* v62: статус «отошёл» */
.contact.online.away .contact-dot{background:#f0b232;animation:none}
.contact.online.away .contact-status{color:#f0b232}
.chat-header-status.online.away{color:#f0b232}

/* v63: полировка */
::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.22)}
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.28)}
button:focus-visible,.icon-btn:focus-visible,.info-tab:focus-visible{outline:2px solid var(--accent-light);outline-offset:2px}
::selection{background:rgba(var(--nx-a2-rgb),.35)}
.info-card .settings-check{justify-content:space-between;gap:14px}
.info-card .settings-check input[type=checkbox]{-webkit-appearance:none;appearance:none;order:2;flex-shrink:0;width:44px;height:26px;margin:0;border-radius:13px;background:rgba(255,255,255,.16);position:relative;cursor:pointer;transition:background .25s}
html[data-theme="light"] .info-card .settings-check input[type=checkbox]{background:rgba(0,0,0,.18)}
.info-card .settings-check input[type=checkbox]::after{content:'';position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 2px 5px rgba(0,0,0,.35);transition:transform .28s var(--ease-spring)}
.info-card .settings-check input[type=checkbox]:checked{background:linear-gradient(135deg,var(--nx-a2),var(--nx-a3))}
.info-card .settings-check input[type=checkbox]:checked::after{transform:translateX(18px)}
.info-card .settings-check input[type=checkbox]:disabled{opacity:.4;cursor:not-allowed}
@media (prefers-reduced-motion:reduce){.info-card .settings-check input[type=checkbox],.info-card .settings-check input[type=checkbox]::after{transition:none}}


/* v64: ручной статус */
.dot-away { background:#f0b232; box-shadow:0 0 8px rgba(240,178,50,.6); animation:none; }
.avatar-me { cursor:pointer; }
.status-menu { position:fixed; z-index:9999; min-width:180px; padding:6px; border-radius:12px; background:var(--v-1d1d38); border:1px solid rgba(255,255,255,.08); box-shadow:0 8px 30px rgba(0,0,0,.4); display:flex; flex-direction:column; gap:2px; }
.status-menu button { display:flex; align-items:center; gap:10px; padding:9px 12px; border:0; border-radius:8px; background:transparent; color:var(--text-primary,#fff); font-size:14px; cursor:pointer; text-align:left; }
.status-menu button:hover { background:rgba(255,255,255,.07); }
.status-menu button.active { background:rgba(var(--nx-a2-rgb),.22); font-weight:600; }
html[data-theme="light"] .status-menu { background:#fff; border-color:rgba(0,0,0,.1); }
html[data-theme="light"] .status-menu button:hover { background:rgba(0,0,0,.05); }


/* v65: статусы */
.dot-away { background:#f0b232; box-shadow:0 0 8px rgba(240,178,50,.6); animation:none; }
.dot-dnd { background:#e5484d; box-shadow:0 0 8px rgba(229,72,77,.6); animation:none; }
.dot-invisible { background:transparent; box-shadow:inset 0 0 0 2px #8a96a3; animation:none; }
.avatar-me { cursor:pointer; }
.info-member-status.away { color:#f0b232; }
.status-menu { position:fixed; z-index:9999; min-width:230px; padding:6px; border-radius:12px; background:var(--v-1d1d38); border:1px solid rgba(255,255,255,.08); box-shadow:0 8px 30px rgba(0,0,0,.4); display:flex; flex-direction:column; gap:2px; }
.status-menu button { display:flex; align-items:center; gap:10px; padding:8px 12px; border:0; border-radius:8px; background:transparent; color:var(--text-primary,#fff); font-size:14px; cursor:pointer; text-align:left; }
.status-menu button:hover { background:rgba(255,255,255,.07); }
.status-menu button.active { background:rgba(var(--nx-a2-rgb),.22); font-weight:600; }
.status-menu .sm-text small { display:block; font-size:11px; font-weight:400; opacity:.6; margin-top:1px; }
html[data-theme="light"] .status-menu { background:#fff; border-color:rgba(0,0,0,.1); }
html[data-theme="light"] .status-menu button:hover { background:rgba(0,0,0,.05); }


/* v66: мобильная версия + красный «не беспокоить» */
.contact.online.dnd .contact-dot { background:#e5484d; animation:none; }
.contact.online.dnd .contact-status { color:#e5484d; }
.chat-header-status.online.dnd { color:#e5484d; }
.info-member-status.dnd { color:#e5484d; }
html { -webkit-text-size-adjust:100%; }
button, .contact, .msg, .icon-btn, .composer-btn, .call-btn { -webkit-tap-highlight-color:transparent; touch-action:manipulation; }
@media (pointer: coarse) {
  .msg-bubble { -webkit-touch-callout:none; }
  .icon-btn:hover, .avatar:hover, .me-card:hover { transform:none; }
}
@media (max-width: 720px) {
  html, body { overscroll-behavior:none; }
  html, body, .app-screen { height: var(--vvh, 100dvh); }
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), textarea, select { font-size:16px !important; }
  .chat-header-actions .icon-btn { width:40px; height:40px; }
  .composer-btn, .composer-send, .composer-mic { width:42px; height:42px; }
  .rec-cancel, .rec-stop { width:46px; height:46px; }
  .call-controls { flex-wrap:wrap; }
  .call-btn { width:54px; height:54px; }
  .contact { min-height:60px; }
  html.kb-open .composer { padding-bottom:8px; }
}
.attach-sheet-bg { position:fixed; inset:0; z-index:9998; background:rgba(0,0,0,.45); display:flex; align-items:flex-end; justify-content:center; }
.attach-sheet { width:100%; max-width:480px; padding:10px 10px calc(10px + env(safe-area-inset-bottom, 0px)); display:flex; flex-direction:column; gap:6px; }
.attach-sheet button { padding:15px; border-radius:14px; border:0; background:var(--v-1d1d38); color:#fff; font-size:16px; text-align:center; }
.attach-sheet button.cancel { background:#243447; font-weight:600; }
html[data-theme="light"] .attach-sheet button { background:#fff; color:#111; }
html[data-theme="light"] .attach-sheet button.cancel { background:#e8eaed; }


/* v67: статусы */
.dot-away { background:#f0b232; box-shadow:0 0 8px rgba(240,178,50,.6); animation:none; }
.dot-dnd { background:#e5484d; box-shadow:0 0 8px rgba(229,72,77,.6); animation:none; }
.dot-invisible { background:transparent; box-shadow:inset 0 0 0 2px #8a96a3; animation:none; }
.avatar-me { cursor:pointer; }
.contact.online.dnd .contact-dot { background:#e5484d; animation:none; }
.contact.online.dnd .contact-status { color:#e5484d; }
.chat-header-status.online.dnd { color:#e5484d; }
.info-member-status.away { color:#f0b232; }
.info-member-status.dnd { color:#e5484d; }
.status-menu { position:fixed; z-index:9999; min-width:230px; padding:6px; border-radius:12px; background:var(--v-1d1d38); border:1px solid rgba(255,255,255,.08); box-shadow:0 8px 30px rgba(0,0,0,.4); display:flex; flex-direction:column; gap:2px; }
.status-menu button { display:flex; align-items:center; gap:10px; padding:8px 12px; border:0; border-radius:8px; background:transparent; color:var(--text-primary,#fff); font-size:14px; cursor:pointer; text-align:left; }
.status-menu button:hover { background:rgba(255,255,255,.07); }
.status-menu button.active { background:rgba(var(--nx-a2-rgb),.22); font-weight:600; }
.status-menu .sm-text small { display:block; font-size:11px; font-weight:400; opacity:.6; margin-top:1px; }
html[data-theme="light"] .status-menu { background:#fff; border-color:rgba(0,0,0,.1); }
html[data-theme="light"] .status-menu button:hover { background:rgba(0,0,0,.05); }

/* v68: зрители моей демки — на моей плитке */
.call-tile.local>.screen-viewers{position:absolute;right:10px;top:10px;z-index:5}

/* ===== v77: серверы (Discord-стиль) ===== */
.srv-root { position:fixed; inset:0; z-index:1200; display:flex; background:var(--bg-main); color:var(--text-primary); font-family:var(--font); }
.srv-rail { width:68px; flex:none; background:var(--bg-deep); display:flex; flex-direction:column; align-items:center; gap:8px; padding:10px 0; overflow-y:auto; }
.srv-ico { position:relative; width:46px; height:46px; border:0; border-radius:50%; background:var(--bg-panel); color:var(--text-primary); font-weight:700; cursor:pointer; transition:border-radius .2s, background .2s; }
.srv-ico:hover, .srv-ico.active { border-radius:14px; background:var(--accent); }
.srv-ico.add { color:var(--success); font-size:22px; } .srv-ico.close { margin-top:auto; color:var(--text-secondary); }
.srv-ud { position:absolute; right:2px; top:2px; width:10px; height:10px; border-radius:50%; background:var(--danger); display:inline-block; }
.srv-chs { width:240px; flex:none; background:var(--bg-sidebar); display:flex; flex-direction:column; overflow-y:auto; }
.srv-sh { padding:14px; display:flex; justify-content:space-between; align-items:center; cursor:pointer; border-bottom:1px solid rgba(255,255,255,.06); position:sticky; top:0; background:var(--bg-sidebar); z-index:1; }
.srv-sh:hover { background:var(--bg-hover); }
.srv-cat { display:flex; align-items:center; gap:4px; padding:14px 10px 4px 12px; font-size:11px; font-weight:700; text-transform:uppercase; color:var(--text-secondary); }
.srv-cat span { flex:1; } .srv-cat button, .srv-gear { background:none; border:0; color:var(--text-secondary); cursor:pointer; font-size:14px; }
.srv-ch { display:flex; align-items:center; gap:6px; margin:1px 8px; padding:6px 8px; border-radius:6px; color:var(--text-secondary); cursor:pointer; }
.srv-ch:hover { background:var(--bg-hover); color:var(--text-primary); } .srv-ch.active { background:var(--bg-active); color:var(--text-primary); } .srv-ch.incall { color:var(--success); }
.srv-chn { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .srv-gear { opacity:0; } .srv-ch:hover .srv-gear { opacity:1; }
.srv-ch .srv-ud { position:static; }
.srv-vu { display:flex; align-items:center; gap:8px; padding:3px 10px 3px 34px; font-size:13px; color:var(--text-secondary); }
.srv-av { display:inline-flex; width:24px; height:24px; flex:none; border-radius:50%; align-items:center; justify-content:center; font-size:10px; font-weight:700; color:#fff; }
.srv-main { flex:1; min-width:0; display:flex; flex-direction:column; }
.srv-head { display:flex; align-items:center; gap:10px; padding:12px 16px; border-bottom:1px solid rgba(255,255,255,.06); }
.srv-back { display:none; background:none; border:0; color:var(--text-primary); font-size:18px; cursor:pointer; }
.srv-topic { color:var(--text-secondary); font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.srv-msgs { flex:1; overflow-y:auto; padding:10px 0; }
.srv-msg { position:relative; display:flex; gap:12px; padding:6px 16px; } .srv-msg:hover { background:rgba(255,255,255,.03); }
.srv-msg .srv-av { width:38px; height:38px; font-size:13px; } .srv-mb { min-width:0; flex:1; }
.srv-mt { display:flex; gap:8px; align-items:baseline; } .srv-mt small { color:var(--text-muted); }
.srv-tx { word-break:break-word; line-height:1.4; }
.srv-acts { position:absolute; right:16px; top:-12px; display:none; gap:2px; background:var(--bg-panel); border:1px solid rgba(255,255,255,.08); border-radius:8px; padding:2px; }
.srv-msg:hover .srv-acts { display:flex; } .srv-acts button { background:none; border:0; cursor:pointer; padding:4px 6px; border-radius:6px; color:var(--text-primary); } .srv-acts button:hover { background:var(--bg-hover); }
.srv-rxs { display:flex; gap:4px; flex-wrap:wrap; margin-top:4px; }
.srv-rx { background:var(--bg-panel); border:1px solid transparent; border-radius:10px; padding:1px 8px; color:var(--text-primary); cursor:pointer; } .srv-rx.me { border-color:var(--accent); }
.srv-more { display:block; margin:6px auto; background:none; border:0; color:var(--accent-light); cursor:pointer; }
.srv-input { display:flex; gap:8px; padding:12px 16px; } .srv-input textarea { flex:1; resize:none; background:var(--bg-input); color:var(--text-primary); border:0; border-radius:10px; padding:10px 12px; font:inherit; max-height:160px; }
.srv-input button, .srv-btn { background:var(--accent); color:#fff; border:0; border-radius:8px; padding:9px 14px; cursor:pointer; font:inherit; }
.srv-btn.wide { display:block; width:100%; margin-top:8px; } .srv-btn.danger { background:var(--danger); }
.srv-mem { width:220px; flex:none; background:var(--bg-sidebar); overflow-y:auto; padding:8px; }
.srv-mh { padding:12px 8px 4px; font-size:11px; font-weight:700; text-transform:uppercase; color:var(--text-secondary); }
.srv-m { display:flex; align-items:center; gap:8px; padding:5px 8px; border-radius:6px; cursor:pointer; } .srv-m:hover { background:var(--bg-hover); } .srv-m.off { opacity:.45; }
.srv-empty { padding:30px 16px; text-align:center; color:var(--text-secondary); }
.srv-voicebox { padding:40px 20px; text-align:center; }
.srv-modal-bg { position:fixed; inset:0; z-index:1300; background:rgba(0,0,0,.55); display:flex; align-items:center; justify-content:center; padding:12px; }
.srv-modal { width:420px; max-width:100%; max-height:90vh; display:flex; flex-direction:column; background:var(--bg-panel); border-radius:14px; box-shadow:var(--shadow-lg); } .srv-modal.wide { width:720px; }
.srv-modal-h { display:flex; justify-content:space-between; align-items:center; padding:14px 16px; border-bottom:1px solid rgba(255,255,255,.06); }
.srv-x { background:none; border:0; color:var(--text-secondary); font-size:22px; cursor:pointer; }
.srv-modal-b { padding:14px 16px; overflow-y:auto; }
.srv-modal-b label { display:block; margin:12px 0 4px; font-size:12px; color:var(--text-secondary); }
.srv-modal-b input[type=text], .srv-modal-b input:not([type]), .srv-modal-b select { width:100%; padding:9px 10px; border-radius:8px; border:0; background:var(--bg-input); color:var(--text-primary); font:inherit; }
.srv-modal-b label.srv-chk { display:flex; align-items:center; gap:8px; margin:6px 0; font-size:14px; color:var(--text-primary); }
.srv-row { display:flex; gap:8px; margin-top:12px; } .srv-row input { flex:1; }
.srv-code { font:700 24px/1 monospace; letter-spacing:2px; text-align:center; padding:16px; margin-top:12px; background:var(--bg-input); border-radius:10px; user-select:all; }
.srv-roles { display:flex; gap:16px; } .srv-roles-l { width:220px; flex:none; } .srv-roles-r { flex:1; min-width:0; }
.srv-role { display:flex; align-items:center; gap:8px; padding:7px 8px; border-radius:6px; cursor:pointer; } .srv-role:hover { background:var(--bg-hover); } .srv-role.active { background:var(--bg-active); }
.srv-rdot { width:12px; height:12px; border-radius:50%; flex:none; } .srv-rname { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.srv-role button { background:none; border:0; color:var(--text-secondary); cursor:pointer; font-size:11px; }
@media (max-width:900px) { .srv-mem { display:none; } }
@media (max-width:640px) { .srv-rail { width:54px; } .srv-ico { width:40px; height:40px; } .srv-chs { width:170px; } .srv-roles { flex-direction:column; } .srv-roles-l { width:auto; } }

.nexus-fb { padding:12px 18px 16px; display:flex; flex-direction:column; gap:8px; }
.nexus-fb-btns { display:flex; gap:10px; }
.nexus-fb-btns button { flex:1; padding:12px 14px; border-radius:22px; background:var(--bg-input); color:var(--text-primary); font-weight:600; font-size:14px; transition:background .2s, transform .2s; }
.nexus-fb-btns button:hover { background:var(--bg-hover); transform:translateY(-1px); }
.nexus-fb-form textarea { width:100%; resize:none; padding:10px 14px; border-radius:16px; background:var(--bg-input); color:var(--text-primary); border:1.5px solid transparent; outline:none; font-size:14.5px; }
.nexus-fb-form textarea:focus { border-color:rgba(var(--nx-a2-rgb),.5); }
.nexus-fb-row { display:flex; gap:8px; justify-content:flex-end; margin-top:8px; }
.nexus-fb-row button { padding:8px 18px; border-radius:18px; background:var(--bg-input); }
.nexus-fb-row .nexus-fb-send { background:linear-gradient(135deg,var(--nx-a2),var(--nx-a3)); color:#fff; font-weight:600; }
.msg-text.call-msg { font-weight:500; }

.msg-bubble.call-bubble { border-left:3px solid var(--nx-a2); background-image:linear-gradient(135deg,rgba(var(--nx-a2-rgb),.22),rgba(var(--nx-a2-rgb),0)); }
.msg-bubble.call-bubble .msg-text.call-msg { letter-spacing:.2px; }

/* ── v80: фото в форме обращений (feedback) ── */
.nexus-fb-thumbs { display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
.nexus-fb-thumbs:empty { display:none; }
.nexus-fb-th { position:relative; width:64px; height:64px; border-radius:10px; overflow:hidden; }
.nexus-fb-th img { width:100%; height:100%; object-fit:cover; display:block; }
.nexus-fb-th button { position:absolute; top:2px; right:2px; width:20px; height:20px; border-radius:50%; background:rgba(0,0,0,.65); color:#fff; font-size:14px; line-height:20px; padding:0; border:none; cursor:pointer; }
.nexus-fb-spacer { flex:1; }
.nexus-fb-row .nexus-fb-attach { padding:8px 14px; }

/* v80: профили игроков, групп и каналов */
#user-modal .modal-card, #info-modal .modal-card, #profile-modal .modal-card { max-width: 420px; border-radius: 24px; box-shadow: 0 24px 70px rgba(0,0,0,.55); background-image: radial-gradient(120% 230px at 50% 0, rgba(var(--nx-a2-rgb),.30), transparent); }
html[data-theme="light"] #user-modal .modal-card, html[data-theme="light"] #info-modal .modal-card, html[data-theme="light"] #profile-modal .modal-card { background-image: radial-gradient(120% 230px at 50% 0, rgba(59,130,246,.16), transparent); }
#user-modal .modal-header, #info-modal .modal-header, #profile-modal .modal-header { border-bottom: 0; padding: 14px 16px 0 20px; }
#user-modal .modal-header h3, #info-modal .modal-header h3, #profile-modal .modal-header h3 { font-size: 12.5px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--text-secondary); }
#user-modal .modal-body, #info-modal .modal-body, #profile-modal .modal-body { padding: 6px 20px 18px; gap: 14px; }
#user-modal .profile-avatar-block, #info-modal .profile-avatar-block, #profile-modal .profile-view-block { gap: 6px; padding: 10px 0 4px; margin: 0; }
#user-modal .avatar-lg, #info-modal .avatar-lg { width: 96px; height: 96px; font-size: 36px; }
#profile-modal .avatar-xl { width: 104px; height: 104px; font-size: 38px; }
#user-avatar, #info-avatar, #profile-view-avatar { box-shadow: 0 0 0 4px rgba(var(--nx-a2-rgb),.30), 0 12px 30px rgba(0,0,0,.40); border: 0; }
#info-modal .profile-avatar-wrap { overflow: visible; }
#user-modal .user-profile-name, #info-modal .info-name, #profile-modal .profile-view-name { font-size: 21px; font-weight: 700; text-align: center; margin-top: 6px; }
#user-modal .profile-username, #profile-modal .profile-username { color: var(--accent-light); font-weight: 500; font-size: 13.5px; }
#user-modal .user-profile-status { display: inline-flex; align-self: center; align-items: center; gap: 7px; padding: 5px 13px; border-radius: 999px; background: rgba(255,255,255,.06); color: var(--text-secondary); font-size: 12.5px; font-weight: 500; }
#user-modal .user-profile-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
#user-modal .user-profile-status.online { background: rgba(46,204,113,.14); }
#user-modal .user-profile-since { text-align: center; font-size: 12px; margin-top: -6px; }
#user-modal .user-profile-bio, #profile-modal .profile-view-bio, #info-modal .info-desc { padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); font-size: 14px; line-height: 1.55; text-align: center; color: var(--text-secondary); word-break: break-word; }
html[data-theme="light"] #user-modal .user-profile-bio, html[data-theme="light"] #profile-modal .profile-view-bio, html[data-theme="light"] #info-modal .info-desc, html[data-theme="light"] #user-modal .user-profile-status { background: rgba(0,0,0,.04); border-color: rgba(0,0,0,.06); }
#info-modal .info-tabs { padding: 4px; border-radius: 14px; background: rgba(255,255,255,.05); gap: 4px; margin-bottom: 4px; }
html[data-theme="light"] #info-modal .info-tabs { background: rgba(0,0,0,.05); }
#info-modal .info-tab { padding: 9px 12px; border-radius: 11px; font-weight: 600; }
#info-modal .info-tab.active { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(var(--nx-a2-rgb),.40); }
#info-modal .info-section-title { display: flex; align-items: center; gap: 10px; padding-top: 8px; }
#info-modal .info-section-title::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,.08); }
#info-modal .info-members { gap: 6px; }
#info-modal .info-member { padding: 8px 10px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.04); }
#info-modal .info-member:hover { background: rgba(255,255,255,.07); }
html[data-theme="light"] #info-modal .info-member { background: rgba(0,0,0,.03); border-color: rgba(0,0,0,.04); }
#user-modal .star-grant-block, #info-modal .star-grant-block { padding: 14px; border-radius: 16px; background: linear-gradient(135deg, rgba(100,181,239,.10), rgba(224,83,83,.08)); border: 1px solid rgba(255,255,255,.08); }
#user-modal .star-buttons, #info-modal .star-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#user-modal .star-btn, #info-modal .star-btn { padding: 10px; border-radius: 12px; font-weight: 600; }
#user-modal .modal-footer, #info-modal .modal-footer { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; padding: 6px 20px 20px; border-top: 0; justify-content: stretch; }
#user-modal .modal-footer button, #info-modal .modal-footer button { width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 13px; font-size: 14px; font-weight: 600; }
#user-modal .modal-footer .btn-secondary, #info-modal .modal-footer .btn-secondary { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
html[data-theme="light"] #user-modal .modal-footer .btn-secondary, html[data-theme="light"] #info-modal .modal-footer .btn-secondary { background: rgba(0,0,0,.05); border-color: rgba(0,0,0,.08); }
#user-modal .modal-footer .btn-danger, #info-modal .modal-footer .btn-danger { border: 1px solid rgba(224,83,83,.25); }
#user-action-accept, #user-action-decline { order: -2; }
#user-action-write, #info-save { grid-column: 1 / -1; order: -1; }

/* v81: настройки и действия группы/канала */
.gs-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; margin-bottom: 12px; border-radius: 18px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); }
html[data-theme="light"] .gs-card { background: rgba(0,0,0,.03); border-color: rgba(0,0,0,.06); }
.gs-title { font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--text-secondary); }
.gs-field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.gs-field .form-input { font-size: 14.5px; font-weight: 400; padding: 11px 13px; border-radius: 12px; }
.gs-field textarea.form-input { resize: none; min-height: 84px; line-height: 1.45; }
.gs-note { font-size: 11.5px; color: var(--text-muted); }
.gs-card .settings-check { padding: 4px 0; background: transparent; border-radius: 0; transform: none; }
.gs-card .settings-check:hover { background: transparent; transform: none; }
.gs-card .sc-text b { display: block; font-size: 14.5px; font-weight: 600; }
.gs-card .sc-text small { display: block; margin-top: 2px; font-size: 12px; line-height: 1.4; color: var(--text-muted); }
.gs-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.gs-action { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border-radius: 15px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); color: var(--text-primary); text-align: left; cursor: pointer; transition: background .2s, transform .2s var(--ease-spring); }
.gs-action:hover { background: rgba(255,255,255,.09); transform: translateY(-1px); }
.gs-action:active { transform: scale(.98); }
html[data-theme="light"] .gs-action { background: rgba(0,0,0,.04); border-color: rgba(0,0,0,.07); color: #111827; }
html[data-theme="light"] .gs-action:hover { background: rgba(0,0,0,.08); }
.gs-ico { width: 36px; height: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 11px; background: rgba(var(--nx-a2-rgb),.18); color: var(--accent-light); }
.gs-ico svg { width: 18px; height: 18px; }
.gs-txt { flex: 1; min-width: 0; }
.gs-txt b { display: block; font-size: 14px; font-weight: 600; }
.gs-txt small { display: block; margin-top: 1px; font-size: 12px; font-weight: 400; color: var(--text-muted); }
.gs-chev { font-size: 22px; line-height: 1; color: var(--text-muted); }
.gs-action-danger .gs-ico { background: rgba(224,83,83,.15); color: #ff8a8a; }
.gs-action-danger .gs-txt b { color: #ff8a8a; }
.gs-action-danger:hover { background: rgba(224,83,83,.12); border-color: rgba(224,83,83,.25); }
.gs-danger { background: rgba(224,83,83,.04); border-color: rgba(224,83,83,.18); }
.gs-danger .gs-title { color: #ff8a8a; }

/* v82: карточка приглашения в чате */
.inv-card { display: flex; align-items: center; gap: 12px; margin: 6px 0 2px; padding: 10px 12px; min-width: 250px; max-width: 360px; border-radius: 14px; background: rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.08); border-left: 3px solid var(--accent-light); white-space: normal; text-align: left; cursor: default; }
html[data-theme="light"] .inv-card { background: rgba(0,0,0,.05); border-color: rgba(0,0,0,.08); border-left-color: var(--accent); }
.inv-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; line-height: 1.35; }
.inv-row { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-primary); }
.inv-row i { font-style: normal; color: var(--text-muted); margin-right: 5px; }
.inv-row b { font-weight: 700; }
.inv-btn { flex-shrink: 0; padding: 10px 14px; border: 0; border-radius: 12px; font-size: 13px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--nx-a2), var(--nx-a3)); box-shadow: 0 4px 14px rgba(var(--nx-a2-rgb),.35); cursor: pointer; transition: filter .2s, transform .2s var(--ease-spring); }
.inv-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.inv-btn:disabled { opacity: .6; cursor: default; }
.inv-btn.joined { background: rgba(255,255,255,.14); box-shadow: none; }
html[data-theme="light"] .inv-btn.joined { background: rgba(0,0,0,.1); color: #111827; }
.inv-loading { font-size: 12.5px; color: var(--text-muted); }
@media (max-width: 520px) { .inv-card { flex-direction: column; align-items: stretch; min-width: 0; } .inv-btn { width: 100%; } }

/* v83: фиксированный размер окна информации */
#info-modal .modal-card { height: min(680px, 88vh); height: min(680px, 88dvh); }
#info-modal .modal-body { flex: 1; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; }
#info-modal .info-panel { min-height: 0; }
#info-modal .media-empty { padding: 40px 0; text-align: center; }

/* v84: системные события, карточка и окно приглашения, копируемый ник */
.msg-system.msg-system-evt { font-style: normal; font-size: 12.5px; color: var(--text-secondary); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.05); padding: 6px 14px; max-width: 90%; text-align: center; }
.msg-system-evt b { color: var(--text-primary); font-weight: 600; }
.msg-system-evt.sys-kick { background: rgba(224,83,83,.10); border-color: rgba(224,83,83,.18); }
html[data-theme="light"] .msg-system.msg-system-evt { background: rgba(0,0,0,.05); border-color: rgba(0,0,0,.06); }
.copyable { cursor: pointer; border-radius: 8px; padding: 2px 8px; transition: background .2s; }
.copyable:hover { background: rgba(var(--nx-a2-rgb),.18); }
.inv-card { gap: 14px; min-width: 280px; max-width: 380px; padding: 12px 14px; border-radius: 18px; background: linear-gradient(135deg, rgba(var(--nx-a2-rgb),.24), rgba(0,0,0,.18)); border: 1px solid rgba(255,255,255,.10); box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.inv-ava { width: 52px; height: 52px; font-size: 20px; flex-shrink: 0; box-shadow: 0 0 0 3px rgba(var(--nx-a2-rgb),.28); }
.inv-title b { font-size: 14.5px; }
.inv-desc { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.inv-btn { padding: 11px 16px; border-radius: 13px; }
@media (max-width: 520px) { .inv-card { flex-direction: row; flex-wrap: wrap; min-width: 0; } .inv-left { flex-basis: calc(100% - 70px); } .inv-btn { width: 100%; } }
#invite-accept-modal .modal-card { max-width: 400px; border-radius: 24px; box-shadow: 0 24px 70px rgba(0,0,0,.55); background-image: radial-gradient(120% 230px at 50% 0, rgba(var(--nx-a2-rgb),.30), transparent); }
#invite-accept-modal .modal-header { border-bottom: 0; justify-content: center; padding: 18px 20px 0; }
#invite-accept-modal .modal-header h3 { font-size: 12.5px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--text-secondary); }
#invite-accept-avatar { width: 104px; height: 104px; font-size: 40px; box-shadow: 0 0 0 4px rgba(var(--nx-a2-rgb),.30), 0 12px 30px rgba(0,0,0,.40); }
#invite-accept-modal .user-profile-name { font-size: 22px; font-weight: 700; text-align: center; margin-top: 6px; word-break: break-word; }
#invite-accept-desc { max-width: 100%; padding: 0 8px; text-align: center; font-size: 14px; line-height: 1.5; color: var(--text-secondary); word-break: break-word; }
#invite-accept-status { align-self: center; display: inline-block; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.07); font-size: 13px !important; font-weight: 500; }
#invite-accept-modal .modal-footer { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; padding: 6px 20px 20px; border-top: 0; }
#invite-accept-modal .modal-footer button { width: 100%; min-height: 46px; border-radius: 13px; font-weight: 600; }

/* v79: демка в карточке */
.call-tile.screen .screen-tile-video,.call-tile.screen .screen-tile-wait,.call-tile.screen .screen-tile-win,.call-tile.screen .screen-tile-name,.call-tile.screen .screen-tile-btn{display:none}
.call-tile-screen-hint{font-size:11px;color:rgba(255,255,255,.55);text-align:center}
.call-tile.screen.watching{cursor:default;background:#000;border-color:rgba(var(--nx-a2-rgb),.9)}
.call-tile.screen.watching:hover{transform:none}
.call-tile.screen.watching .call-tile-screen-preview{display:none}
.call-tile.screen.watching .screen-tile-video{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#000}
.screen-tile-wait,.screen-tile-win{position:absolute;inset:0;align-items:center;justify-content:center;color:#fff;font-size:13px;text-align:center}
.screen-tile-wait{background:rgba(0,0,0,.55);z-index:1}
.screen-tile-win{flex-direction:column;gap:10px;background:#10151d;z-index:3}
.call-tile.screen.watching:not(.has-frame):not(.in-window) .screen-tile-wait{display:flex}
.call-tile.screen.in-window .screen-tile-win{display:flex}
.call-tile.screen.watching .screen-tile-name{display:block;position:absolute;left:10px;bottom:10px;padding:5px 12px;background:rgba(0,0,0,.7);border-radius:8px;font-size:12.5px;color:#fff;z-index:2;opacity:0;transition:opacity .2s}
.call-tile.screen.watching .screen-tile-btn{display:flex;position:absolute;z-index:4;width:36px;height:36px;border-radius:50%;border:none;background:rgba(0,0,0,.7);color:#fff;cursor:pointer;align-items:center;justify-content:center;font-size:15px;opacity:0;pointer-events:none;backdrop-filter:blur(6px);transition:opacity .2s,background .2s,transform .2s}
.screen-tile-open{right:10px;bottom:10px}
.screen-tile-stop{left:10px;top:10px}
.call-tile.screen.watching.ctl-on .screen-tile-btn,.call-tile.screen.watching.ctl-on .screen-tile-name{opacity:1;pointer-events:auto}
.call-tile.screen.watching .screen-tile-btn:hover{background:var(--nx-a2);transform:scale(1.1)}

.nx-verified{display:inline-flex;flex:none;vertical-align:middle;margin-left:2px}
.nx-verified svg{display:block}

.ns-meter{height:6px;border-radius:3px;background:rgba(128,128,128,.25);overflow:hidden;margin:10px 0}
.ns-meter>div{height:100%;width:0;background:var(--nx-a2);transition:width .06s linear}
.ns-hint{display:block;opacity:.65;font-size:12px;margin-top:4px}

/* v82: выбор модели шумоподавления */
.ns-pick{display:flex;flex-direction:column;gap:8px;margin:6px 0 8px}
.ns-pick button{display:flex;align-items:center;gap:10px;text-align:left;padding:11px 14px;border-radius:12px;border:1px solid rgba(128,128,128,.28);background:transparent;color:inherit;font:inherit;cursor:pointer}
.ns-pick button:hover{background:rgba(128,128,128,.12)}
.ns-pick button.active{border-color:var(--nx-a2);background:rgba(var(--nx-a2-rgb),.16)}
.ns-pick .ns-dot{width:16px;height:16px;border-radius:50%;border:2px solid rgba(128,128,128,.6);flex:none;box-sizing:border-box}
.ns-pick button.active .ns-dot{border:5px solid var(--nx-a2)}
.ns-sub{color:#8a97a8;font-weight:400;margin-left:6px}
/* v82: экономия GPU — когда окно не в фокусе, скрыто или свёрнуто, выключаем бесконечные анимации и размытие */
html.nx-idle .blob{display:none!important}
html.nx-idle *,html.nx-idle *::before,html.nx-idle *::after{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
html.nx-idle .blob,
html.nx-idle .form-input:focus,
html.nx-idle .btn-primary:hover,
html.nx-idle .search-input:focus,
html.nx-idle .contact.online .contact-dot,
html.nx-idle .dot-online,
html.nx-idle .user-star,
html.nx-idle .voice-wave.playing span,
html.nx-idle .msg-text .mention-me,
html.nx-idle .typing-dots i,
html.nx-idle .attach-progress-bar,
html.nx-idle .composer-send:hover,
html.nx-idle .rec-dot,
html.nx-idle .display-mode-btn.channel-mode::after,
html.nx-idle .call-live-dot,
html.nx-idle .call-quality-badge.bad,
html.nx-idle .call-tile-sharing,
html.nx-idle .call-tile.speaking,
html.nx-idle .call-tile.speaking .call-tile-avatar,
html.nx-idle .call-tile-screen-icon,
html.nx-idle .call-btn-end:hover,
html.nx-idle .call-btn-accept:hover,
html.nx-idle .call-pulse-ring,
html.nx-idle .incoming-actions .call-btn-accept,
html.nx-idle .settings-email-status.attached,
html.nx-idle .settings-email-status.attached .settings-email-dot,
html.nx-idle .device-current-badge,
html.nx-idle .username-status.ok,
html.nx-idle .password-strength-fill.strong,
html.nx-idle .skeleton,
html.nx-idle .admin-card.online .admin-card-status,
html.nx-idle .admin-badge.creator,
html.nx-idle .admin-loading .spinner,
html.nx-idle .adm-online-dot.on,
html.nx-idle .contact-call-badge,
html.nx-idle .chat-call-badge,
html.nx-idle .msg-failed,
html.nx-idle .nb-ico svg{animation:none!important}

/* v94: профиль человека — медиатека и действия */
#user-avatar,#profile-view-avatar,#info-avatar{cursor:zoom-in}
.pf-tools{margin-top:14px;display:flex;flex-direction:column;gap:12px}
.pf-tabs{display:flex;gap:6px;overflow-x:auto;padding-bottom:2px}
.pf-tab{flex:none;padding:7px 13px;border-radius:var(--radius-full);border:1px solid rgba(255,255,255,.1);background:transparent;color:var(--text-secondary);font:inherit;font-size:13px;cursor:pointer;transition:all .2s}
.pf-tab small{opacity:.7;margin-left:3px}
.pf-tab:hover{background:var(--bg-hover);color:var(--text-primary)}
.pf-tab.active{background:var(--accent);border-color:var(--accent);color:#fff}
.pf-body{min-height:60px;max-height:260px;overflow:auto}
.pf-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}
.pf-cell{aspect-ratio:1;border-radius:8px;overflow:hidden;background:var(--bg-input);cursor:pointer}
.pf-cell img,.pf-cell video{width:100%;height:100%;object-fit:cover;display:block;transition:transform .25s}
.pf-cell:hover img,.pf-cell:hover video{transform:scale(1.06)}
.pf-row{display:flex;gap:10px;align-items:center;padding:9px 11px;border-radius:10px;background:var(--bg-input);margin-bottom:6px;color:var(--text-primary);text-decoration:none;font-size:13px}
.pf-row:hover{background:var(--bg-hover)}
.pf-row audio{flex:1;min-width:0;height:34px}
.pf-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pf-row small{color:var(--text-muted)}
.pf-empty{color:var(--text-muted);font-size:13px;text-align:center;padding:18px}
.pf-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.pf-act{padding:11px;border-radius:12px;border:1px solid rgba(255,255,255,.08);background:var(--bg-input);color:var(--text-primary);font:inherit;font-size:13px;cursor:pointer;transition:background .2s}
.pf-act:hover{background:var(--bg-hover)}
.pf-act.danger{color:var(--danger)}

/* v94: админка */
.adm-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:14px}
.adm-stat{background:var(--bg-panel);border:1px solid rgba(255,255,255,.06);border-radius:var(--radius-lg);padding:12px 14px;display:flex;flex-direction:column;gap:2px}
.adm-stat b{font-size:22px;line-height:1.1}
.adm-stat span{font-size:12px;color:var(--text-secondary)}
.adm-stat.on b{color:var(--success)}
.adm-filters{display:flex;gap:6px;align-items:center;margin-bottom:12px;flex-wrap:wrap}
.adm-pill{padding:7px 14px;border-radius:var(--radius-full);border:1px solid rgba(255,255,255,.1);background:transparent;color:var(--text-secondary);font:inherit;font-size:13px;cursor:pointer;transition:all .2s}
.adm-pill:hover{background:var(--bg-hover);color:var(--text-primary)}
.adm-pill.active{background:var(--accent);border-color:var(--accent);color:#fff}
.adm-count{margin-left:auto;font-size:12px;color:var(--text-muted)}
.adm-row{display:flex;align-items:center;gap:14px;padding:12px 14px;margin-bottom:8px;border-radius:var(--radius-lg);background:var(--bg-panel);border:1px solid rgba(255,255,255,.05);cursor:pointer;transition:background .2s,transform .2s,border-color .2s}
.adm-row:hover{background:var(--bg-hover);border-color:rgba(100,181,239,.25);transform:translateY(-1px)}
.adm-row.online{border-left:3px solid var(--success)}
.adm-ava{position:relative;width:44px;height:44px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:15px}
.adm-dot{position:absolute;right:-1px;bottom:-1px;width:12px;height:12px;border-radius:50%;background:var(--text-muted);border:2px solid var(--bg-panel)}
.adm-dot.on{background:var(--success)}
.adm-main{flex:1;min-width:0}
.adm-name{font-weight:600;font-size:15px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.adm-badge{font-size:10.5px;font-weight:700;padding:2px 8px;border-radius:var(--radius-full);text-transform:uppercase;letter-spacing:.4px}
.adm-badge.cr{background:rgba(245,166,35,.2);color:var(--warning)}
.adm-badge.ad{background:rgba(224,83,83,.2);color:#ff8a8a}
.adm-sub{font-size:12.5px;color:var(--text-secondary);margin-top:2px}
.adm-on{color:var(--success)}
.adm-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.adm-chip{font-size:11.5px;padding:3px 9px;border-radius:var(--radius-full);background:rgba(255,255,255,.06);color:var(--text-secondary)}
.adm-chip.ok{background:rgba(77,212,125,.14);color:var(--success)}
.adm-chip.warn{background:rgba(245,166,35,.15);color:var(--warning)}
.adm-btns{display:flex;gap:6px;flex-shrink:0}
.adm-btn{width:34px;height:34px;border-radius:10px;font-size:15px}
.adm-btn.view{background:rgba(var(--nx-a2-rgb),.2);color:#8bb9e8}
@media(max-width:640px){.adm-stats{grid-template-columns:repeat(2,1fr)}.adm-row{flex-wrap:wrap}.adm-btns{width:100%;justify-content:flex-end}}

/* v95: настройки только для приложения — на сайте серые */
.nx-locked{opacity:.5;filter:grayscale(1);pointer-events:none;user-select:none}
.nx-app-note{color:var(--text-secondary);font-size:12.5px;line-height:1.45;margin:6px 2px 12px}
.ng-add{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:6px}
.ng-add .form-input{flex:1 1 180px;min-width:0}

/* v97: масштаб интерфейса и переключатели */
html.nx-zoomed body{zoom:var(--ui-zoom)}
html.nx-zoomed .app-screen{width:calc(100vw / var(--ui-zoom));height:calc(var(--vvh,100dvh) / var(--ui-zoom))}
.nx-seg{display:flex;flex-wrap:wrap;gap:8px}
.nx-seg button{padding:8px 14px;border-radius:10px;background:var(--bg-input);border:1px solid rgba(128,128,128,.28);color:var(--text-primary);font-size:14px;transition:border-color .15s,box-shadow .15s,color .15s}
.nx-seg button:hover{border-color:var(--accent)}
.nx-seg button.active{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent) inset;color:var(--accent-light)}

/* v98: строка «Язык:» и перевод сообщений */
.nx-lang-row{display:flex;flex-direction:row;align-items:center;gap:12px}
.nx-lang-row .form-label{margin:0}
.settings-section .nx-lang-row select.form-input{width:auto;min-width:200px;padding:10px 14px;color:var(--text-primary);background:var(--bg-input)}
.nx-tr{margin-top:4px}
.nx-tr button{font-size:12px;color:var(--accent-light);padding:2px 0;background:none;opacity:.9}
.nx-tr button:hover{text-decoration:underline}
.nx-tr-res{display:none;margin-top:4px;padding:6px 8px;border-left:2px solid var(--accent);font-size:13.5px;opacity:.95;white-space:pre-wrap}

/* v95: индикатор качества связи (5 точек) на плитке */
#call-quality-badge { display: none !important; }
.call-tile-quality { position: absolute; left: 10px; top: 10px; display: flex; gap: 2px; padding: 4px 5px; border-radius: 8px; background: rgba(0,0,0,.35); z-index: 3; }
.call-tile-quality i { display: block; width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.25); }
.call-tile-quality.q5 i, .call-tile-quality.q4 i:nth-child(-n+4), .call-tile-quality.q3 i:nth-child(-n+3) { background: #4dd47d; }
.call-tile-quality.q2 i:nth-child(-n+2) { background: #f5a623; }
.call-tile-quality.q1 i:nth-child(1) { background: #e05353; }
.call-tile.sharing .call-tile-quality { top: 44px; z-index: 5; }

/* v95: окно выбора качества демки */
.sq-ov { position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; }
.sq-box { background: var(--bg-panel); color: var(--text-primary); border-radius: var(--radius-lg); padding: 20px; width: min(360px, 92vw); box-shadow: var(--shadow-lg); }
.sq-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.sq-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sq-opt { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: var(--radius-md); background: var(--bg-input); cursor: pointer; }
.sq-opt.dis { opacity: .4; cursor: not-allowed; }
.sq-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.sq-btns button { padding: 8px 14px; border: 0; border-radius: var(--radius-md); cursor: pointer; color: #fff; background: var(--bg-hover); }
.sq-btns .sq-go { background: var(--accent); }


/* v96: обводка говорящего без перезапуска анимации плитки */
.call-tile.speaking { animation: callTileIn .5s var(--ease-spring) !important; box-shadow: none !important; }
html.nx-idle .call-tile.speaking { animation: callTileIn .5s var(--ease-spring) !important; }
.call-tile::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1; opacity: 0; box-shadow: inset 0 0 0 3px #4dd47d, inset 0 0 24px rgba(77, 212, 125, .35); transition: opacity .3s ease; }
.call-tile.speaking::after { opacity: 1; }
.call-tile-avatar { transition: transform .3s ease; }
.call-tile.speaking .call-tile-avatar, html.nx-idle .call-tile.speaking .call-tile-avatar { animation: none !important; transform: scale(1.05); }

/* одиночный эмодзи-стикер нельзя выделить мышкой */
.msg-text.emoji-1, .msg-text.emoji-1 * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-user-drag: none; }


/* v91: скорость голосовых и выбор устройств в звонке */
.voice-speed { flex-shrink:0; min-width:34px; height:24px; padding:0 6px; border:0; border-radius:12px; background:rgba(255,255,255,.15); color:#fff; font-size:11px; font-weight:700; cursor:pointer; }
.voice-speed:hover { background:rgba(255,255,255,.28); }
.msg.other .voice-speed { background:rgba(0,0,0,.25); }
.call-btn-wrap { position:relative; display:inline-flex; }
.call-dev-arrow { position:absolute; top:-2px; right:-2px; width:20px; height:20px; padding:0; border-radius:50%; display:flex; align-items:center; justify-content:center; background:var(--bg-panel); color:var(--text-primary); border:1px solid rgba(255,255,255,.18); cursor:pointer; z-index:3; box-shadow:var(--shadow-sm); }
.call-dev-arrow:hover { background:var(--bg-hover); }
.call-dev-menu { position:fixed; z-index:4000; min-width:220px; max-width:min(340px,92vw); max-height:50vh; overflow:auto; padding:6px; border-radius:12px; background:var(--bg-panel); border:1px solid rgba(255,255,255,.12); box-shadow:var(--shadow-lg); }
.call-dev-title { padding:6px 10px 4px; font-size:11px; letter-spacing:.04em; text-transform:uppercase; color:var(--text-muted); }
.call-dev-menu button { display:block; width:100%; text-align:left; padding:8px 10px; border:0; border-radius:8px; background:transparent; color:var(--text-primary); font-size:13px; cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.call-dev-menu button:hover { background:var(--bg-hover); }
.call-dev-menu button.active { color:var(--accent-light); }

/* ===== стикеры ===== */
@keyframes nxPop{from{opacity:0;transform:translateY(10px) scale(.94)}to{opacity:1;transform:none}}
#stk-panel{width:360px;height:380px;max-height:62vh;left:100px;transform-origin:bottom left;animation:nxPop .22s cubic-bezier(.2,.9,.3,1.2)}
.stk-tabs{display:flex;gap:4px;padding:8px 8px 0;overflow-x:auto;scrollbar-width:none;flex:none;border-bottom:1px solid rgba(255,255,255,.07)}
.stk-tabs::-webkit-scrollbar{display:none}
.stk-tab{flex:none;width:42px;height:42px;border-radius:10px 10px 0 0;border:0;background:none;display:flex;align-items:center;justify-content:center;font-size:20px;color:var(--text-primary);cursor:pointer;position:relative;transition:background .2s,transform .2s}
.stk-tab img{width:32px;height:32px;object-fit:contain}
.stk-tab:hover{background:rgba(255,255,255,.08);transform:translateY(-2px)}
.stk-tab.active{background:rgba(var(--nx-a2-rgb),.25)}
.stk-tab.active::after{content:'';position:absolute;left:6px;right:6px;bottom:0;height:2px;border-radius:2px;background:var(--accent-light,#6aa6e8);animation:nxPop .25s}
.stk-body{flex:1;overflow-y:auto;padding:8px}
.stk-head{display:flex;align-items:center;gap:8px;padding:2px 2px 8px;font-size:14px}
.stk-head b{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.stk-act{border:0;border-radius:14px;padding:6px 12px;font-size:12.5px;background:rgba(var(--nx-a2-rgb),.35);color:#fff;cursor:pointer;transition:transform .15s,background .2s}
.stk-act:hover{transform:scale(1.06);background:rgba(var(--nx-a2-rgb),.6)}
.stk-act.on{background:rgba(61,220,132,.3)}
.stk-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.stk-grid h4{grid-column:1/-1;margin:6px 2px 0;font-size:12px;color:var(--text-muted)}
.stk-cell{aspect-ratio:1;padding:3px;border:0;border-radius:12px;background:none;cursor:pointer;animation:nxPop .28s both;transition:transform .18s cubic-bezier(.34,1.56,.64,1),background .2s}
.stk-cell img{width:100%;height:100%;object-fit:contain;display:block}
.stk-cell:hover{background:rgba(255,255,255,.08);transform:scale(1.1)}
.stk-cell:active{transform:scale(.92)}
.stk-empty{padding:40px 16px;text-align:center;color:var(--text-muted);font-size:13px}
.nx-sticker{display:block;width:160px;max-width:100%;height:auto;border-radius:16px;animation:nxPop .3s}
@media(max-width:700px){#stk-panel{left:8px!important;right:8px;width:auto}}
/* ===== стрелки выбора устройств ===== */
.call-dev-arrow{transition:background .2s,transform .25s}
.call-dev-arrow svg{transition:transform .35s cubic-bezier(.34,1.56,.64,1)}
.call-dev-arrow.open{background:var(--accent,var(--nx-a2));color:#fff;transform:scale(1.12)}
.call-dev-arrow.open svg{transform:rotate(180deg)}
.call-dev-menu{transform-origin:bottom center;animation:nxMenuIn .22s cubic-bezier(.2,.9,.3,1.2)}
.call-dev-menu.out{animation:nxMenuOut .16s ease forwards;pointer-events:none}
.call-dev-menu button{animation:nxMenuIn .26s both}
.call-dev-menu button:nth-child(2){animation-delay:.03s}.call-dev-menu button:nth-child(3){animation-delay:.06s}.call-dev-menu button:nth-child(4){animation-delay:.09s}.call-dev-menu button:nth-child(n+5){animation-delay:.12s}
@keyframes nxMenuIn{from{opacity:0;transform:translateY(8px) scale(.95)}to{opacity:1;transform:none}}
@keyframes nxMenuOut{to{opacity:0;transform:translateY(6px) scale(.95)}}
/* ===== просмотр демки: видно целиком + панель по движению мыши ===== */
.screen-viewer video{position:absolute;inset:0;width:100%;height:100%;flex:none;object-fit:contain}
.screen-viewer .screen-viewer-header{position:absolute;top:0;left:0;right:0;z-index:5;transition:opacity .3s,transform .3s}
.screen-viewer:not(.sv-on) .screen-viewer-header{opacity:0!important;pointer-events:none;transform:translateY(-12px)}
.screen-viewer.sv-on .screen-viewer-header{opacity:1!important;pointer-events:auto;transform:none}
.screen-viewer:not(.sv-on){cursor:none}
.sv-bar{position:absolute;left:50%;bottom:24px;z-index:5;display:flex;gap:14px;padding:10px 18px;border-radius:999px;background:rgba(14,22,33,.72);backdrop-filter:blur(12px);opacity:0;pointer-events:none;transform:translate(-50%,18px);transition:opacity .3s,transform .35s cubic-bezier(.34,1.56,.64,1)}
.screen-viewer.sv-on .sv-bar{opacity:1;pointer-events:auto;transform:translateX(-50%)}

/* ===== правая панель: эмодзи / стикеры ===== */
.app-screen.sp-open{grid-template-columns:var(--sidebar-width) 4px 1fr 340px}
.sp-panel{display:none;grid-column:4;flex-direction:column;min-width:0;height:100%;overflow:hidden;background:var(--bg-secondary,var(--v-1d1d38));color:var(--text-primary);border-left:1px solid rgba(255,255,255,.07)}
.sp-open .sp-panel{display:flex;animation:nxPop .2s}
html[data-theme='light'] .sp-panel{background:#fff;border-color:rgba(0,0,0,.08)}
.sp-top{display:flex;align-items:center;gap:6px;padding:10px;border-bottom:1px solid rgba(255,255,255,.07);flex:none}
.sp-tab{flex:1;border:0;border-radius:10px;padding:9px 6px;background:none;color:var(--text-muted);font-size:14px;cursor:pointer;transition:background .2s}
.sp-tab.on{background:rgba(var(--nx-a2-rgb),.28);color:var(--text-primary)}
.sp-x{border:0;background:none;color:var(--text-muted);font-size:16px;cursor:pointer;padding:6px 8px}
.sp-body{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column}
.sp-stk{flex:1;padding:4px 10px}
.sp-stk h4,.sp-ph{margin:12px 2px 6px;font-size:13px;color:var(--text-muted)}
.sp-ph{display:flex;align-items:center;gap:6px}
.sp-ph b{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.sp-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}
.sp-grid.e{grid-template-columns:repeat(8,1fr);padding:8px}
.sp-grid.v{grid-template-columns:repeat(4,1fr);max-height:50vh;overflow-y:auto}
.sp-s,.sp-e{aspect-ratio:1;padding:3px;border:0;border-radius:10px;background:none;cursor:pointer;transition:transform .15s,background .2s}
.sp-e{padding:0;font-size:22px}
.sp-s:hover,.sp-e:hover{background:rgba(255,255,255,.08);transform:scale(1.1)}
.sp-s img,.sp-grid.v img,.sp-prev img{width:100%;height:100%;aspect-ratio:1;object-fit:contain;display:block}
.sp-cats{display:flex;gap:2px;padding:6px 8px;overflow-x:auto;flex:none;scrollbar-width:none}
.sp-cat{flex:none;width:34px;height:34px;border:0;border-radius:8px;background:none;font-size:18px;cursor:pointer}
.sp-cat.on{background:rgba(var(--nx-a2-rgb),.28)}
.sp-foot{position:sticky;bottom:0;padding:10px;background:var(--bg-secondary,var(--v-1d1d38))}
html[data-theme='light'] .sp-foot{background:#fff}
.sp-new{width:100%;padding:10px;font-size:13.5px}
.sp-modal{position:fixed;inset:0;z-index:9999;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;padding:16px}
.sp-box{width:380px;max-width:100%;max-height:85vh;overflow-y:auto;background:var(--v-1d1d38);color:var(--text-primary);border-radius:16px;padding:18px;box-shadow:0 20px 60px rgba(0,0,0,.5);animation:nxPop .2s}
html[data-theme='light'] .sp-box{background:#fff}
.sp-box h3{margin:0 0 10px;font-size:16px}
.sp-in{width:100%;box-sizing:border-box;padding:10px 12px;border-radius:10px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);color:inherit;margin:4px 0 10px;font-size:14px}
.sp-prev{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;max-height:180px;overflow-y:auto}
.sp-row{display:flex;gap:8px;justify-content:flex-end;margin-top:12px}
.sp-hint{font-size:12px;color:var(--text-muted);margin-top:10px}
.nx-sticker{cursor:pointer}
@media(max-width:700px){.app-screen.sp-open{grid-template-columns:1fr!important}.sp-open .sp-panel{position:fixed;inset:0;z-index:60;grid-column:auto}}

/* ===== стикеры v3: кнопки, навигация, редактор ===== */
.sp-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:0;border-radius:12px;padding:10px 16px;font-size:13.5px;font-weight:600;color:#fff;cursor:pointer;background:linear-gradient(135deg,var(--nx-a2),#8b5cf6);box-shadow:0 4px 14px rgba(var(--nx-a2-rgb),.35);transition:transform .15s,box-shadow .2s,filter .2s,opacity .2s}
.sp-btn:hover{transform:translateY(-1px);filter:brightness(1.1);box-shadow:0 6px 18px rgba(var(--nx-a2-rgb),.5)}
.sp-btn:active{transform:scale(.96)}
.sp-btn:disabled{opacity:.45;cursor:not-allowed;transform:none;filter:none;box-shadow:none}
.sp-btn.ghost{background:rgba(255,255,255,.07);box-shadow:none;color:var(--text-primary)}
.sp-btn.ghost:hover{background:rgba(255,255,255,.13)}
.sp-btn.ok{background:rgba(61,220,132,.18);color:#3ddc84;box-shadow:none}
.sp-btn.big{width:100%;padding:13px}
html[data-theme='light'] .sp-btn.ghost{background:rgba(0,0,0,.06)}
.sp-ico{width:30px;height:30px;flex:none;display:flex;align-items:center;justify-content:center;border:0;border-radius:9px;background:rgba(255,255,255,.07);color:var(--text-muted);cursor:pointer;transition:background .18s,color .18s,transform .15s}
.sp-ico:hover{background:rgba(var(--nx-a2-rgb),.32);color:#fff;transform:scale(1.08)}
.sp-ico.danger:hover{background:rgba(255,90,90,.3);color:#ff8a8a}
.sp-pill{display:inline-flex;align-items:center;gap:5px;height:30px;padding:0 11px;border:0;border-radius:15px;background:rgba(255,255,255,.07);color:var(--text-muted);font-size:12.5px;cursor:pointer;transition:background .18s,color .18s}
.sp-pill:hover{background:rgba(255,90,90,.25);color:#ff9a9a}
.sp-tag{font-style:normal;font-size:11px;padding:2px 7px;border-radius:8px;background:rgba(var(--nx-a2-rgb),.25);color:var(--accent-light,#6aa6e8)}
.sp-nav{position:sticky;top:0;z-index:2;display:flex;gap:2px;padding:6px 8px;overflow-x:auto;flex:none;scrollbar-width:none;background:var(--bg-secondary,var(--v-1d1d38));border-bottom:1px solid rgba(255,255,255,.06)}
html[data-theme='light'] .sp-nav{background:#fff}
.sp-nav::-webkit-scrollbar{display:none}
.sp-nb{flex:none;width:36px;height:36px;border:0;border-radius:10px;background:none;color:var(--text-muted);font-size:19px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .18s,color .18s}
.sp-nb img{width:26px;height:26px;object-fit:contain}
.sp-nb:hover{background:rgba(255,255,255,.08)}
.sp-nb.on{background:rgba(var(--nx-a2-rgb),.3);color:#fff}
.sp-sec{margin:0 0 6px;scroll-margin-top:52px}
.sp-sec .sp-ph{margin:12px 2px 6px;color:var(--text-primary)}
.sp-grid.e{grid-template-columns:repeat(8,1fr);padding:0}
.sp-none{padding:10px 4px;font-size:12.5px;color:var(--text-muted)}
.sp-drop{text-align:center;border:2px dashed rgba(255,255,255,.18);border-radius:14px;padding:18px 10px;cursor:pointer;transition:border-color .2s,background .2s;color:var(--text-muted);font-size:12.5px;margin-bottom:10px}
.sp-drop svg{width:26px;height:26px}
.sp-drop b{display:block;color:var(--text-primary);font-size:14px;margin:6px 0 2px}
.sp-drop:hover,.sp-drop.on{border-color:var(--nx-a2);background:rgba(var(--nx-a2-rgb),.12)}
.sp-pi{position:relative;aspect-ratio:1;border-radius:10px;background:rgba(255,255,255,.05);overflow:hidden}
.sp-pi img{padding:3px;box-sizing:border-box}
.sp-pr{position:absolute;top:3px;right:3px;width:20px;height:20px;border:0;border-radius:50%;background:rgba(0,0,0,.7);color:#fff;font-size:11px;line-height:1;cursor:pointer;opacity:0;transition:opacity .15s}
.sp-pi:hover .sp-pr{opacity:1}
@media(hover:none){.sp-pr{opacity:1}}
.sp-by{font-size:12.5px;color:var(--text-muted);margin:-6px 0 10px}
.sp-box .sp-row .sp-btn{flex:1}

/* ===== админка: стикеры пользователя ===== */
.adm-tabs{grid-template-columns:repeat(5,1fr)}
.adm-stk-row{display:flex;align-items:center;gap:12px;padding:8px 10px;border-radius:12px;cursor:pointer;transition:background .18s,transform .15s}
.adm-stk-row:hover{background:rgba(255,255,255,.06);transform:translateX(2px)}
.adm-stk-th{width:44px;height:44px;flex:none;border-radius:10px;background:rgba(255,255,255,.06);display:flex;align-items:center;justify-content:center;font-size:20px;overflow:hidden}
.adm-stk-th img{width:100%;height:100%;object-fit:contain;padding:3px;box-sizing:border-box}
.adm-stk-i{flex:1;min-width:0;display:flex;flex-direction:column}
.adm-stk-i b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.adm-stk-i small{color:var(--text-muted);font-size:12px}
.adm-stk-go{color:var(--text-muted);font-size:20px}

.sp-pill.del{color:#ff9a9a;background:rgba(255,90,90,.14)}
.sp-pill.del:hover{background:rgba(255,90,90,.32);color:#fff}
.sp-btn.danger{background:rgba(255,90,90,.18);color:#ff8a8a;box-shadow:none}
.sp-btn.danger:hover{background:rgba(255,90,90,.34);color:#fff;box-shadow:none}
.nx-sticker-gone{display:inline-block;padding:8px 12px;border-radius:12px;background:rgba(255,255,255,.07);color:var(--text-muted);font-size:13px}

.sp-grid.e{contain:layout style}
.sp-e{transition:background .12s}
.sp-e:hover{transform:none}

/* v97: панель эмодзи без лагов */
.emoji-grid { contain: layout paint style; overscroll-behavior: contain; }
.emoji-grid .emoji-cell { animation: none !important; transition: none; content-visibility: auto; contain-intrinsic-size: auto 38px; }
.emoji-grid .emoji-cell:hover { animation: none !important; background: rgba(255,255,255,.1); }
html[data-theme="light"] .emoji-grid .emoji-cell:hover { background: rgba(0,0,0,.08); }

/* v99: emoji grid */
.emoji-grid { overflow-anchor: none; overscroll-behavior: contain; contain: layout paint; }
.emoji-grid .emoji-cell { animation: none !important; transition: none; }
.emoji-grid .emoji-cell:hover { animation: none !important; background: rgba(255,255,255,.1); }
html[data-theme="light"] .emoji-grid .emoji-cell:hover { background: rgba(0,0,0,.08); }

/* v100: Apple-эмодзи в панели без подмены */
.emoji-grid .nx-e { display: inline-block; line-height: 1.15; background-repeat: no-repeat; background-position: center; background-size: contain; vertical-align: -.18em; }
.emoji-grid .nx-e.ok { color: transparent; text-shadow: none; }

/* v101: panel scroll perf */
.emoji-picker { overflow: visible; }
.emoji-tabs { border-radius: 13px 13px 0 0; }
.emoji-grid { background: var(--v-1d1d38); border-radius: 0 0 13px 13px; will-change: scroll-position; }
html[data-theme="light"] .emoji-grid { background: #fff; }
.emoji-grid .emoji-cell { position: static; overflow: visible; }
.emoji-grid.nx-scr .emoji-cell { pointer-events: none; }
.emoji-grid .nx-e { vertical-align: middle; }
.emoji-grid .nx-e.ok { width: 1.2em; height: 1.2em; }

.nx-mirror{position:absolute;pointer-events:none;overflow:hidden;white-space:pre-wrap;overflow-wrap:break-word;word-wrap:break-word;box-sizing:border-box;border-style:solid;border-color:transparent;color:var(--text-primary);z-index:2}
.nx-mirror .nx-e{line-height:inherit}
.composer-input.nx-mtxt{color:transparent!important;caret-color:var(--text-primary,#fff)}
.composer-input.nx-mtxt::placeholder{color:var(--text-muted)}

.auth-consents{display:flex;flex-direction:column;gap:8px}
.auth-check{display:flex;align-items:flex-start;gap:10px;font-size:13px;line-height:1.4;color:var(--text-secondary);cursor:pointer;user-select:none}
.auth-check input{width:18px;height:18px;margin:1px 0 0;flex:none;cursor:pointer}
.auth-check a{color:#8a6cff}
.auth-legal{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 14px;margin-top:12px;font-size:12px}
.auth-legal a,.settings-legal a{color:var(--text-muted);text-decoration:none}
.auth-legal a:hover,.settings-legal a:hover{text-decoration:underline}
.settings-legal{display:flex;flex-direction:column;gap:6px;padding:12px 16px;font-size:12px;margin-top:auto}

.auth-check{padding:10px 12px;gap:12px;border-radius:12px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);transition:background .2s,border-color .2s}
.auth-check:hover{background:rgba(255,255,255,.07)}
.auth-check:has(input:checked){border-color:rgba(138,108,255,.5);background:rgba(138,108,255,.1)}
.auth-check input{-webkit-appearance:none;appearance:none;display:grid;place-content:center;width:22px;height:22px;margin:0;border-radius:7px;border:2px solid rgba(255,255,255,.3);background:transparent;transition:background .2s,border-color .2s,box-shadow .2s}
.auth-check input::after{content:"";width:11px;height:6px;margin-top:-2px;border-left:2.5px solid #fff;border-bottom:2.5px solid #fff;transform:rotate(-45deg) scale(0);transition:transform .18s cubic-bezier(.34,1.56,.64,1)}
.auth-check input:checked{background:linear-gradient(135deg,var(--nx-a2),#8a6cff);border-color:transparent;box-shadow:0 2px 10px rgba(110,108,255,.45)}
.auth-check input:checked::after{transform:rotate(-45deg) scale(1)}
.auth-check input:focus-visible{outline:2px solid #8a6cff;outline-offset:2px}
html[data-theme="light"] .auth-check{background:rgba(0,0,0,.03);border-color:rgba(0,0,0,.1)}
html[data-theme="light"] .auth-check input{border-color:rgba(0,0,0,.3)}
.nx-consent-ov{position:fixed;inset:0;z-index:100000;background:rgba(0,0,0,.72);backdrop-filter:blur(6px);display:flex;align-items:center;justify-content:center;padding:16px}
.nx-consent-box{width:100%;max-width:440px;max-height:92vh;overflow:auto;background:var(--bg-secondary,var(--v-1d1d38));color:var(--text-primary,#fff);border-radius:18px;padding:24px;box-shadow:0 20px 60px rgba(0,0,0,.55);display:flex;flex-direction:column;gap:10px}
.nx-consent-box h3{margin:0;font-size:19px}
.nx-consent-box p{margin:0 0 4px;font-size:13.5px;line-height:1.5;opacity:.8}
.nx-consent-out{background:none;border:0;color:var(--text-muted);cursor:pointer;font-size:13px;padding:6px;text-decoration:underline}

.nx-rep-opt{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;cursor:pointer;font-size:14px}
.nx-rep-opt:hover{background:rgba(255,255,255,.06)}
.nx-rep-opt input{width:16px;height:16px;margin:0;accent-color:var(--accent)}
/* спокойный вид: без свечения, градиентов и прыгающих анимаций */
:root{--font:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;--radius-md:8px;--radius-lg:10px;--radius-xl:14px;--shadow-md:0 2px 8px rgba(0,0,0,.25);--shadow-lg:0 8px 24px rgba(0,0,0,.4)}
.blob,.auth-grid{display:none}
.auth-card{backdrop-filter:none;-webkit-backdrop-filter:none;background:var(--bg-panel);border:1px solid rgba(255,255,255,.08);box-shadow:var(--shadow-lg);animation:none}
html[data-theme="light"] .auth-card{background:#fff;border-color:rgba(0,0,0,.1)}
.auth-logo-icon,.avatar.nexus-avatar,.msg-file-icon{background:var(--accent)}
.auth-logo-icon:hover,.avatar:hover,.msg-avatar:hover,.msg-attachment:hover,.msg-file:hover,.msg-reply-preview:hover,.msg-text .mention:hover{transform:none;box-shadow:none}
.btn-primary,.auth-tab-slider{background:var(--accent);background-image:none;animation:none}
.btn-primary:hover{transform:none;box-shadow:none;animation:none;filter:brightness(1.12)}
.btn-primary:active,.btn-secondary:active,.btn-danger:active{transform:none}
.btn-primary::after,.btn-secondary::after,.btn-danger::after{display:none}
.form-input:focus{box-shadow:none;animation:none;background:rgba(0,0,0,.35)}
.auth-error.visible{animation:none}
.msg.new-msg.own,.msg.new-msg.other{animation:none}
.msg-bubble{border-radius:12px;box-shadow:none}
.msg.own .msg-bubble{background:var(--bg-msg-own);border-bottom-right-radius:4px}
.msg-bubble.call-bubble{background-image:none}
.msg-check.read{text-shadow:none;animation:none}
.msg-text .mention-me{animation:none}
.avatar{box-shadow:none}
.auth-check input:checked{background:var(--accent);box-shadow:none}
.auth-check:has(input:checked){background:rgba(255,255,255,.05);border-color:var(--accent)}
.auth-check a,.auth-check a:visited{color:var(--accent-light)}

/* профили, группы, каналы: плоские списки действий как в Telegram/Discord */
#user-modal .modal-card,#info-modal .modal-card,#profile-modal .modal-card{border-radius:12px;background:var(--bg-panel);background-image:none;box-shadow:0 8px 28px rgba(0,0,0,.45);max-width:400px;max-height:92vh;display:flex;flex-direction:column}
#user-modal .modal-body,#info-modal .modal-body{overflow-y:auto;min-height:0}
#user-modal .modal-footer,#info-modal .modal-footer{flex:none}
#user-modal .modal-header h3,#info-modal .modal-header h3,#profile-modal .modal-header h3{font-size:16px;font-weight:600;letter-spacing:0;text-transform:none;color:var(--text-primary)}
#user-modal .user-profile-status{background:none;padding:0;font-size:13px;color:var(--text-muted)}
#user-modal .user-profile-status::before{display:none}
#user-modal .user-profile-status.online{background:none;color:var(--accent-light)}
#user-modal .user-profile-bio,#info-modal .info-desc,#profile-modal .profile-view-bio{background:none;border:0;border-top:1px solid rgba(255,255,255,.08);border-radius:0;padding:12px 0 4px;text-align:left;font-size:14px}
html[data-theme="light"] #user-modal .user-profile-bio,html[data-theme="light"] #info-modal .info-desc{border-top-color:rgba(0,0,0,.1);background:none}
#user-modal .star-grant-block,#info-modal .star-grant-block{background:none;border:1px solid rgba(255,255,255,.1);border-radius:8px}
#user-modal .pf-act{border-radius:8px;background:rgba(255,255,255,.04);border:0}
#user-modal .modal-footer{display:flex;flex-direction:column;gap:0;padding:0 0 8px;border-top:1px solid rgba(255,255,255,.08)}
#user-modal .modal-footer button{width:100%;min-height:46px;padding:0 20px;border:0;border-radius:0;background:none;text-align:left;justify-content:flex-start;font-size:15px;font-weight:400;color:var(--text-primary)}
#user-modal .modal-footer button:hover{background:rgba(255,255,255,.05)}
#user-modal .modal-footer .btn-secondary,#user-modal .modal-footer .btn-danger{background:none;border:0}
#user-modal .modal-footer .btn-primary{background:none;color:var(--accent-light)}
#user-modal #user-action-write{width:calc(100% - 40px);margin:12px 20px 6px;min-height:42px;border-radius:8px;justify-content:center;text-align:center;background:var(--accent);color:#fff;font-weight:500}
#user-modal #user-action-write:hover{background:var(--accent);filter:brightness(1.1)}
#user-modal #user-action-report,#user-modal #user-action-block,#user-modal #user-action-decline{color:var(--danger)}
html[data-theme="light"] #user-modal .modal-footer button{color:#111827}
html[data-theme="light"] #user-modal .modal-footer{border-top-color:rgba(0,0,0,.1)}
html[data-theme="light"] #user-modal .modal-footer button:hover{background:rgba(0,0,0,.05)}
html[data-theme="light"] #user-modal #user-action-write{color:#fff}
html[data-theme="light"] #user-modal #user-action-report,html[data-theme="light"] #user-modal #user-action-block,html[data-theme="light"] #user-modal #user-action-decline{color:var(--danger)}
.info-tabs{background:none;border-radius:0;padding:0;gap:0;margin-bottom:10px;border-bottom:1px solid rgba(255,255,255,.08)}
html[data-theme="light"] .info-tabs{background:none;border-bottom-color:rgba(0,0,0,.1)}
.info-tab{border-radius:0;padding:10px 12px;border-bottom:2px solid transparent;color:var(--text-secondary)}
.info-tab:hover{transform:none}
.info-tab.active{background:none;color:var(--accent-light);border-bottom-color:var(--accent-light);font-weight:500}
.gs-card{border-radius:0;background:none;border:0;border-top:1px solid rgba(255,255,255,.08);padding:12px 0;margin-bottom:0}
html[data-theme="light"] .gs-card{background:none;border-top-color:rgba(0,0,0,.1)}
.gs-title{font-size:13px;font-weight:600;letter-spacing:0;text-transform:none;color:var(--accent-light)}
.gs-actions{gap:0;margin:8px 0 0;border-top:1px solid rgba(255,255,255,.08)}
.gs-action{padding:12px 4px;border:0;border-radius:0;background:none;transform:none;font-size:15px}
.gs-action:hover{background:rgba(255,255,255,.05);transform:none}
.gs-action:active{transform:none}
html[data-theme="light"] .gs-action,html[data-theme="light"] .gs-action:hover{border:0}
html[data-theme="light"] .gs-action{background:none}
html[data-theme="light"] .gs-action:hover{background:rgba(0,0,0,.05)}
.gs-action.gs-action-danger,html[data-theme="light"] .gs-action.gs-action-danger{color:var(--danger)}
.info-member{animation:none}
.info-member:hover{transform:none}
.settings-check:hover{transform:none}

/* цвет кнопок как в окне «Скачать приложение» */
.btn-primary,.auth-tab-slider,.auth-logo-icon,.avatar.nexus-avatar,.msg-file-icon{background:linear-gradient(135deg,var(--nx-a2),var(--nx-a3));background-size:100% 100%}
#user-modal #user-action-write,#user-modal #user-action-write:hover{background:linear-gradient(135deg,var(--nx-a2),var(--nx-a3));background-size:100% 100%}
.auth-check input:checked{background:linear-gradient(135deg,var(--nx-a2),var(--nx-a3))}
.auth-check:has(input:checked){border-color:var(--nx-a2)}
.auth-check a,.auth-check a:visited{color:var(--nx-l)}

/* ===== v110: модерация жалоб ===== */
.nx-act-row{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 2px}
.nx-act{border:0;border-radius:10px;padding:7px 12px;font:inherit;font-size:13px;font-weight:600;cursor:pointer;color:#fff;background:var(--nx-a2);transition:filter .15s,transform .1s}
.nx-act:hover{filter:brightness(1.12)}.nx-act:active{transform:scale(.97)}.nx-act:disabled{opacity:.5;cursor:default}
.nx-act.ok{background:#2e9d5a}.nx-act.no{background:#6b7280}.nx-act.danger{background:#d64545}.nx-act.warn{background:#c9822a}.nx-act.info{background:#3d6fa8}
.nx-mod-ov{position:fixed;inset:0;z-index:100001;background:rgba(0,0,0,.72);backdrop-filter:blur(6px);display:flex;align-items:center;justify-content:center;padding:12px}
.nx-mod-box{width:100%;max-width:620px;max-height:90vh;display:flex;flex-direction:column;background:var(--v-1d1d38);color:#e8eef5;border-radius:16px;overflow:hidden;box-shadow:0 10px 40px rgba(0,0,0,.5)}
.nx-mod-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px 4px}
.nx-mod-title{font-size:17px;font-weight:700}.nx-mod-x{background:none;border:0;color:#9aa8b6;font-size:26px;line-height:1;cursor:pointer}
.nx-mod-sub{padding:0 16px 10px;font-size:13px;color:#8fa1b3}
.nx-mod-tabs{display:flex;gap:6px;padding:0 12px 10px;flex-wrap:wrap}
.nx-mod-tab{border:0;border-radius:18px;padding:7px 14px;background:#232f3c;color:#cdd9e5;font:inherit;font-size:13px;cursor:pointer}.nx-mod-tab.on{background:#3d6fa8;color:#fff}
.nx-mod-body{overflow:auto;padding:0 12px 14px;flex:1;min-height:200px}
.nx-mod-empty{padding:30px;text-align:center;color:#7d8fa1}
.nx-mod-card{display:block;width:100%;text-align:left;background:#1e2a36;border:0;border-radius:12px;padding:12px;margin-bottom:8px;color:inherit;font:inherit}
.nx-mod-ent{cursor:pointer}.nx-mod-ent:hover{background:#25344a}
.nx-mod-name{font-weight:600;font-size:14px}.nx-mod-meta{font-size:12px;color:#8fa1b3;margin-top:3px}
.nx-mod-stk{display:grid;grid-template-columns:repeat(auto-fill,minmax(64px,1fr));gap:6px;margin-top:8px}.nx-mod-stk img{width:100%;aspect-ratio:1;object-fit:contain;background:#141c25;border-radius:8px}
.nx-mod-more{display:block;margin:0 auto 10px;border:0;border-radius:16px;padding:7px 16px;background:#232f3c;color:#cdd9e5;font:inherit;font-size:13px;cursor:pointer}
.nx-mod-msg{background:#1e2a36;border-radius:10px;padding:8px 10px;margin-bottom:6px}.nx-mod-msg.del{opacity:.55}
.nx-mod-mh{font-size:11.5px;color:#7fa6d4;margin-bottom:3px}.nx-mod-mt{font-size:14px;white-space:pre-wrap;word-break:break-word}.nx-mod-mt.dim{color:#7d8fa1}
.nx-mod-img{max-width:100%;max-height:260px;border-radius:8px;margin-top:6px;display:block}
.nx-rep-shots{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}
.nx-rep-shot{position:relative;width:64px;height:64px}.nx-rep-shot img{width:100%;height:100%;object-fit:cover;border-radius:8px}
.nx-rep-shot button{position:absolute;top:-6px;right:-6px;width:20px;height:20px;border-radius:50%;border:0;background:#d64545;color:#fff;font-size:14px;line-height:1;cursor:pointer}
.nx-rep-attach{display:block;width:100%;margin:8px 0 0}
.nx-thanks-ico{font-size:44px;text-align:center;margin-bottom:4px}

/* ===== v111: Nexus Violet (по референсам 1-Chat / 2-Settings) ===== */
:root{--bg-deep:var(--v-07070e);--bg-main:var(--v-181830);--bg-sidebar:var(--v-1d1d38);--bg-panel:var(--v-26264a);--bg-hover:var(--v-26264a);--bg-active:rgba(var(--nx-a2-rgb),.1);--bg-input:var(--v-26264a);--bg-msg-own:var(--nx-a2);--bg-msg-other:var(--v-26264a);--text-primary:var(--v-f4f4fb);--text-secondary:var(--v-8b8ba3);--text-muted:var(--v-5a5a7a);--accent:var(--nx-a2);--accent-light:var(--nx-l);--success:#22c55e;--warning:#f59e0b;--danger:#ef4444;--b1:rgba(255,255,255,.06);--b2:rgba(255,255,255,.1)}
html[data-theme="light"]{--b1:rgba(0,0,0,.08);--b2:rgba(0,0,0,.12)}
::-webkit-scrollbar{width:4px;height:4px}::-webkit-scrollbar-thumb{background:var(--v-252540);border-radius:2px}
.sidebar{border-right-color:var(--b1)}
.sidebar-header,.chat-header{background:var(--bg-sidebar);backdrop-filter:none;box-shadow:none;border-bottom:1px solid var(--b1)}
.chat-area{background:var(--bg-main)}
.search-input,.chat-search-bar input,.form-input{background:var(--bg-panel);border:1px solid var(--b2);border-radius:8px}
.search-input:focus,.chat-search-bar input:focus,.form-input:focus{border-color:rgba(var(--nx-a2-rgb),.45);background:var(--bg-panel);box-shadow:none}
.sidebar-tab{padding:3px 11px;font-size:11px;font-weight:600;background:var(--bg-panel);color:var(--text-muted)}
.sidebar-tab.active{background:var(--accent);color:#fff;box-shadow:none}
.contact{border-radius:0;padding:10px 12px}
.contact:hover{transform:none;background:var(--bg-hover)}
.contact.active{background:rgba(var(--nx-a2-rgb),.08);box-shadow:inset 3px 0 0 var(--accent)}
.contact-name{font-size:13px;font-weight:600}
.unread-badge{background:var(--accent);color:#fff}
.msg-bubble{border-radius:16px}
.msg.own .msg-bubble{background:linear-gradient(135deg,var(--bg-msg-own),color-mix(in srgb,var(--bg-msg-own) 60%,#2b2ab8));border-bottom-right-radius:4px}
.composer{background:var(--bg-sidebar);border-top:1px solid var(--b1);padding:12px 18px}
.composer-input{border:1px solid var(--b2);border-radius:12px}
.composer-input:focus{border-color:rgba(var(--nx-a2-rgb),.45);box-shadow:none}
.composer-btn,.composer-mic{width:36px;height:36px;border-radius:10px;background:transparent;font-size:17px}
.composer-btn:hover,.composer-mic:hover{background:var(--bg-panel);color:var(--accent-light);transform:none}
.composer-send{width:36px;height:36px;border-radius:12px;box-shadow:0 6px 16px rgba(var(--nx-a2-rgb),.25)}
.btn-primary,.btn-secondary,.btn-danger{border-radius:10px}
.btn-secondary{background:var(--bg-panel);border:1px solid var(--b2)}
/* ----- настройки ----- */
.settings-window{width:min(94vw,1180px);height:min(90vh,780px);background:var(--bg-main);border:1px solid var(--b1);border-radius:18px}
.settings-sidebar{width:240px;background:var(--bg-sidebar);border-right:1px solid var(--b1);animation:none}
.settings-sidebar-header{padding:20px 16px 10px;border:0}
.settings-sidebar-header h3{font-size:17px;font-weight:800}
.ss-search{position:relative;padding:0 14px 8px}
.ss-search svg{position:absolute;left:25px;top:9px;width:13px;height:13px;color:var(--text-muted);pointer-events:none}
.ss-search input{width:100%;padding:7px 10px 7px 30px;font-size:12px;color:var(--text-primary);background:var(--bg-panel);border:1px solid var(--b2);border-radius:8px;outline:none}
.ss-search input:focus{border-color:rgba(var(--nx-a2-rgb),.45)}
.settings-nav{padding:4px 8px 12px;gap:2px}
.settings-nav-item,.settings-nav-out{display:flex;align-items:center;gap:9px;padding:8px 10px;border-radius:12px;font-size:12.5px;font-weight:500;color:var(--text-muted);text-align:left;transition:background .15s,color .15s}
.settings-nav-item:hover,.settings-nav-out:hover{background:var(--bg-hover);color:var(--text-primary);transform:none}
.settings-nav-item.active{background:rgba(var(--nx-a2-rgb),.12);color:var(--accent-light);box-shadow:none;font-weight:600}
.settings-nav-item .sni-icon,.settings-nav-out .sni-icon{width:18px;display:flex;justify-content:center;font-size:13px;transform:none!important}
.sni-icon svg{width:15px;height:15px}
.settings-nav-out{color:var(--danger)}.settings-nav-out:hover{background:rgba(239,68,68,.1);color:var(--danger)}
.s-navsep{height:1px;background:var(--b1);margin:8px 8px}
.s-hide{display:none!important}
.settings-content{padding:32px 24px 40px;background:var(--bg-main)}
.settings-section>*{max-width:620px;margin-left:auto;margin-right:auto}
.settings-section[data-section="admin"]>*,.settings-section[data-section="games"]>*{max-width:840px}
.settings-section h2{font-size:20px;font-weight:700;margin-bottom:4px}
.s-sub{font-size:12px;color:var(--text-muted);margin-bottom:22px}
.s-card{background:var(--bg-sidebar);border:1px solid var(--b1);border-radius:16px;padding:20px;margin-bottom:20px}
.s-card>:last-child{margin-bottom:0}
.s-cap,.settings-section h3.settings-subtitle{font-size:10.5px;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:.1em;margin:0 0 14px}
.settings-section .form-group{gap:6px;margin-bottom:16px}
.settings-section .form-label{font-size:11.5px;font-weight:500;color:var(--text-secondary);text-transform:none;letter-spacing:0}
.settings-section .form-input{padding:10px 14px;font-size:13px}
.settings-divider{background:var(--b1);margin:18px 0}
.settings-actions{margin-top:16px}
.settings-actions .btn-primary,.settings-actions .btn-secondary,.settings-actions .btn-danger{padding:9px 20px;font-size:12.5px;border-radius:10px}
.settings-note{font-size:11.5px;color:var(--warning);background:rgba(245,158,11,.07);border:1px solid rgba(245,158,11,.18);border-left-width:3px;border-radius:10px;padding:10px 12px}
.settings-lead,.settings-hint{font-size:11.5px;color:var(--text-muted);line-height:1.5}
.settings-avatar-row{background:none;border:0;padding:0;margin:0;gap:20px;animation:none}
#settings-avatar-wrap{overflow:visible}
#settings-avatar-wrap .avatar-lg{width:80px;height:80px;font-size:28px;border:4px solid var(--b1)}
#settings-avatar-wrap::after{content:"";position:absolute;right:0;bottom:0;width:24px;height:24px;border-radius:50%;background:var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h3l2-3h6l2 3h3v11H4z'/%3E%3Ccircle cx='12' cy='13' r='3.5'/%3E%3C/svg%3E") center/12px no-repeat;box-shadow:0 4px 10px rgba(0,0,0,.4)}
.s-col{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.settings-check{justify-content:space-between;padding:11px 14px;background:var(--bg-panel);border:1px solid var(--b2);border-radius:12px;font-size:12.5px}
.settings-check input[type=checkbox]{order:2;-webkit-appearance:none;appearance:none;flex:none;position:relative;width:34px;height:20px;border-radius:10px;background:var(--v-252540);transition:background .2s;cursor:pointer}
.settings-check input[type=checkbox]::after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;transition:transform .2s}
.settings-check input[type=checkbox]:checked{background:var(--accent)}
.settings-check input[type=checkbox]:checked::after{transform:translateX(14px)}
.sc-text b{font-size:12.5px}.sc-text small{font-size:11px;color:var(--text-muted)}
.settings-device{padding:12px 14px;background:var(--bg-panel);border:1px solid var(--b2);border-radius:12px}
.sd-ico{width:36px;height:36px;font-size:17px;border-radius:10px;background:rgba(var(--nx-a2-rgb),.14)}
.settings-range{height:4px;background:var(--b2)}
.theme-selector{grid-template-columns:repeat(4,1fr);gap:10px}
.theme-opt{padding:8px;gap:6px;border-radius:12px;font-size:11px;background:var(--bg-panel);border:1px solid var(--b2)}
.theme-opt.active{border-color:var(--accent);box-shadow:0 0 0 2px rgba(var(--nx-a2-rgb),.25)}
.nx-seg button,.ns-pick button{background:var(--bg-panel);border:1px solid var(--b2);font-size:12px}
.nx-seg button.active,.ns-pick button.active{border-color:var(--accent);background:rgba(var(--nx-a2-rgb),.14)}
.settings-preview{background:var(--bg-main);border:1px solid var(--b1);border-radius:12px}
.device-item,.settings-section .settings-devices>div{background:var(--bg-panel);border:1px solid var(--b2);border-radius:12px}
@media(max-width:720px){.settings-window{width:100vw;height:100dvh;border-radius:0}.settings-content{padding:18px 14px}.ss-search{display:none}.theme-selector{grid-template-columns:1fr 1fr}.s-navsep{display:none}.settings-nav-item,.settings-nav-out{flex-direction:column;gap:4px;white-space:nowrap}}

/* ===== Макеты 2-Settings / 3-My-Profile ===== */
html:not([data-theme='light']) .settings-window{width:min(94vw,1100px);height:min(90vh,760px);background:var(--v-181830);border:1px solid var(--v-26264a);border-radius:16px}
html:not([data-theme='light']) .settings-sidebar{width:220px;background:var(--v-1d1d38);border-right:1px solid var(--v-26264a)}
html:not([data-theme='light']) .settings-sidebar-header{padding:20px 16px 10px;border:0}
html:not([data-theme='light']) .settings-sidebar-header h3{font-size:17px;font-weight:800}
html:not([data-theme='light']) .ss-search input{background:var(--v-26264a);border:1px solid var(--v-303058);border-radius:8px;font-size:11px;color:#fff}
html:not([data-theme='light']) .settings-nav{padding:8px;gap:1px}
html:not([data-theme='light']) .settings-nav-item{padding:7px 10px;gap:8px;border-radius:12px;font-size:12px;color:var(--v-5a5a7a);box-shadow:none;transform:none}
html:not([data-theme='light']) .settings-nav-item:hover{background:var(--v-26264a);color:#fff;transform:none}
html:not([data-theme='light']) .settings-nav-item.active{background:rgba(var(--nx-a2-rgb),.1);color:var(--nx-l);font-weight:600;box-shadow:none}
html:not([data-theme='light']) .settings-nav-item .sni-icon,html:not([data-theme='light']) .settings-nav-out .sni-icon{width:16px;height:auto;background:none;border-radius:0;font-size:13px;transform:none}
html:not([data-theme='light']) .settings-nav-out{color:#ef4444;border-radius:12px;font-size:12px}
html:not([data-theme='light']) .settings-nav-out:hover{background:rgba(239,68,68,.1)}
html:not([data-theme='light']) .s-navsep{height:1px;background:var(--v-26264a);margin:8px}
html:not([data-theme='light']) .settings-content{background:var(--v-181830);padding:32px 24px 40px}
html:not([data-theme='light']) .settings-section{max-width:600px;margin:0 auto}
html:not([data-theme='light']) .settings-section h2{font-size:20px;font-weight:700;margin-bottom:4px;letter-spacing:0}
html:not([data-theme='light']) .settings-section .s-sub{font-size:11px;color:var(--v-5a5a7a);margin:0 0 24px}
html:not([data-theme='light']) .s-card,html:not([data-theme='light']) .settings-section .settings-list{background:var(--v-1d1d38);border:1px solid var(--v-26264a);border-radius:16px;padding:20px;margin-bottom:20px;box-shadow:none}
html:not([data-theme='light']) .settings-section .settings-list{padding:4px 16px}
html:not([data-theme='light']) .s-cap{font-size:10px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--v-3d3d5c);margin-bottom:16px}
html:not([data-theme='light']) .settings-section .form-group{gap:6px;margin-bottom:16px}
html:not([data-theme='light']) .settings-section .form-label{font-size:11px;font-weight:500;color:var(--v-8b8ba3)}
html:not([data-theme='light']) .settings-section .form-input{background:var(--v-26264a);border:1px solid var(--v-303058);border-radius:8px;padding:10px 14px;font-size:13px;color:#fff;box-shadow:none;animation:none}
html:not([data-theme='light']) .settings-section .form-input:focus{border-color:rgba(var(--nx-a2-rgb),.5);background:var(--v-26264a);box-shadow:none}
html:not([data-theme='light']) .settings-section .form-input::placeholder{color:var(--v-3d3d5c)}
html:not([data-theme='light']) .settings-content .btn-primary{background:var(--nx-a2);border-radius:8px;padding:8px 16px;font-size:11px;font-weight:600;box-shadow:none}
html:not([data-theme='light']) .settings-content .btn-primary:hover{background:#6d28d9}
html:not([data-theme='light']) .settings-actions{display:flex;justify-content:flex-end}
html:not([data-theme='light']) .settings-actions .btn-primary{background:linear-gradient(90deg,var(--nx-a2),var(--nx-a3));border-radius:12px;padding:10px 24px;font-size:12px;box-shadow:0 8px 20px rgba(var(--nx-a2-rgb),.2)}
html:not([data-theme='light']) .settings-content .btn-danger{background:var(--v-26264a);color:#ef4444;border:0;border-radius:8px;padding:8px 16px;font-size:11px;font-weight:600}
html:not([data-theme='light']) .settings-content .btn-danger:hover{background:rgba(239,68,68,.12)}
html:not([data-theme='light']) .settings-content .btn-secondary{background:var(--v-26264a);color:var(--nx-l);border:0;border-radius:8px;font-size:11px}
html:not([data-theme='light']) .settings-note{background:rgba(var(--nx-a2-rgb),.08);border:1px solid rgba(var(--nx-a2-rgb),.18);border-radius:10px;color:var(--nx-l);font-size:11px;padding:10px 12px;margin-bottom:14px}
html:not([data-theme='light']) .settings-avatar-row{gap:20px;align-items:center}
html:not([data-theme='light']) .settings-avatar-row .avatar-lg{width:80px;height:80px;font-size:28px;font-weight:700;border:4px solid var(--v-26264a);background:linear-gradient(135deg,var(--nx-a2),var(--nx-a3))}
html:not([data-theme='light']) .settings-avatar-row .profile-avatar-overlay{inset:auto 0 0 auto;width:24px;height:24px;border-radius:50%;background:var(--nx-a2);font-size:10px;opacity:1;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 10px rgba(0,0,0,.4)}
html:not([data-theme='light']) .settings-avatar-hint{font-size:9px;color:var(--v-3d3d5c)}
html:not([data-theme='light']) .settings-window .settings-check{border-color:var(--v-26264a);font-size:12px}
html:not([data-theme='light']) .settings-window .settings-check small{color:var(--v-5a5a7a);font-size:10px}
/* карточки профилей: мой, чужой, группа, канал */
html:not([data-theme='light']) #profile-modal .modal-card,html:not([data-theme='light']) #user-modal .modal-card,html:not([data-theme='light']) #info-modal .modal-card{max-width:480px;background:var(--v-1d1d38);border:1px solid var(--v-26264a);border-radius:24px;box-shadow:0 25px 60px rgba(0,0,0,.4)}
html:not([data-theme='light']) #profile-modal .modal-header,html:not([data-theme='light']) #user-modal .modal-header,html:not([data-theme='light']) #info-modal .modal-header{border:0;padding-bottom:0}
html:not([data-theme='light']) #profile-modal .modal-header h3,html:not([data-theme='light']) #user-modal .modal-header h3,html:not([data-theme='light']) #info-modal .modal-header h3{font-size:11px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--v-3d3d5c)}
html:not([data-theme='light']) .profile-view-block,html:not([data-theme='light']) .profile-avatar-block{position:relative;padding-top:58px;gap:6px}
html:not([data-theme='light']) .profile-view-block::before,html:not([data-theme='light']) .profile-avatar-block::before{content:'';position:absolute;left:-24px;right:-24px;top:-8px;height:112px;background:linear-gradient(135deg,rgba(var(--nx-a2-rgb),.55),rgba(67,56,202,.35) 60%,rgba(var(--v-rgb),.2)),var(--v-26264a)}
html:not([data-theme='light']) .profile-view-block::after,html:not([data-theme='light']) .profile-avatar-block::after{content:'';position:absolute;left:-24px;right:-24px;top:-8px;height:112px;background:linear-gradient(to top,var(--v-1d1d38),transparent)}
html:not([data-theme='light']) .profile-view-block>*,html:not([data-theme='light']) .profile-avatar-block>*{position:relative;z-index:1}
html:not([data-theme='light']) .profile-view-block .avatar,html:not([data-theme='light']) .profile-avatar-block .avatar{width:80px;height:80px;font-size:28px;font-weight:700;border:4px solid var(--v-1d1d38);background-image:linear-gradient(135deg,var(--nx-a2),var(--nx-a3));box-shadow:0 12px 28px rgba(var(--nx-a2-rgb),.22)}
html:not([data-theme='light']) .profile-view-name,html:not([data-theme='light']) .user-profile-name,html:not([data-theme='light']) .info-name{font-size:18px;font-weight:700}
html:not([data-theme='light']) .profile-username{font-size:11px;color:var(--v-5a5a7a)}
html:not([data-theme='light']) .profile-view-bio,html:not([data-theme='light']) .user-profile-bio,html:not([data-theme='light']) .info-desc{background:var(--v-26264a);border-radius:12px;padding:12px;font-size:12px;color:var(--v-c4c4d4);line-height:1.6;text-align:center;margin:8px 0}
html:not([data-theme='light']) .user-profile-bio:empty{display:none}
html:not([data-theme='light']) .user-profile-status{font-size:10px;font-weight:500;color:#22c55e;text-align:center;display:flex;align-items:center;justify-content:center;gap:4px}
html:not([data-theme='light']) .user-profile-since{font-size:10px;color:var(--v-5a5a7a);text-align:center;border-top:1px solid var(--v-26264a);margin-top:12px;padding-top:12px}
html:not([data-theme='light']) .info-tabs{background:var(--v-26264a);border-radius:12px;padding:3px;gap:2px}
html:not([data-theme='light']) .info-tab{font-size:12px;color:var(--v-5a5a7a);border-radius:10px}
html:not([data-theme='light']) .info-tab.active{background:rgba(var(--nx-a2-rgb),.18);color:var(--nx-l);font-weight:600}
html:not([data-theme='light']) .info-section-title{font-size:9px;letter-spacing:.1em;color:var(--v-3d3d5c);padding-top:14px}
html:not([data-theme='light']) .gs-action,html:not([data-theme='light']) .pf-act{background:var(--v-26264a);border:0;border-radius:12px;font-size:12px}
html:not([data-theme='light']) .gs-action:hover,html:not([data-theme='light']) .pf-act:hover{background:var(--v-303058)}
html:not([data-theme='light']) .pf-act.danger{color:#ef4444}
@media(max-width:760px){html:not([data-theme='light']) .settings-window{width:100vw;height:100dvh;border-radius:0}html:not([data-theme='light']) .settings-sidebar{width:100%}html:not([data-theme='light']) .settings-content{padding:20px 14px}}

/* ===== Настройки: рейка + полный экран как в макете ===== */
.s-rail{width:60px;flex-shrink:0;background:var(--v-07070e);border-right:1px solid var(--v-26264a);display:flex;flex-direction:column;align-items:center;padding:12px 0;gap:2px}
.s-rail .lg,.s-rail button{width:34px;height:34px;border-radius:10px;display:flex;align-items:center;justify-content:center;color:var(--v-3d3d5c);background:none;border:0}
.s-rail button:hover{background:var(--v-222242)}
.s-rail button.on{background:rgba(var(--nx-a2-rgb),.15);color:var(--nx-l)}
.s-rail .lg{background:linear-gradient(135deg,var(--nx-a2),var(--nx-a3));color:#fff;box-shadow:0 8px 16px rgba(var(--nx-a2-rgb),.25);margin-bottom:12px}
.s-rail .sp{flex:1}
.s-rail svg,.sni-icon svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sni-icon svg{width:13px;height:13px}
#s-rail-ava{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,var(--nx-a2),var(--nx-a3));color:#fff;font-size:10px;font-weight:700;display:flex;align-items:center;justify-content:center;overflow:hidden;box-shadow:0 0 0 2px var(--v-07070e),0 0 0 4px #22c55e;margin:8px 0 4px;cursor:pointer}
#s-rail-ava img{width:100%;height:100%;object-fit:cover}
html[data-theme='light'] .s-rail{display:none}
html:not([data-theme='light']) .settings-window{width:100vw;height:100vh;height:100dvh;max-width:none;max-height:none;border:0;border-radius:0}
html:not([data-theme='light']) .settings-sidebar-header .icon-btn{display:none}
.pf-share-row{display:flex;gap:8px;width:100%;margin:6px 0 8px}
.pf-edit,.pf-share{flex:1;padding:9px;border-radius:12px;font-size:12px;font-weight:600;border:0;cursor:pointer;transition:background .2s}
.pf-edit{background:var(--nx-a2);color:#fff}.pf-edit:hover{background:#6d28d9}
.pf-share{background:var(--v-26264a);color:var(--nx-l)}.pf-share:hover{background:var(--v-303058)}
.pf-back{display:block;width:100%;padding:9px;margin-top:10px;border-radius:12px;background:var(--v-26264a);color:var(--v-5a5a7a);font-size:11px;border:0;cursor:pointer}.pf-back:hover{color:#fff}
.user-profile-status::before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor}
@media(max-width:760px){.s-rail{display:none}html:not([data-theme='light']) .settings-sidebar-header .icon-btn{display:flex}}

/* ===== v3: без горизонтального скролла, composer, профили, настройки ===== */
.modal-card,.modal-body,.info-card,.info-panel,.settings-content,.settings-section{max-width:100%;overflow-x:hidden}
.modal-body *,.settings-section *{min-width:0}
.info-desc,.profile-view-bio,.user-profile-bio,.info-name,.profile-view-name,.user-profile-name,.profile-username,.info-members *,.settings-note,.settings-hint{overflow-wrap:anywhere;word-break:break-word;white-space:pre-wrap}
.info-members .btn-primary,.info-members button{flex-shrink:0}
.settings-section select.form-input,.settings-section input,.settings-section textarea{max-width:100%}
.ns-pick,.nx-seg,.settings-email-row,.star-buttons{flex-wrap:wrap}
.settings-legal{display:none!important}
/* строка ввода */
html:not([data-theme='light']) .composer{gap:8px;padding:12px 16px 16px;background:linear-gradient(180deg,rgba(11,11,22,0),var(--v-181830) 45%);border-top:0;align-items:flex-end}
html:not([data-theme='light']) .composer-btn,html:not([data-theme='light']) .composer-mic{width:40px;height:40px;background:transparent;color:var(--v-5a5a7a);border:1px solid transparent}
html:not([data-theme='light']) .composer-btn:hover,html:not([data-theme='light']) .composer-mic:hover{background:rgba(var(--nx-a2-rgb),.14);color:var(--nx-l);transform:none}
html:not([data-theme='light']) .composer-input{min-height:44px;padding:12px 18px;background:var(--v-1d1d38);border:1px solid var(--v-303058);border-radius:22px;font-size:14px;box-shadow:0 6px 18px rgba(0,0,0,.28)}
html:not([data-theme='light']) .composer-input:focus{border-color:rgba(var(--nx-a2-rgb),.6);box-shadow:0 0 0 4px rgba(var(--nx-a2-rgb),.13),0 6px 18px rgba(0,0,0,.28);animation:none}
html:not([data-theme='light']) .composer-send{width:44px;height:44px;background:linear-gradient(135deg,var(--nx-a2),var(--nx-a3));box-shadow:0 8px 20px rgba(var(--nx-a2-rgb),.4)}
html:not([data-theme='light']) .composer-send:hover{transform:scale(1.07);filter:brightness(1.1)}
/* открытые профили: мой, чужой, группа, канал */
html:not([data-theme='light']) .profile-view-block,html:not([data-theme='light']) .profile-avatar-block{padding-top:84px;gap:4px}
html:not([data-theme='light']) .profile-view-block::before,html:not([data-theme='light']) .profile-avatar-block::before{height:130px;top:-8px;background:radial-gradient(circle at 20% 30%,rgba(167,139,250,.55),transparent 45%),radial-gradient(circle at 80% 10%,rgba(67,56,202,.6),transparent 50%),radial-gradient(circle at 60% 90%,rgba(var(--nx-a2-rgb),.35),transparent 50%),var(--v-222242)}
html:not([data-theme='light']) .profile-view-block::after,html:not([data-theme='light']) .profile-avatar-block::after{height:130px;background:linear-gradient(to top,var(--v-1d1d38) 5%,transparent)}
html:not([data-theme='light']) .profile-view-block .avatar,html:not([data-theme='light']) .profile-avatar-block .avatar{width:96px;height:96px;font-size:34px;border:5px solid var(--v-1d1d38);box-shadow:0 0 0 2px rgba(var(--nx-a2-rgb),.5),0 14px 34px rgba(var(--nx-a2-rgb),.3)}
html:not([data-theme='light']) .profile-view-name,html:not([data-theme='light']) .user-profile-name,html:not([data-theme='light']) .info-name{font-size:20px;font-weight:800;letter-spacing:-.2px;margin-top:6px;text-align:center}
html:not([data-theme='light']) .profile-view-block .profile-username,html:not([data-theme='light']) .profile-avatar-block .profile-username{background:rgba(var(--nx-a2-rgb),.12);color:var(--nx-l);padding:3px 12px;border-radius:20px;font-size:11px;font-weight:600}
html:not([data-theme='light']) .profile-view-bio,html:not([data-theme='light']) .user-profile-bio,html:not([data-theme='light']) .info-desc{position:relative;background:var(--v-222242);border:1px solid var(--v-2c2c52);border-radius:14px;padding:26px 14px 14px;margin:10px 0 2px;font-size:12.5px;color:var(--v-d4d4e4);text-align:left}
html:not([data-theme='light']) .profile-view-bio::before,html:not([data-theme='light']) .user-profile-bio::before,html:not([data-theme='light']) .info-desc::before{content:'О СЕБЕ';position:absolute;left:14px;top:10px;font-size:9px;font-weight:700;letter-spacing:.12em;color:var(--v-3d3d5c)}
html:not([data-theme='light']) #info-desc::before{content:'ОПИСАНИЕ'}
html:not([data-theme='light']) .user-profile-status{align-self:center;background:rgba(34,197,94,.1);padding:4px 12px;border-radius:20px;font-size:11px}
html:not([data-theme='light']) .user-profile-since{display:flex;align-items:center;justify-content:center;gap:8px;background:var(--v-222242);border:1px solid var(--v-2c2c52);border-radius:12px;padding:10px;margin-top:4px;font-size:11px;color:var(--v-8b8ba3)}
html:not([data-theme='light']) .user-profile-since::before{content:'📅'}
html:not([data-theme='light']) #info-modal .info-members>*{background:var(--v-222242);border:1px solid var(--v-2c2c52);border-radius:12px;padding:8px 10px}
html:not([data-theme='light']) #info-modal .info-members>*:hover{border-color:rgba(var(--nx-a2-rgb),.4)}
html:not([data-theme='light']) .info-card .modal-body,html:not([data-theme='light']) #user-modal .modal-body,html:not([data-theme='light']) #profile-modal .modal-body{scrollbar-width:thin;scrollbar-color:var(--v-252540) transparent}
/* настройки: красивее и удобнее */
html:not([data-theme='light']) .settings-content{scrollbar-width:thin;scrollbar-color:var(--v-252540) transparent}
html:not([data-theme='light']) .s-card{position:relative;background:linear-gradient(180deg,var(--v-0f0f1d),var(--v-0d0d19));transition:border-color .25s,transform .25s}
html:not([data-theme='light']) .s-card:hover{border-color:var(--v-242445)}
html:not([data-theme='light']) .s-card::before{content:'';position:absolute;left:20px;top:-1px;width:36px;height:2px;border-radius:2px;background:linear-gradient(90deg,var(--nx-a2),var(--nx-a3))}
html:not([data-theme='light']) .settings-section.active{animation:fadeInUp .35s var(--ease-out)}
html:not([data-theme='light']) .settings-section h2{font-size:22px;font-weight:800}
html:not([data-theme='light']) .settings-nav-item.active{box-shadow:inset 3px 0 0 var(--nx-a2)}
html:not([data-theme='light']) .settings-window .settings-check{display:flex;align-items:center;gap:14px;padding:13px 0;min-height:48px}
html:not([data-theme='light']) .settings-window .settings-check input[type=checkbox]{-webkit-appearance:none;appearance:none;order:2;margin-left:auto;flex-shrink:0;width:40px;height:22px;border-radius:11px;background:var(--v-303058);position:relative;cursor:pointer;transition:background .25s}
html:not([data-theme='light']) .settings-window .settings-check input[type=checkbox]::after{content:'';position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 2px 4px rgba(0,0,0,.4);transition:transform .25s var(--ease-spring)}
html:not([data-theme='light']) .settings-window .settings-check input[type=checkbox]:checked{background:linear-gradient(135deg,var(--nx-a2),var(--nx-a3))}
html:not([data-theme='light']) .settings-window .settings-check input[type=checkbox]:checked::after{transform:translateX(18px)}
html:not([data-theme='light']) .settings-window .sc-text b{font-size:12.5px;font-weight:600}
html:not([data-theme='light']) .settings-range{accent-color:var(--nx-a2)}
html:not([data-theme='light']) .settings-device{background:var(--v-222242);border:1px solid var(--v-2c2c52);border-radius:12px;padding:12px;margin-bottom:10px;align-items:center;gap:12px}
html:not([data-theme='light']) .settings-device .sd-ico{width:34px;height:34px;border-radius:10px;background:rgba(var(--nx-a2-rgb),.12);display:flex;align-items:center;justify-content:center;font-size:15px;flex-shrink:0}
html:not([data-theme='light']) .nx-seg{background:var(--v-26264a);border-radius:10px;padding:3px;gap:2px}
html:not([data-theme='light']) .nx-seg button{border-radius:8px;font-size:11px;color:var(--v-5a5a7a);padding:6px 12px}
html:not([data-theme='light']) .nx-seg button.active,html:not([data-theme='light']) .nx-seg button.on{background:rgba(var(--nx-a2-rgb),.22);color:var(--nx-l2)}

/* ===== v4 ===== */
:root{--bg-deep:var(--v-101022);--bg-main:var(--v-181830);--bg-sidebar:var(--v-1a1a33);--bg-panel:var(--v-212142);--bg-hover:var(--v-2a2a4e);--bg-active:var(--v-2b2858);--bg-input:var(--v-212142);--bg-msg-other:var(--v-222244)}
.s-rail{display:none!important}
html:not([data-theme='light']) .settings-window{width:min(86vw,1000px);height:min(84vh,720px);max-width:none;max-height:none;border:1px solid var(--v-303058);border-radius:18px;box-shadow:0 30px 80px rgba(0,0,0,.55);zoom:1.08}
html:not([data-theme='light']) .settings-sidebar-header .icon-btn{display:flex}
.settings-sidebar,.settings-nav{overflow-x:hidden}
.settings-window .settings-nav-item{font-size:13px;padding:9px 12px}
.settings-window .settings-section .form-label{font-size:12px}
.settings-window .settings-section .form-input{font-size:14px}
@media(max-width:760px){html:not([data-theme='light']) .settings-window{width:100vw;height:100dvh;border-radius:0;zoom:1}}
.settings-range{-webkit-appearance:none;appearance:none;width:100%;height:6px;border-radius:3px;background:linear-gradient(90deg,var(--nx-a2) var(--p,50%),var(--v-303058) var(--p,50%));outline:none;cursor:pointer;border:0;padding:0}
.settings-range::-webkit-slider-thumb{-webkit-appearance:none;width:18px;height:18px;border-radius:50%;background:#fff;border:3px solid var(--nx-a2);box-shadow:0 2px 10px rgba(var(--nx-a2-rgb),.6);transition:transform .15s}
.settings-range:hover::-webkit-slider-thumb{transform:scale(1.18)}
.settings-range::-moz-range-thumb{width:12px;height:12px;border-radius:50%;background:#fff;border:3px solid var(--nx-a2)}
.settings-range::-moz-range-track{background:transparent}
html:not([data-theme='light']) .theme-selector{gap:10px}
html:not([data-theme='light']) .theme-opt{background:var(--v-222242);border:1px solid var(--v-303058);border-radius:14px;padding:8px;color:var(--v-b8b8d8);font-size:11px;transition:border-color .2s,transform .2s,box-shadow .2s}
html:not([data-theme='light']) .theme-opt:hover{transform:translateY(-2px);border-color:var(--v-4b4b80)}
html:not([data-theme='light']) .theme-opt.active,html:not([data-theme='light']) .theme-opt.on,html:not([data-theme='light']) .theme-opt[aria-pressed='true']{border-color:var(--nx-a2);box-shadow:0 0 0 2px rgba(var(--nx-a2-rgb),.35),0 8px 20px rgba(var(--nx-a2-rgb),.25);color:#fff}
html:not([data-theme='light']) .theme-preview{border-radius:9px}
html:not([data-theme='light']) .settings-preview{background:var(--v-181830);border:1px solid var(--v-303058);border-radius:14px}
html.nx-noanim *,html.nx-noanim *::before,html.nx-noanim *::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}

/* ===== v5: GAMER NEON везде ===== */
:root{--accent:var(--nx-a2);--accent-light:var(--nx-l);--bg-msg-own:#3a2b85;--nx-neon:var(--nx-a);--nx-cyan:var(--nx-b)}
html:not([data-theme='light']) *{scrollbar-width:thin;scrollbar-color:#4b2a8f transparent}
html:not([data-theme='light']) ::-webkit-scrollbar{width:6px;height:6px}
html:not([data-theme='light']) ::-webkit-scrollbar-thumb{background:linear-gradient(var(--nx-a2),var(--nx-a3));border-radius:3px}
html:not([data-theme='light']) ::-webkit-scrollbar-track{background:transparent}
html:not([data-theme='light']) ::selection{background:rgba(var(--nx-a-rgb),.45)}
/* фон: сетка + свечение */
html:not([data-theme='light']) .chat-area{background:radial-gradient(800px 420px at 12% 0%,rgba(var(--nx-a-rgb),.16),transparent 60%),radial-gradient(700px 500px at 100% 100%,rgba(var(--nx-b-rgb),.09),transparent 60%),linear-gradient(rgba(var(--nx-a-rgb),.045) 1px,transparent 1px) 0 0/44px 44px,linear-gradient(90deg,rgba(var(--nx-a-rgb),.045) 1px,transparent 1px) 0 0/44px 44px,var(--bg-main)}
html:not([data-theme='light']) .sidebar{background:linear-gradient(180deg,rgba(var(--nx-a2-rgb),.1),transparent 30%),var(--bg-sidebar);border-right:1px solid rgba(var(--nx-a-rgb),.22)}
html:not([data-theme='light']) .auth-screen{background:radial-gradient(900px 500px at 15% 0%,rgba(var(--nx-a-rgb),.38),transparent 60%),radial-gradient(900px 600px at 90% 100%,rgba(var(--nx-b-rgb),.24),transparent 60%),linear-gradient(rgba(var(--nx-a-rgb),.08) 1px,transparent 1px) 0 0/44px 44px,linear-gradient(90deg,rgba(var(--nx-a-rgb),.08) 1px,transparent 1px) 0 0/44px 44px,var(--v-0a0a16)}
/* карточки, окна, меню */
html:not([data-theme='light']) .modal-card,html:not([data-theme='light']) .auth-card,html:not([data-theme='light']) .ctx-menu,html:not([data-theme='light']) .toast,html:not([data-theme='light']) .settings-window{border:1px solid rgba(var(--nx-a-rgb),.32);border-radius:10px;box-shadow:0 0 0 1px rgba(var(--nx-a-rgb),.08),0 0 44px rgba(var(--nx-a2-rgb),.22),0 24px 60px rgba(0,0,0,.55)}
html:not([data-theme='light']) .s-card{border-color:rgba(var(--nx-a-rgb),.22);border-radius:10px}
html:not([data-theme='light']) .s-card::before{width:48px;height:2px;background:linear-gradient(90deg,var(--nx-a),var(--nx-b));box-shadow:0 0 10px rgba(var(--nx-a-rgb),.8)}
html:not([data-theme='light']) .modal-backdrop{background:radial-gradient(circle at 50% 40%,rgba(88,28,200,.25),rgba(4,4,12,.8))}
/* заголовки */
html:not([data-theme='light']) .settings-section h2,html:not([data-theme='light']) .settings-sidebar-header h3,html:not([data-theme='light']) .auth-logo-text{text-transform:uppercase;letter-spacing:2px;font-weight:900;background:linear-gradient(90deg,#fff,var(--nx-l2) 50%,#67e8f9);-webkit-background-clip:text;background-clip:text;color:transparent}
html:not([data-theme='light']) .modal-header h3{text-transform:uppercase;letter-spacing:2px;font-weight:800;color:var(--nx-l3);text-shadow:0 0 12px rgba(var(--nx-a-rgb),.6)}
html:not([data-theme='light']) .s-cap,html:not([data-theme='light']) .info-section-title,html:not([data-theme='light']) .settings-section-title{color:var(--nx-l);letter-spacing:.16em}
/* кнопки */
html:not([data-theme='light']) .btn-primary{background:linear-gradient(90deg,var(--nx-a2),var(--nx-a),var(--nx-b),var(--nx-a2));background-size:200% 100%;animation:nxShift 4s linear infinite;border-radius:6px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;box-shadow:0 0 22px rgba(var(--nx-a2-rgb),.45)}
html:not([data-theme='light']) .btn-primary:hover{filter:brightness(1.18);transform:translateY(-1px);box-shadow:0 0 30px rgba(var(--nx-a-rgb),.7)}
@keyframes nxShift{to{background-position:200% 0}}
html:not([data-theme='light']) .btn-secondary{background:rgba(var(--nx-a-rgb),.1);border:1px solid rgba(var(--nx-a-rgb),.4);border-radius:6px;color:var(--nx-l3);text-transform:uppercase;letter-spacing:.05em;font-weight:700}
html:not([data-theme='light']) .btn-secondary:hover{background:rgba(var(--nx-a-rgb),.22);box-shadow:0 0 18px rgba(var(--nx-a-rgb),.35)}
html:not([data-theme='light']) .btn-danger{border-radius:6px;text-transform:uppercase;letter-spacing:.05em;font-weight:700}
html:not([data-theme='light']) .icon-btn:hover,html:not([data-theme='light']) .composer-btn:hover,html:not([data-theme='light']) .composer-mic:hover{background:rgba(var(--nx-a-rgb),.2);color:var(--nx-l3);box-shadow:0 0 14px rgba(var(--nx-a-rgb),.4)}
html:not([data-theme='light']) .composer-send{border-radius:10px;background:linear-gradient(135deg,var(--nx-a2),var(--nx-b));box-shadow:0 0 22px rgba(var(--nx-a2-rgb),.6)}
/* поля */
html:not([data-theme='light']) .form-input,html:not([data-theme='light']) .search-input,html:not([data-theme='light']) .composer-input{border-radius:8px;border:1px solid rgba(var(--nx-a-rgb),.22)}
html:not([data-theme='light']) .form-input:focus,html:not([data-theme='light']) .search-input:focus,html:not([data-theme='light']) .composer-input:focus,html:not([data-theme='light']) .settings-section .form-input:focus{border-color:var(--nx-a);box-shadow:0 0 0 3px rgba(var(--nx-a-rgb),.2),0 0 22px rgba(var(--nx-a-rgb),.3);animation:none}
html:not([data-theme='light']) .composer-input{border-radius:12px}
/* список чатов */
html:not([data-theme='light']) .contact{border-radius:8px}
html:not([data-theme='light']) .contact:hover{background:rgba(var(--nx-a-rgb),.12);box-shadow:inset 0 0 0 1px rgba(var(--nx-a-rgb),.25)}
html:not([data-theme='light']) .contact.active{background:linear-gradient(90deg,rgba(var(--nx-a-rgb),.28),rgba(var(--nx-a-rgb),.06));box-shadow:inset 3px 0 0 var(--nx-a),0 0 20px rgba(var(--nx-a-rgb),.18)}
html:not([data-theme='light']) .unread-badge{background:linear-gradient(135deg,var(--nx-a),var(--nx-b));box-shadow:0 0 12px rgba(var(--nx-a-rgb),.7);font-weight:800}
html:not([data-theme='light']) .sidebar-tab.active{background:rgba(var(--nx-a-rgb),.25);box-shadow:0 0 0 1px var(--nx-a),0 0 16px rgba(var(--nx-a-rgb),.4);color:#fff}
/* аватары и сообщения */
html:not([data-theme='light']) .avatar{box-shadow:0 0 0 2px rgba(var(--nx-a-rgb),.4),0 0 16px rgba(var(--nx-a2-rgb),.3)}
html:not([data-theme='light']) .msg-bubble{border:1px solid rgba(var(--nx-a-rgb),.18);border-radius:12px}
html:not([data-theme='light']) .ctx-item:hover{background:rgba(var(--nx-a-rgb),.2)}
/* вход / регистрация */
html:not([data-theme='light']) .auth-tab.active{color:#fff;text-shadow:0 0 12px rgba(var(--nx-a-rgb),.9)}
html:not([data-theme='light']) .auth-tab-slider{background:linear-gradient(90deg,var(--nx-a2),var(--nx-b));box-shadow:0 0 16px rgba(var(--nx-a2-rgb),.7)}
html:not([data-theme='light']) .auth-logo-icon{background:linear-gradient(135deg,var(--nx-a),var(--nx-b));box-shadow:0 0 36px rgba(var(--nx-a-rgb),.75);animation:nxPulse 2.6s ease-in-out infinite}
@keyframes nxPulse{50%{box-shadow:0 0 60px rgba(var(--nx-b-rgb),.75)}}
/* профили и настройки в тон */
html:not([data-theme='light']) .settings-nav-item.active{background:linear-gradient(90deg,rgba(var(--nx-a-rgb),.25),rgba(var(--nx-a-rgb),.04));color:var(--nx-l3);box-shadow:inset 3px 0 0 var(--nx-a)}
html:not([data-theme='light']) .settings-nav-item:hover{background:rgba(var(--nx-a-rgb),.12)}
html:not([data-theme='light']) .settings-window .settings-check input[type=checkbox]:checked,html:not([data-theme='light']) .info-card .settings-check input[type=checkbox]:checked{background:linear-gradient(90deg,var(--nx-a2),var(--nx-b));box-shadow:0 0 12px rgba(var(--nx-a-rgb),.55)}
html:not([data-theme='light']) #profile-modal .modal-card,html:not([data-theme='light']) #user-modal .modal-card,html:not([data-theme='light']) #info-modal .modal-card{border-radius:14px}
html:not([data-theme='light']) .profile-view-block .avatar,html:not([data-theme='light']) .profile-avatar-block .avatar{box-shadow:0 0 0 2px var(--nx-a),0 0 36px rgba(var(--nx-a-rgb),.55)}
html:not([data-theme='light']) .profile-view-bio,html:not([data-theme='light']) .user-profile-bio,html:not([data-theme='light']) .info-desc,html:not([data-theme='light']) .user-profile-since{border-color:rgba(var(--nx-a-rgb),.3);border-radius:8px}
html:not([data-theme='light']) .info-tab.active{background:rgba(var(--nx-a-rgb),.28);color:#fff;box-shadow:0 0 14px rgba(var(--nx-a-rgb),.4)}
html:not([data-theme='light']) .settings-range{background:linear-gradient(90deg,var(--nx-a) var(--p,50%),var(--v-303058) var(--p,50%))}

/* ===== v6: профили — темнее, аккуратные кнопки ===== */
html:not([data-theme='light']) :is(#user-modal,#profile-modal,#info-modal) .modal-card{background:var(--nx-modal);background-image:radial-gradient(420px 200px at 50% 0,rgba(var(--nx-a2-rgb),.14),transparent 70%)}
html:not([data-theme='light']) :is(#user-modal,#profile-modal,#info-modal) .modal-header h3{color:var(--nx-l);opacity:1;text-shadow:none;letter-spacing:.16em;font-size:11px}
html:not([data-theme='light']) :is(#user-modal,#profile-modal,#info-modal) .profile-avatar-block::before,html:not([data-theme='light']) :is(#user-modal,#profile-modal,#info-modal) .profile-view-block::before{background:radial-gradient(circle at 25% 20%,rgba(var(--nx-a2-rgb),.32),transparent 55%),radial-gradient(circle at 85% 0,rgba(var(--nx-b-rgb),.13),transparent 55%),var(--nx-cover)}
html:not([data-theme='light']) :is(#user-modal,#profile-modal,#info-modal) .profile-avatar-block::after,html:not([data-theme='light']) :is(#user-modal,#profile-modal,#info-modal) .profile-view-block::after{background:linear-gradient(to top,var(--nx-modal) 4%,transparent)}
html:not([data-theme='light']) :is(#user-modal,#profile-modal,#info-modal) :is(.user-profile-bio,.profile-view-bio,.info-desc){position:relative;padding:30px 16px 14px;margin:6px 0 0;background:var(--nx-panel);border:1px solid rgba(var(--nx-a-rgb),.22);border-radius:12px;font-size:13px;line-height:1.55;color:var(--v-d4d4e4);text-align:left}
html:not([data-theme='light']) :is(#user-modal,#profile-modal,#info-modal) :is(.user-profile-bio,.profile-view-bio,.info-desc)::before{left:16px;top:11px;color:#8b7bd8}
html:not([data-theme='light']) #user-modal .user-profile-since{margin:0;background:var(--nx-panel);border:1px solid rgba(var(--nx-a-rgb),.22);border-radius:10px;padding:10px;color:var(--v-9a9ac0);display:flex;justify-content:center;gap:8px}
html:not([data-theme='light']) #user-modal .user-profile-status{background:rgba(var(--nx-a2-rgb),.16);color:var(--nx-l2);padding:4px 14px}
html:not([data-theme='light']) #user-modal .user-profile-status.online{background:rgba(34,197,94,.12);color:#4ade80}
html:not([data-theme='light']) :is(#user-modal,#profile-modal,#info-modal) .modal-body{background:transparent}
/* нижние кнопки профиля */
html:not([data-theme='light']) #user-modal .modal-footer{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:14px 16px 16px;background:var(--nx-foot);border-top:1px solid rgba(var(--nx-a-rgb),.18);justify-content:stretch}
html:not([data-theme='light']) #user-modal .modal-footer .hidden{display:none!important}
html:not([data-theme='light']) #user-modal .modal-footer button{min-width:0;width:100%;text-transform:none;letter-spacing:0;border-radius:10px;font-size:13px;font-weight:600;padding:11px 12px;animation:none;box-shadow:none}
html:not([data-theme='light']) #user-modal #user-action-decline,html:not([data-theme='light']) #user-modal #user-action-accept{order:-3}
html:not([data-theme='light']) #user-modal #user-action-write{grid-column:1/-1;order:-1;height:46px;font-size:14px;font-weight:700;background:linear-gradient(135deg,var(--nx-a2),#5b3fd6);box-shadow:0 8px 22px rgba(var(--nx-a2-rgb),.35)}
html:not([data-theme='light']) #user-modal #user-action-write::before{content:'✉'}
html:not([data-theme='light']) #user-modal #user-action-friend,html:not([data-theme='light']) #user-modal #user-action-mod{grid-column:1/-1;background:rgba(var(--nx-a-rgb),.1);border:1px solid rgba(var(--nx-a-rgb),.32);color:var(--nx-l3)}
html:not([data-theme='light']) #user-modal #user-action-friend:hover,html:not([data-theme='light']) #user-modal #user-action-mod:hover{background:rgba(var(--nx-a-rgb),.2)}
html:not([data-theme='light']) #user-modal #user-action-block,html:not([data-theme='light']) #user-modal #user-action-report{order:1;background:transparent;border:1px solid rgba(239,68,68,.28);color:#f87171;font-size:12px;font-weight:500;padding:9px 10px}
html:not([data-theme='light']) #user-modal #user-action-block::before{content:'⛔';font-size:11px}
html:not([data-theme='light']) #user-modal #user-action-report::before{content:'⚑';font-size:12px}
html:not([data-theme='light']) #user-modal #user-action-block:hover,html:not([data-theme='light']) #user-modal #user-action-report:hover{background:rgba(239,68,68,.12);box-shadow:none}
html:not([data-theme='light']) #user-modal .pf-act{padding:9px 10px;font-size:12px}
/* кнопки везде — спокойнее */
html:not([data-theme='light']) .btn-secondary,html:not([data-theme='light']) .btn-danger{text-transform:none;letter-spacing:0;font-weight:600}
html:not([data-theme='light']) .btn-primary{letter-spacing:.04em;font-size:13.5px}

/* ===== v7: единая палитра настроек, без серого ===== */
html:not([data-theme='light']) .settings-window{--s-bg:var(--nx-bg);--s-side:var(--nx-side);--s-card:var(--nx-card);--s-in:var(--nx-in);--s-bd:rgba(var(--nx-a-rgb),.2);background:var(--s-bg)}
html:not([data-theme='light']) .settings-window .settings-sidebar{background:var(--s-side);border-right:1px solid var(--s-bd)}
html:not([data-theme='light']) .settings-window .settings-content{background:radial-gradient(640px 320px at 85% 0,rgba(var(--nx-a2-rgb),.12),transparent 70%),radial-gradient(500px 300px at 0 100%,rgba(var(--nx-b-rgb),.05),transparent 70%),var(--s-bg)}
html:not([data-theme='light']) .settings-window .s-card,html:not([data-theme='light']) .settings-window .settings-section .settings-list{background:var(--s-card);border:1px solid var(--s-bd);border-radius:12px;padding:22px;box-shadow:0 8px 24px rgba(0,0,0,.25)}
html:not([data-theme='light']) .settings-window .ss-search input,html:not([data-theme='light']) .settings-window .settings-section .form-input,html:not([data-theme='light']) .settings-window .settings-section select.form-input{background:var(--s-in);border:1px solid rgba(var(--nx-a-rgb),.18);color:var(--v-f1f1ff)}
html:not([data-theme='light']) .settings-window .settings-section .form-input:focus{background:var(--v-1d1d38);border-color:var(--nx-a)}
html:not([data-theme='light']) .settings-window .settings-section .form-input:disabled{opacity:.6;background:var(--v-12121f)}
html:not([data-theme='light']) .settings-window .settings-section .form-input::placeholder,html:not([data-theme='light']) .settings-window .ss-search input::placeholder{color:var(--v-5d5d86)}
html:not([data-theme='light']) .settings-window .settings-device,html:not([data-theme='light']) .settings-window .settings-preview,html:not([data-theme='light']) .settings-window .nx-seg,html:not([data-theme='light']) .settings-window .theme-opt{background:var(--s-in);border-color:rgba(var(--nx-a-rgb),.16)}
html:not([data-theme='light']) .settings-window .settings-section .form-label{color:var(--v-b4b4d8);font-weight:600}
html:not([data-theme='light']) .settings-window .settings-nav-item{color:var(--v-8a8ab4)}
html:not([data-theme='light']) .settings-window .settings-nav-item:hover{color:#fff;background:rgba(var(--nx-a-rgb),.1)}
html:not([data-theme='light']) .settings-window .settings-nav-item.active{color:#f3e8ff}
html:not([data-theme='light']) .settings-window .settings-nav-out{color:#f87171}
html:not([data-theme='light']) .settings-window .s-navsep{background:var(--s-bd)}
html:not([data-theme='light']) .settings-window .settings-note{background:rgba(var(--nx-a2-rgb),.09);border:1px solid rgba(var(--nx-a-rgb),.22);color:var(--nx-l2)}
html:not([data-theme='light']) .settings-window .settings-actions{margin-top:6px}
html:not([data-theme='light']) .settings-window .settings-content .btn-danger{background:transparent;border:1px solid rgba(239,68,68,.45);color:#f87171;border-radius:8px;padding:10px 18px}
html:not([data-theme='light']) .settings-window .settings-content .btn-danger:hover{background:rgba(239,68,68,.14);box-shadow:0 0 16px rgba(239,68,68,.25)}
html:not([data-theme='light']) .settings-window .settings-content .btn-secondary{background:rgba(var(--nx-a-rgb),.1);border:1px solid rgba(var(--nx-a-rgb),.3);color:var(--nx-l3)}
html:not([data-theme='light']) .settings-window .settings-check{border-color:rgba(var(--nx-a-rgb),.12)}
html:not([data-theme='light']) .settings-window .settings-check input[type=checkbox]{background:var(--v-2a2a4a)}
html:not([data-theme='light']) .settings-window .settings-hint,html:not([data-theme='light']) .settings-window .settings-check small{color:var(--v-7b7ba4)}
html:not([data-theme='light']) .settings-window .settings-section h2{margin-bottom:6px}
html:not([data-theme='light']) .settings-window .settings-content::-webkit-scrollbar-track{background:transparent}

/* ===== v8: палитры тем + высота настроек + темнее чаты ===== */
:root{--nx-a:#a855f7;--nx-a-rgb:168,85,247;--nx-a2:#7c3aed;--nx-a2-rgb:124,58,237;--nx-a3:#4338ca;--nx-b:#22d3ee;--nx-b-rgb:34,211,238;--nx-l:#a78bfa;--nx-l2:#c4b5fd;--nx-l3:#e9d5ff;--nx-bg:#0f0f1e;--nx-side:#0b0b17;--nx-card:#15152a;--nx-in:#1a1a32;--nx-modal:#10101f;--nx-panel:#161630;--nx-foot:#0d0d1b;--nx-cover:#14142a}
html[data-theme='darker']{--nx-bg:var(--v-07070e);--nx-side:#050509;--nx-card:#0d0d18;--nx-in:#11111f;--nx-modal:#08080f;--nx-panel:#0e0e1a;--nx-foot:#05050a;--nx-cover:#0a0a14}
html[data-theme='indigo']{--nx-a:#818cf8;--nx-a-rgb:129,140,248;--nx-a2:#6366f1;--nx-a2-rgb:99,102,241;--nx-a3:#3730a3;--nx-b:#38bdf8;--nx-b-rgb:56,189,248;--nx-l:#a5b4fc;--nx-l2:#c7d2fe;--nx-l3:#e0e7ff;--nx-bg:#0d1026;--nx-side:#090b1c;--nx-card:#131736;--nx-in:#181d42;--nx-modal:#0e1128;--nx-panel:#151a3c;--nx-foot:#0a0c1e;--nx-cover:#121634}
html[data-theme='aurora']{--nx-a:#2dd4bf;--nx-a-rgb:45,212,191;--nx-a2:#0d9488;--nx-a2-rgb:13,148,136;--nx-a3:#0f766e;--nx-b:#a3e635;--nx-b-rgb:163,230,53;--nx-l:#5eead4;--nx-l2:#99f6e4;--nx-l3:#ccfbf1;--nx-bg:#0a1a1c;--nx-side:#071315;--nx-card:#0f2427;--nx-in:#132c30;--nx-modal:#0a1a1d;--nx-panel:#10272a;--nx-foot:#061113;--nx-cover:#0d2326}
html[data-theme='sunset']{--nx-a:#fb7185;--nx-a-rgb:251,113,133;--nx-a2:#f97316;--nx-a2-rgb:249,115,22;--nx-a3:#be123c;--nx-b:#fbbf24;--nx-b-rgb:251,191,36;--nx-l:#fda4af;--nx-l2:#fecdd3;--nx-l3:#ffe4e6;--nx-bg:#1a0e14;--nx-side:#130a0f;--nx-card:#24131b;--nx-in:#2b1722;--nx-modal:#1b0f15;--nx-panel:#26141c;--nx-foot:#10080c;--nx-cover:#20111a}
html[data-theme='forest']{--nx-a:#4ade80;--nx-a-rgb:74,222,128;--nx-a2:#16a34a;--nx-a2-rgb:22,163,74;--nx-a3:#166534;--nx-b:#facc15;--nx-b-rgb:250,204,21;--nx-l:#86efac;--nx-l2:#bbf7d0;--nx-l3:#dcfce7;--nx-bg:#0c1a12;--nx-side:#08130c;--nx-card:#112419;--nx-in:#152c1e;--nx-modal:#0d1b13;--nx-panel:#12261a;--nx-foot:#07110b;--nx-cover:#0f2216}
html[data-theme='light']{--nx-a:#3b82f6;--nx-a-rgb:59,130,246;--nx-a2:#2563eb;--nx-a2-rgb:37,99,235;--nx-a3:#1d4ed8;--nx-b:#0ea5e9;--nx-b-rgb:14,165,233;--nx-l:#2563eb;--nx-l2:#1d4ed8;--nx-l3:#1e40af;--nx-bg:#f3f4f6;--nx-side:#e5e7eb;--nx-card:#fff;--nx-in:#fff;--nx-modal:#fff;--nx-panel:#f3f4f6;--nx-foot:#e5e7eb;--nx-cover:#dbeafe}
html[data-theme='indigo'],html[data-theme='aurora'],html[data-theme='sunset'],html[data-theme='forest']{--accent:var(--nx-a2);--accent-light:var(--nx-l)}
/* настройки на всю высоту */
html:not([data-theme='light']) .settings-window{width:min(90vw,1040px);height:min(95vh,940px);zoom:1}
html:not([data-theme='light']) .settings-window::before{content:'';position:absolute;left:0;right:0;top:0;height:2px;z-index:6;background:linear-gradient(90deg,transparent,var(--nx-a),var(--nx-b),transparent)}
html:not([data-theme='light']) .settings-window .settings-sidebar-header{padding:26px 20px 14px}
html:not([data-theme='light']) .settings-window .settings-nav{padding:10px 12px 18px;gap:3px}
html:not([data-theme='light']) .settings-window .settings-nav-item{padding:11px 14px;font-size:14px;border-radius:10px}
html:not([data-theme='light']) .settings-window .s-navsep{margin-top:auto}
html:not([data-theme='light']) .settings-window .settings-content{padding:34px 30px 36px}
html:not([data-theme='light']) .settings-window .settings-section{max-width:680px}
html:not([data-theme='light']) .settings-window .settings-section h2{font-size:24px}
html:not([data-theme='light']) .settings-window .settings-section .form-input{font-size:14.5px;padding:12px 14px}
@media(max-width:760px){html:not([data-theme='light']) .settings-window{width:100vw;height:100dvh}}
/* история чатов и сообщения темнее на ~10% */
html:not([data-theme='light']) .sidebar{background:linear-gradient(180deg,rgba(var(--nx-a2-rgb),.1),transparent 30%),color-mix(in srgb,var(--bg-sidebar) 88%,#000)}
html:not([data-theme='light']) .msg.other .msg-bubble{background:color-mix(in srgb,var(--bg-msg-other) 86%,#000);border-color:rgba(var(--nx-a-rgb),.16)}
html:not([data-theme='light']) .msg.own .msg-bubble{background:linear-gradient(135deg,var(--nx-a2),var(--nx-a3));box-shadow:0 4px 16px rgba(var(--nx-a2-rgb),.3)}
html:not([data-theme='light']) .contact:not(.active){background:transparent}
html:not([data-theme='light']) .chat-area{background-color:color-mix(in srgb,var(--bg-main) 90%,#000)}

/* ===== v9: информация о группе/канале ===== */
.avatar,.msg-avatar{flex:none}
html:not([data-theme='light']) #info-modal .info-members{gap:8px}
html:not([data-theme='light']) #info-modal .info-member{position:relative;display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:14px;overflow:hidden;background:linear-gradient(135deg,rgba(var(--nx-a-rgb),.09),rgba(var(--nx-a-rgb),.02));border:1px solid rgba(var(--nx-a-rgb),.16);transition:border-color .2s,background .2s,box-shadow .2s}
html:not([data-theme='light']) #info-modal .info-member:hover{transform:none;border-color:rgba(var(--nx-a-rgb),.5);background:linear-gradient(135deg,rgba(var(--nx-a-rgb),.17),rgba(var(--nx-a-rgb),.04));box-shadow:0 0 22px rgba(var(--nx-a-rgb),.14)}
html:not([data-theme='light']) #info-modal .info-member .avatar{flex:none;width:42px;height:42px;border-radius:50%;font-size:15px;box-shadow:0 0 0 2px rgba(var(--nx-a-rgb),.4),0 0 14px rgba(var(--nx-a2-rgb),.25)}
html:not([data-theme='light']) #info-modal .info-member-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
html:not([data-theme='light']) #info-modal .info-member-name{font-size:14px;font-weight:700;color:var(--v-f1f1ff)}
html:not([data-theme='light']) #info-modal .info-member-role{font-size:11px;font-weight:600;letter-spacing:.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html:not([data-theme='light']) #info-modal .info-member-role.owner{color:#fbbf24}
html:not([data-theme='light']) #info-modal .info-member-role.deputy{color:var(--nx-l)}
html:not([data-theme='light']) #info-modal .info-member-role.admin{color:var(--nx-b)}
html:not([data-theme='light']) #info-modal .info-member-role.member,html:not([data-theme='light']) #info-modal .info-member-role.subscriber{color:var(--v-8a8ab4)}
html:not([data-theme='light']) #info-modal .info-member-status{font-weight:500}
html:not([data-theme='light']) #info-modal .info-member-status::before{content:'';display:inline-block;width:6px;height:6px;border-radius:50%;background:currentColor;margin-right:4px;vertical-align:1px}
html:not([data-theme='light']) #info-modal .info-member:has(.info-member-role.owner){border-color:rgba(251,191,36,.45);background:linear-gradient(135deg,rgba(251,191,36,.14),rgba(251,191,36,.02))}
html:not([data-theme='light']) #info-modal .info-member:has(.info-member-role.owner) .avatar{box-shadow:0 0 0 2px #fbbf24,0 0 16px rgba(251,191,36,.4)}
html:not([data-theme='light']) #info-modal .info-member:has(.info-member-role.deputy,.info-member-role.admin)::before{content:'';position:absolute;left:0;top:10px;bottom:10px;width:3px;border-radius:0 3px 3px 0;background:linear-gradient(var(--nx-a),var(--nx-b))}
html:not([data-theme='light']) #info-modal .info-member-actions{display:flex;gap:6px;flex:none;opacity:0;transform:translateX(6px);transition:opacity .2s,transform .2s}
html:not([data-theme='light']) #info-modal .info-member:hover .info-member-actions,html:not([data-theme='light']) #info-modal .info-member:focus-within .info-member-actions{opacity:1;transform:none}
@media(hover:none){html:not([data-theme='light']) #info-modal .info-member-actions{opacity:1;transform:none}}
html:not([data-theme='light']) #info-modal .info-member-actions .icon-btn{width:30px;height:30px;border-radius:50%;font-size:13px;background:rgba(255,255,255,.07)}
html:not([data-theme='light']) #info-modal .info-member-actions .icon-btn:hover{background:rgba(var(--nx-a-rgb),.3)}
html:not([data-theme='light']) #info-modal .info-member-actions .icon-btn:last-child[title='Кикнуть']:hover{background:rgba(239,68,68,.35);color:#fff}
html:not([data-theme='light']) #info-modal .info-section-title{display:flex;align-items:center;gap:8px;font-size:10px;font-weight:700;letter-spacing:.16em;color:var(--nx-l);padding-top:16px}
html:not([data-theme='light']) #info-modal .info-section-title::after{content:'';flex:1;height:1px;background:linear-gradient(90deg,rgba(var(--nx-a-rgb),.4),transparent)}
html:not([data-theme='light']) #info-modal #info-members-count{background:rgba(var(--nx-a-rgb),.2);color:#fff;border-radius:10px;padding:1px 8px;font-size:10px}
html:not([data-theme='light']) #info-modal .member-picker{background:rgba(0,0,0,.25);border:1px solid rgba(var(--nx-a-rgb),.15);border-radius:12px;max-height:220px;padding:6px;gap:4px}
html:not([data-theme='light']) #info-modal .member-pick{border-radius:10px;padding:8px 10px;gap:10px;transition:background .2s,box-shadow .2s}
html:not([data-theme='light']) #info-modal .member-pick:hover{background:rgba(var(--nx-a-rgb),.12);transform:none}
html:not([data-theme='light']) #info-modal .member-pick.selected{background:rgba(var(--nx-a-rgb),.22);box-shadow:inset 0 0 0 1px rgba(var(--nx-a-rgb),.55)}
html:not([data-theme='light']) #info-modal .member-pick .avatar{flex:none;width:34px;height:34px;border-radius:50%}
html:not([data-theme='light']) #info-modal .member-pick-check{flex:none}
html:not([data-theme='light']) #info-modal .gs-actions{display:grid;gap:8px;margin-top:6px}
html:not([data-theme='light']) #info-modal .gs-action{display:flex;align-items:center;gap:12px;width:100%;padding:11px 14px;border-radius:12px;text-align:left;background:rgba(var(--nx-a-rgb),.08);border:1px solid rgba(var(--nx-a-rgb),.2);transition:background .2s,border-color .2s}
html:not([data-theme='light']) #info-modal .gs-action:hover{background:rgba(var(--nx-a-rgb),.18);border-color:rgba(var(--nx-a-rgb),.5)}
html:not([data-theme='light']) #info-modal .gs-ico{flex:none;width:34px;height:34px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:rgba(var(--nx-a-rgb),.2);color:var(--nx-l)}
html:not([data-theme='light']) #info-modal .gs-ico svg{width:18px;height:18px}
html:not([data-theme='light']) #info-modal .gs-txt{display:flex;flex-direction:column;gap:1px;min-width:0}
html:not([data-theme='light']) #info-modal .gs-txt b{font-size:13px;font-weight:700;color:var(--v-f1f1ff)}
html:not([data-theme='light']) #info-modal .gs-txt small{font-size:11px;color:var(--v-8a8ab4)}
html:not([data-theme='light']) #info-modal .gs-action-danger{background:rgba(239,68,68,.07);border-color:rgba(239,68,68,.28)}
html:not([data-theme='light']) #info-modal .gs-action-danger:hover{background:rgba(239,68,68,.16);border-color:rgba(239,68,68,.55)}
html:not([data-theme='light']) #info-modal .gs-action-danger .gs-ico{background:rgba(239,68,68,.18);color:#f87171}
html:not([data-theme='light']) #info-modal .gs-action-danger .gs-txt b{color:#f87171}
html:not([data-theme='light']) #info-modal .gs-card{display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:14px;background:rgba(var(--nx-a-rgb),.05);border:1px solid rgba(var(--nx-a-rgb),.18)}
html:not([data-theme='light']) #info-modal .gs-title{font-size:10px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--nx-l)}
html:not([data-theme='light']) #info-modal .gs-field{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:600;color:var(--v-b4b4d8)}
html:not([data-theme='light']) #info-modal .gs-note{font-size:11px;color:var(--v-7b7ba4)}
html:not([data-theme='light']) #info-modal .gs-danger{background:rgba(239,68,68,.05);border-color:rgba(239,68,68,.3)}
html:not([data-theme='light']) #info-modal .gs-danger .gs-title{color:#f87171}
html:not([data-theme='light']) #info-modal .media-gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
html:not([data-theme='light']) #info-modal .media-item{border-radius:10px;overflow:hidden;border:1px solid rgba(var(--nx-a-rgb),.15)}
html:not([data-theme='light']) #info-modal .media-empty{padding:32px 0;text-align:center;color:var(--v-6b6b94);font-size:12px}

/* ===== темы v2: Telegram / Nord / Graphite / Mocha / Sepia =====
   data-theme остаётся dark|light (на нём держатся старые правила), конкретная тема — в data-skin */
html[data-skin="nord"]{color-scheme:dark;--bg-deep:#272c36;--bg-main:#2e3440;--bg-sidebar:#272c36;--bg-panel:#3b4252;--bg-hover:#363d4b;--bg-active:#434c5e;--bg-input:#3b4252;--bg-msg-own:#5e81ac;--bg-msg-other:#3b4252;--text-primary:#eceff4;--text-secondary:#a8b3c7;--text-muted:#7b88a1;--accent:#88c0d0;--accent-light:#8fbcbb;--skin-line:rgba(255,255,255,.05);--b1:rgba(255,255,255,.05);--b2:rgba(255,255,255,.05);--nx-a:#8fbcbb;--nx-a-rgb:143,188,187;--nx-a2:#88c0d0;--nx-a2-rgb:136,192,208;--nx-a3:#4c6a8f;--nx-b:#81a1c1;--nx-b-rgb:129,161,193;--nx-l:#8fbcbb;--nx-l2:#8fbcbb;--nx-l3:#8fbcbb;--nx-bg:#2e3440;--nx-side:#272c36;--nx-card:#3b4252;--nx-in:#3b4252;--nx-modal:#3b4252;--nx-panel:#3b4252;--nx-foot:#272c36;--nx-cover:#3b4252}
html[data-skin="graphite"]{color-scheme:dark;--bg-deep:#151517;--bg-main:#1c1c1e;--bg-sidebar:#151517;--bg-panel:#2c2c2e;--bg-hover:#2a2a2d;--bg-active:#3a3a3c;--bg-input:#2c2c2e;--bg-msg-own:#1e5fb4;--bg-msg-other:#2c2c2e;--text-primary:#f2f2f7;--text-secondary:#a1a1a8;--text-muted:#6e6e73;--accent:#0a84ff;--accent-light:#5eb0ff;--skin-line:rgba(255,255,255,.05);--b1:rgba(255,255,255,.05);--b2:rgba(255,255,255,.05);--nx-a:#5eb0ff;--nx-a-rgb:94,176,255;--nx-a2:#0a84ff;--nx-a2-rgb:10,132,255;--nx-a3:#1e5fb4;--nx-b:#64d2ff;--nx-b-rgb:100,210,255;--nx-l:#5eb0ff;--nx-l2:#5eb0ff;--nx-l3:#5eb0ff;--nx-bg:#1c1c1e;--nx-side:#151517;--nx-card:#2c2c2e;--nx-in:#2c2c2e;--nx-modal:#2c2c2e;--nx-panel:#2c2c2e;--nx-foot:#151517;--nx-cover:#2c2c2e}
html[data-skin] .sidebar{background:var(--bg-sidebar)}
html[data-skin] .sidebar-header,html[data-skin] .chat-header{background:var(--bg-sidebar);backdrop-filter:none;box-shadow:none;border-bottom:1px solid var(--skin-line)}
html[data-skin] .chat-area{background:var(--bg-main)}
html[data-skin] .contact.active{background:var(--bg-active);box-shadow:none}
html[data-skin] .msg.own .msg-bubble{background:var(--bg-msg-own);color:#fff;box-shadow:0 1px 1px rgba(0,0,0,.12)}
html[data-skin] .msg.other .msg-bubble{background:var(--bg-msg-other);color:var(--text-primary);border-color:var(--skin-line);box-shadow:0 1px 1px rgba(0,0,0,.1)}
html[data-theme="light"][data-skin] .msg.own .msg-bubble{color:var(--text-primary)}
html[data-skin] .unread-badge{background:var(--accent)}
html[data-skin] .composer-send{background:var(--accent);box-shadow:none;animation:none}
html[data-skin] .composer-send:hover{animation:none;box-shadow:none;transform:scale(1.06)}
html[data-skin] .btn-primary,html[data-skin] .auth-tab-slider{background:var(--accent);box-shadow:none}
html[data-skin] .btn-primary:hover{animation:none;box-shadow:none;transform:none}
html[data-skin] .composer-input:focus{border-color:var(--accent);box-shadow:none}
html[data-skin] .settings-window::before{display:none}
.theme-tgdark{background:linear-gradient(135deg,#0e1621,#17212b);--a:#5288c1;--m:#2b5278}
.theme-tglight{background:linear-gradient(135deg,#e7ebf0,#ffffff);--a:#3390ec;--m:#eeffde}
.theme-nord{background:linear-gradient(135deg,#2e3440,#3b4252);--a:#88c0d0;--m:#5e81ac}
.theme-graphite{background:linear-gradient(135deg,#1c1c1e,#2c2c2e);--a:#0a84ff;--m:#1e5fb4}
.theme-mocha{background:linear-gradient(135deg,#1f1a17,#2a231e);--a:#e0a96d;--m:#7a4f33}
.theme-sepia{background:linear-gradient(135deg,#f4ecd8,#fbf5e6);--a:#b5651d;--m:#f0e0b0}
.theme-tgdark,.theme-tglight,.theme-nord,.theme-graphite,.theme-mocha,.theme-sepia{position:relative}
.theme-tgdark::before,.theme-tglight::before,.theme-nord::before,.theme-graphite::before,.theme-mocha::before,.theme-sepia::before{content:'';position:absolute;left:10%;top:20%;width:40%;height:8%;background:var(--a);border-radius:3px}
.theme-tgdark::after,.theme-tglight::after,.theme-nord::after,.theme-graphite::after,.theme-mocha::after,.theme-sepia::after{content:'';position:absolute;right:10%;bottom:25%;width:50%;height:12%;background:var(--m);border-radius:3px}

/* ===== v3: нейтральные тёмные темы, композер, профили, упоминания ===== */
:root{--v-1d1d38:#212121;--v-26264a:#2b2b2b;--v-303058:#363636;--v-3d3d5c:#424242;--v-222242:#272727;--v-181830:#1c1c1c;--v-07070e:#090909;--v-252540:#292929;--v-2c2c52:#313131;--v-1a1a3a:#1f1f1f;--v-212142:#262626;--v-0f0f1d:#121212;--v-0d0d19:#0f0f0f;--v-242445:#292929;--v-101022:#131313;--v-1a1a33:#1e1e1e;--v-2a2a4e:#2f2f2f;--v-222244:#272727;--v-2b2858:#2f2f2f;--v-0a0a16:#0c0c0c;--v-12121f:#141414;--v-2a2a4a:#2f2f2f;--v-5a5a7a:#5e5e5e;--v-8b8ba3:#8e8e8e;--v-f1f1ff:#f3f3f3;--v-8a8ab4:#8f8f8f;--v-d4d4e4:#d6d6d6;--v-b4b4d8:#b8b8b8;--v-7b7ba4:#808080;--v-c4c4d4:#c6c6c6;--v-b8b8d8:#bcbcbc;--v-9a9ac0:#9e9e9e;--v-5d5d86:#626262;--v-6b6b94:#707070;--v-4b4b80:#515151;--v-f4f4fb:#f5f5f5;--v-rgb:24,24,26;--bg-deep:#0f0f10;--bg-main:#17181a;--bg-sidebar:#1e1f21;--bg-panel:#26272a;--bg-hover:#2b2c30;--bg-active:#34363b;--bg-input:#26272a;--bg-msg-own:#2b62c4;--bg-msg-other:#26272a;--text-primary:#f2f2f3;--text-secondary:#a0a3a8;--text-muted:#747880;--accent:#4c8bf5;--accent-light:#7fb0ff;--b1:rgba(255,255,255,.07);--b2:rgba(255,255,255,.1);--nx-a:#7fb0ff;--nx-a-rgb:127,176,255;--nx-a2:#4c8bf5;--nx-a2-rgb:76,139,245;--nx-a3:#2b62c4;--nx-b:#6cb6ff;--nx-b-rgb:108,182,255;--nx-l:#7fb0ff;--nx-l2:#a8c9ff;--nx-l3:#d3e3ff;--nx-bg:#17181a;--nx-side:#1e1f21;--nx-card:#222326;--nx-in:#26272a;--nx-modal:#202124;--nx-panel:#222326;--nx-foot:#151617;--nx-cover:#1e1f21}
html[data-theme='darker']{--v-1d1d38:#121212;--v-26264a:#171717;--v-303058:#1d1d1d;--v-3d3d5c:#242424;--v-222242:#151515;--v-181830:#0f0f0f;--v-07070e:#040404;--v-252540:#161616;--v-2c2c52:#1a1a1a;--v-1a1a3a:#101010;--v-212142:#141414;--v-0f0f1d:#090909;--v-0d0d19:#080808;--v-242445:#161616;--v-101022:#0a0a0a;--v-1a1a33:#101010;--v-2a2a4e:#191919;--v-222244:#151515;--v-2b2858:#191919;--v-0a0a16:#060606;--v-12121f:#0a0a0a;--v-2a2a4a:#191919;--v-rgb:10,10,11;--bg-deep:#000;--bg-main:#070708;--bg-sidebar:#0d0d0e;--bg-panel:#151516;--bg-hover:#1c1c1e;--bg-active:#242427;--bg-input:#151516;--bg-msg-own:#1f4f9e;--bg-msg-other:#151516;--nx-bg:#070708;--nx-side:#0d0d0e;--nx-card:#111112;--nx-in:#151516;--nx-modal:#0a0a0b;--nx-panel:#121213;--nx-foot:#050505;--nx-cover:#0f0f10}
:is(html[data-theme='dark'],html[data-theme='darker'])  .sidebar{background:var(--bg-sidebar)}
:is(html[data-theme='dark'],html[data-theme='darker'])  .chat-area{background:var(--bg-main)}
:is(html[data-theme='dark'],html[data-theme='darker'])  .contact.active{background:var(--bg-active);box-shadow:none}
:is(html[data-theme='dark'],html[data-theme='darker'])  .msg.own .msg-bubble{background:var(--bg-msg-own);box-shadow:none}
:is(html[data-theme='dark'],html[data-theme='darker'])  .msg.other .msg-bubble{border-color:var(--b1)}
:is(html[data-theme='dark'],html[data-theme='darker'])  .settings-window::before{display:none}
/* композер */
html[data-theme] .composer{margin:0 16px 14px;padding:5px 6px;gap:2px;align-items:flex-end;background:var(--bg-panel);border:1px solid var(--b1);border-radius:24px}
html[data-theme] .composer.recording{margin:0 16px 14px}
html[data-theme] .composer-input{min-height:38px;padding:9px 8px;background:transparent;border:0;border-radius:0;box-shadow:none!important;animation:none}
html[data-theme] .composer > button:not(.composer-send):not(.display-mode-btn):not(.rec-cancel):not(.rec-stop){flex:none;width:38px;height:38px;border-radius:50%;background:transparent;color:var(--text-secondary);font-size:19px;transform:none!important;transition:background .15s,color .15s}
html[data-theme] .composer > button:not(.composer-send):not(.display-mode-btn):not(.rec-cancel):not(.rec-stop):hover{background:var(--bg-hover);color:var(--text-primary)}
html[data-theme] .composer > button svg{width:22px;height:22px}
html[data-theme] .composer-send{width:38px;height:38px;border-radius:50%;font-size:17px;background:var(--accent);box-shadow:none;animation:none}
html[data-theme] .composer-send:hover{filter:brightness(1.1);transform:none;box-shadow:none;animation:none}
html[data-theme] .display-mode-btn{width:38px;height:38px}
/* свои сообщения: справа и без аватарки */
.msg.own{justify-content:flex-end!important}
.msg.own .msg-avatar{display:none!important}
/* упоминания без плашки */
html[data-theme] .msg-text .mention,html[data-theme] .msg.own .msg-text .mention,html[data-theme="light"] .msg.own .msg-text .mention{background:none!important;padding:0!important;border-radius:0!important;transform:none!important;animation:none!important;color:var(--accent-light);font-weight:600}
html[data-theme] .msg-text .mention:hover{text-decoration:underline;text-underline-offset:2px;display:inline;background:none!important}
html[data-theme] .msg-text .mention-me{color:var(--success)}
html[data-theme] .msg.own .msg-text .mention{color:#fff;text-decoration:underline;text-underline-offset:2px}
html[data-theme="light"] .msg.own .msg-text .mention{color:var(--accent-light)}

/* профили, группы, каналы */
html[data-theme] .modal-card{background:var(--bg-sidebar);border:1px solid var(--b1);border-radius:16px;box-shadow:0 14px 44px rgba(0,0,0,.45)}
html[data-theme] .modal-header{padding:14px 16px 6px;border-bottom:0}
html[data-theme] .modal-header h3{font-size:15px;font-weight:600}
html[data-theme] .profile-view-block::before,html[data-theme] .profile-view-block::after,html[data-theme] .profile-avatar-block::before,html[data-theme] .profile-avatar-block::after{content:none;display:none}
html[data-theme] .profile-view-block,html[data-theme] .profile-avatar-block{gap:6px;padding:8px 0 14px;background:none;border:0}
html[data-theme] .profile-view-block .avatar,html[data-theme] .profile-avatar-block .avatar{border:0;box-shadow:none;animation:none}
html[data-theme] .avatar-xl{width:104px;height:104px;font-size:38px}
html[data-theme] .avatar-lg{width:92px;height:92px;font-size:34px}
html[data-theme] .profile-view-name,html[data-theme] .user-profile-name,html[data-theme] .info-name{font-size:20px;font-weight:600;color:var(--text-primary);margin:4px 0 0}
html[data-theme] .profile-username{font-size:13.5px;color:var(--accent-light)}
html[data-theme] .profile-view-bio,html[data-theme] .user-profile-bio{padding:12px 14px;background:var(--bg-panel);border:0;border-radius:12px;text-align:left;font-size:14px;color:var(--text-primary)}
html[data-theme] .user-profile-status,html[data-theme] .user-profile-since,html[data-theme] .info-desc{text-align:center;color:var(--text-secondary)}
html[data-theme] .pf-tabs,html[data-theme] .info-tabs{gap:0;padding:0;background:none;border-bottom:1px solid var(--b1);border-radius:0}
html[data-theme] .pf-tab,html[data-theme] .info-tab{flex:1;padding:10px 8px;background:none;border:0;border-bottom:2px solid transparent;border-radius:0;color:var(--text-secondary);font-size:14px;transform:none}
html[data-theme] .pf-tab.active,html[data-theme] .info-tab.active{background:none;color:var(--accent-light);border-bottom-color:var(--accent);font-weight:600}
html[data-theme] .pf-actions{grid-template-columns:1fr;gap:2px}
html[data-theme] .pf-act,html[data-theme] .gs-action,html[data-theme] #info-modal .gs-action{display:flex;align-items:center;gap:12px;width:100%;padding:11px 12px;text-align:left;background:transparent;border:0;border-radius:10px;font-size:14px;color:var(--text-primary)}
html[data-theme] .pf-act:hover,html[data-theme] #info-modal .gs-action:hover{background:var(--bg-hover);border:0}
html[data-theme] .pf-act.danger,html[data-theme] #info-modal .gs-action-danger,html[data-theme] #info-modal .gs-action-danger .gs-txt b{color:var(--danger);background:transparent;border:0}
html[data-theme] #info-modal .gs-action-danger:hover{background:rgba(239,68,68,.1);border:0}
html[data-theme] #info-modal .gs-actions{gap:2px}
html[data-theme] #info-modal .gs-ico{width:28px;height:28px;border-radius:0;background:none;color:var(--text-secondary)}
html[data-theme] #info-modal .gs-action-danger .gs-ico{background:none;color:var(--danger)}
html[data-theme] #info-modal .gs-txt b{font-size:14px;font-weight:500;color:var(--text-primary)}
html[data-theme] #info-modal .gs-txt small{color:var(--text-muted)}
html[data-theme] #info-modal .gs-card{background:var(--bg-panel);border:0;border-radius:12px}
html[data-theme] #info-modal .gs-danger{background:rgba(239,68,68,.08)}
html[data-theme] #info-modal .gs-title,html[data-theme] #info-modal .info-section-title{font-size:13px;font-weight:600;letter-spacing:0;text-transform:none;color:var(--accent-light);padding-top:14px}
html[data-theme] #info-modal .info-section-title::after{display:none}
html[data-theme] #info-modal #info-members-count{background:none;color:inherit;padding:0;font-size:inherit}
html[data-theme] #info-modal .info-members{gap:0}
html[data-theme] #info-modal .info-member{background:transparent;border:0;border-radius:10px;box-shadow:none;padding:8px 10px}
html[data-theme] #info-modal .info-member:hover{background:var(--bg-hover);border:0;box-shadow:none}
html[data-theme] #info-modal .info-member:has(.info-member-role.owner){background:transparent;border:0}
html[data-theme] #info-modal .info-member:has(.info-member-role.deputy,.info-member-role.admin)::before{display:none}
html[data-theme] #info-modal .info-member .avatar,html[data-theme] #info-modal .info-member:has(.info-member-role.owner) .avatar{box-shadow:none}
html[data-theme] #info-modal .info-member-name{font-size:14.5px;font-weight:500;color:var(--text-primary)}
html[data-theme] #info-modal .info-member-actions .icon-btn{background:transparent}
html[data-theme] #info-modal .member-picker{background:transparent;border:0;padding:0}
html[data-theme] #info-modal .member-pick{border-radius:10px}
html[data-theme] #info-modal .member-pick.selected{background:var(--bg-hover);box-shadow:none}
html[data-theme] #info-modal .media-item{border:0;border-radius:8px}
html[data-theme] .star-buttons{display:flex;gap:8px}
html[data-theme] .star-btn{flex:1;padding:9px 10px;border:0;border-radius:10px;background:var(--bg-panel);color:var(--text-primary);font-size:13px;box-shadow:none;transform:none}
html[data-theme] .star-btn:hover{background:var(--bg-hover)}
html[data-theme] #user-modal .modal-footer{display:flex;flex-wrap:wrap;gap:6px;padding:8px 16px 16px;border-top:0}
html[data-theme] #user-modal .modal-footer .btn-primary{flex:1 1 100%;order:-1;padding:11px;border-radius:10px;font-size:14px;box-shadow:none;transform:none}
html[data-theme] #user-modal .modal-footer .btn-secondary,html[data-theme] #user-modal .modal-footer .btn-danger{flex:1 1 calc(50% - 3px);padding:9px 8px;background:transparent;border:0;border-radius:10px;font-size:13px;color:var(--text-secondary);box-shadow:none;transform:none}
html[data-theme] #user-modal .modal-footer .btn-secondary:hover,html[data-theme] #user-modal .modal-footer .btn-danger:hover{background:var(--bg-hover);color:var(--text-primary)}
html[data-theme] #user-action-block,html[data-theme] #user-action-report,html[data-theme] #user-action-decline{color:var(--danger)!important}
html[data-theme] #user-action-friend{color:var(--accent-light)!important}

/* альбомы и видео в сообщениях */
.nx-album{display:grid;grid-template-columns:repeat(6,1fr);grid-auto-rows:112px;gap:2px;width:min(340px,100%);margin:-3px -6px 5px;border-radius:12px;overflow:hidden;cursor:default}
.nx-al-tile{position:relative;grid-column:span 2;overflow:hidden;cursor:pointer;background:var(--bg-panel)}
.nx-album img,.nx-album video{display:block;width:100%;height:100%;object-fit:cover;transition:transform .25s}
.nx-al-tile:hover img,.nx-al-tile:hover video{transform:scale(1.04)}
.nx-al-n2{grid-auto-rows:170px}.nx-al-n2 .nx-al-tile{grid-column:span 3}
.nx-al-n3 .nx-al-tile:first-child{grid-column:span 4;grid-row:span 2}
.nx-al-n4{grid-auto-rows:130px}.nx-al-n4 .nx-al-tile{grid-column:span 3}
.nx-al-n5{grid-auto-rows:130px}.nx-al-n5 .nx-al-tile:nth-child(-n+2){grid-column:span 3}
.nx-al-n7 .nx-al-tile:first-child,.nx-al-n10 .nx-al-tile:first-child{grid-column:span 6}
.nx-al-n8 .nx-al-tile:nth-child(-n+2){grid-column:span 3}
.nx-vid{position:relative;cursor:pointer}
.nx-vid video{display:block;width:100%;max-height:360px;object-fit:cover;pointer-events:none}
.nx-play{position:absolute;left:50%;top:50%;width:46px;height:46px;margin:-23px 0 0 -23px;border-radius:50%;background:rgba(0,0,0,.55);pointer-events:none}
.nx-play::after{content:"";position:absolute;left:18px;top:14px;border-left:15px solid #fff;border-top:9px solid transparent;border-bottom:9px solid transparent}
.nx-al-prev{display:flex;gap:4px;overflow:hidden}
.nx-al-prev img,.nx-al-prev video{width:56px;height:56px;object-fit:cover;border-radius:8px}
/* меню чата */
html[data-theme] #chat-ctx-menu .ctx-item{display:flex;align-items:center;gap:10px}
html[data-theme] #chat-ctx-menu .ctx-item::before{display:none!important;content:none;width:18px;height:18px;flex:none;background:var(--text-secondary);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain}
html[data-theme] #chat-ctx-menu .ctx-item.danger::before{background:var(--danger)}
html[data-theme] #chat-ctx-menu #chat-ctx-mute::before{-webkit-mask-image:var(--ic-bell);mask-image:var(--ic-bell)}
html[data-theme] #chat-ctx-menu #chat-ctx-pin::before{-webkit-mask-image:var(--ic-pin);mask-image:var(--ic-pin)}
html[data-theme] #chat-ctx-menu #chat-ctx-archive::before{-webkit-mask-image:var(--ic-archive);mask-image:var(--ic-archive)}
html[data-theme] #chat-ctx-menu #chat-ctx-delete::before{-webkit-mask-image:var(--ic-out);mask-image:var(--ic-out)}

/* пересылка */
.nxf{position:fixed;inset:0;z-index:9000;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.55);animation:nxfIn .15s ease-out}
@keyframes nxfIn{from{opacity:0}to{opacity:1}}
.nxf-card{display:flex;flex-direction:column;width:min(420px,94vw);max-height:min(640px,88vh);overflow:hidden;background:var(--bg-sidebar);border:1px solid var(--b1);border-radius:16px;box-shadow:0 18px 50px rgba(0,0,0,.5)}
.nxf-head{display:flex;align-items:center;padding:14px 12px 4px 18px}
.nxf-title{flex:1;font-size:16px;font-weight:600;color:var(--text-primary)}
.nxf-x{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border:0;border-radius:50%;background:transparent;color:var(--text-secondary);cursor:pointer}
.nxf-x:hover{background:var(--bg-hover)}.nxf-x svg{width:20px;height:20px}
.nxf-prev{padding:0 18px 8px;font-size:12.5px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nxf-search{margin:4px 16px 8px;padding:9px 14px;border:0;border-radius:20px;outline:none;background:var(--bg-input);color:var(--text-primary);font:inherit;font-size:14px}
.nxf-list{flex:1;min-height:180px;overflow-y:auto;padding:0 8px;scrollbar-width:none}.nxf-list::-webkit-scrollbar{display:none}
.nxf-item{display:flex;align-items:center;gap:12px;padding:8px 10px;border-radius:10px;cursor:pointer}.nxf-item:hover{background:var(--bg-hover)}
.nxf-item .avatar{width:42px;height:42px;flex:none;font-size:15px}
.nxf-info{flex:1;min-width:0}
.nxf-name{font-size:14.5px;font-weight:500;color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nxf-sub{font-size:12.5px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nxf-check{display:flex;align-items:center;justify-content:center;flex:none;width:22px;height:22px;border:2px solid var(--text-muted);border-radius:50%;transition:background .15s,border-color .15s}
.nxf-item.on .nxf-check{background:var(--accent);border-color:var(--accent)}
.nxf-item.on .nxf-check::after{content:"";width:9px;height:5px;margin-top:-2px;border:solid #fff;border-width:0 0 2px 2px;transform:rotate(-45deg)}
.nxf-empty{padding:34px 0;text-align:center;font-size:14px;color:var(--text-muted)}
.nxf-foot{display:flex;flex-direction:column;gap:10px;padding:10px 16px 16px;border-top:1px solid var(--b1)}
.nxf-cmt{padding:10px 14px;border:0;border-radius:12px;outline:none;background:var(--bg-input);color:var(--text-primary);font:inherit;font-size:14px}
.nxf-row{display:flex;align-items:center;gap:12px}
.nxf-hide{display:flex;align-items:center;flex:1;gap:8px;font-size:13.5px;color:var(--text-secondary);cursor:pointer}
.nxf-send{padding:10px 20px;border:0;border-radius:12px;background:var(--accent);color:#fff;font-size:14px;font-weight:600;cursor:pointer}
.nxf-send:disabled{opacity:.4;cursor:default}

/* ===== v4: прокрутка, профили, архив/избранное, пересылка ===== */
:root{--ic-chat: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%3Cpath d='M21 11.5a8.4 8.4 0 0 1-9 8.4 8.5 8.5 0 0 1-3.8-.9L3 20l1.1-4.9A8.4 8.4 0 1 1 21 11.5z'/%3E%3C/svg%3E");--ic-userplus: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%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M19 8v6M22 11h-6'/%3E%3C/svg%3E");--ic-ban: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%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m5.6 5.6 12.8 12.8'/%3E%3C/svg%3E");--ic-flag: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%3Cpath d='M5 21V4M5 4h11l-2 4 2 4H5'/%3E%3C/svg%3E");--ic-shield: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%3Cpath d='M12 3 4 6v6c0 5 3.4 8 8 9 4.6-1 8-4 8-9V6z'/%3E%3C/svg%3E");--ic-check: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%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E");--ic-x: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%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E");--ic-bell: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%3Cpath d='M18 16v-5a6 6 0 0 0-12 0v5l-2 3h16z'/%3E%3Cpath d='M10 21a2 2 0 0 0 4 0'/%3E%3C/svg%3E");--ic-pin: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%3Cpath d='M12 17v5M8 3h8l-1 6 3 4H6l3-4z'/%3E%3C/svg%3E");--ic-trash: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%3Cpath d='M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13'/%3E%3C/svg%3E");--ic-star: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%3Cpath d='m12 3 2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 17l-5.4 2.9 1-6.1L3.2 9.5l6.1-.9z'/%3E%3C/svg%3E");--ic-archive: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%3Crect x='3' y='4' width='18' height='4' rx='1'/%3E%3Cpath d='M5 8v11h14V8M10 12h4'/%3E%3C/svg%3E");--ic-fwd: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%3Cpath d='m15 5 6 6-6 6M21 11H9a6 6 0 0 0-6 6v2'/%3E%3C/svg%3E");--ic-out: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%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9'/%3E%3C/svg%3E");--ic-invite: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%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.9M16 3.1a4 4 0 0 1 0 7.8'/%3E%3C/svg%3E");}
.contacts-list{scrollbar-width:none!important;-ms-overflow-style:none}
.contacts-list::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
html[data-theme] *{scrollbar-color:rgba(255,255,255,.16) transparent}
html[data-theme="light"] *{scrollbar-color:rgba(0,0,0,.2) transparent}
html[data-theme] ::-webkit-scrollbar-thumb{background:rgba(255,255,255,.14);border-radius:3px}
html[data-theme="light"] ::-webkit-scrollbar-thumb{background:rgba(0,0,0,.18)}
html[data-theme] ::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.26)}
/* профиль человека: плитки действий вместо кнопок с эмодзи */
html[data-theme] #user-modal .modal-card{width:min(400px,94vw)}
html[data-theme] #user-modal .modal-footer{display:grid;grid-template-columns:repeat(auto-fit,minmax(84px,1fr));gap:8px;padding:6px 16px 16px;border:0}
html[data-theme] #user-modal .modal-footer :is(#user-action-write,#user-action-friend,#user-action-block,#user-action-report,#user-action-mod,#user-action-accept,#user-action-decline){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;flex:none;order:0;min-height:68px;padding:10px 6px;border:0;border-radius:12px;background:var(--bg-panel);color:var(--text-primary);font-size:12px;font-weight:500;line-height:1.2;text-align:center;box-shadow:none;transform:none}
html[data-theme] #user-modal .modal-footer :is(#user-action-write,#user-action-friend,#user-action-block,#user-action-report,#user-action-mod,#user-action-accept,#user-action-decline):hover{background:var(--bg-hover)}
html[data-theme] #user-modal .modal-footer :is(#user-action-write,#user-action-friend,#user-action-block,#user-action-report,#user-action-mod,#user-action-accept,#user-action-decline)::before{content:"";width:24px;height:24px;background:var(--accent-light);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain}
html[data-theme] #user-modal .modal-footer :is(#user-action-write,#user-action-accept){background:var(--accent);color:#fff}
html[data-theme] #user-modal .modal-footer :is(#user-action-write,#user-action-accept):hover{filter:brightness(1.1);background:var(--accent)}
html[data-theme] #user-modal .modal-footer :is(#user-action-write,#user-action-accept)::before{background:#fff}
html[data-theme] #user-modal .modal-footer :is(#user-action-block,#user-action-report,#user-action-decline){color:var(--danger)!important}
html[data-theme] #user-modal .modal-footer :is(#user-action-block,#user-action-report,#user-action-decline)::before{background:var(--danger)}
html[data-theme] #user-modal .modal-footer #user-action-write::before{-webkit-mask-image:var(--ic-chat);mask-image:var(--ic-chat)}
html[data-theme] #user-modal .modal-footer #user-action-friend::before{-webkit-mask-image:var(--ic-userplus);mask-image:var(--ic-userplus)}
html[data-theme] #user-modal .modal-footer #user-action-block::before{-webkit-mask-image:var(--ic-ban);mask-image:var(--ic-ban)}
html[data-theme] #user-modal .modal-footer #user-action-report::before{-webkit-mask-image:var(--ic-flag);mask-image:var(--ic-flag)}
html[data-theme] #user-modal .modal-footer #user-action-mod::before{-webkit-mask-image:var(--ic-shield);mask-image:var(--ic-shield)}
html[data-theme] #user-modal .modal-footer #user-action-accept::before{-webkit-mask-image:var(--ic-check);mask-image:var(--ic-check)}
html[data-theme] #user-modal .modal-footer #user-action-decline::before{-webkit-mask-image:var(--ic-x);mask-image:var(--ic-x)}

/* списки действий: чат, группа, канал */
html[data-theme] :is(#user-modal .pf-actions,#info-modal .gs-actions){display:flex;flex-direction:column;gap:0;margin-top:10px;background:var(--bg-panel);border-radius:12px;overflow:hidden}
html[data-theme] :is(#user-modal .pf-act,#info-modal .gs-actions .gs-action){display:flex;align-items:center;gap:14px;width:100%;padding:12px 14px;border:0;border-radius:0;background:transparent;color:var(--text-primary);font-size:14.5px;text-align:left;box-shadow:none;transform:none;grid-column:auto!important}
html[data-theme] :is(#user-modal .pf-act,#info-modal .gs-actions .gs-action):hover{background:var(--bg-hover)}
html[data-theme] :is(#user-modal .pf-act,#info-modal .gs-actions .gs-action)+:is(.pf-act,.gs-action){border-top:1px solid var(--b1)}
html[data-theme] #user-modal .pf-act::before{content:"";flex:none;width:20px;height:20px;background:var(--text-secondary);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain}
html[data-theme] :is(#user-modal .pf-act.danger,#info-modal .gs-action-danger),html[data-theme] #info-modal .gs-action-danger .gs-txt b{color:var(--danger)}
html[data-theme] #user-modal .pf-act.danger::before{background:var(--danger)}
html[data-theme] #user-modal #pf-mute::before{-webkit-mask-image:var(--ic-bell);mask-image:var(--ic-bell)}
html[data-theme] #user-modal #pf-pin::before{-webkit-mask-image:var(--ic-pin);mask-image:var(--ic-pin)}
html[data-theme] #user-modal #pf-archive::before{-webkit-mask-image:var(--ic-archive);mask-image:var(--ic-archive)}
html[data-theme] #user-modal #pf-clear::before{-webkit-mask-image:var(--ic-trash);mask-image:var(--ic-trash)}

html[data-theme] #info-modal .gs-ico{width:22px;height:22px;flex:none;background:none;border:0;color:var(--text-secondary)}
html[data-theme] #info-modal .gs-ico svg{width:20px;height:20px}
html[data-theme] #info-modal .gs-action-danger .gs-ico{color:var(--danger)}
html[data-theme] #info-modal .gs-txt small{display:none}
html[data-theme] #info-modal .btn-primary#info-add-submit{width:100%;padding:11px;border-radius:12px}
html[data-theme] .star-buttons{display:flex;gap:8px}
html[data-theme] .star-btn{display:flex;align-items:center;justify-content:center;gap:8px;flex:1;padding:10px;border:0;border-radius:10px;background:var(--bg-panel);color:var(--text-primary);font-size:13.5px}
html[data-theme] .star-btn::before{content:"";width:10px;height:10px;border-radius:50%;background:#ef4444}
html[data-theme] .star-btn-blue::before{background:#3b9eff}
html[data-theme] .star-hint{font-size:12px;color:var(--text-muted)}
html[data-theme] .icon-btn{width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%}

/* ===== v5: фото в истории, избранное, профили, участники и медиа ===== */
html[data-theme] .contact.online .contact-status,html[data-theme] .contact.online.away .contact-status,html[data-theme] .contact.online.dnd .contact-status{color:var(--text-secondary)}
.nx-att-wait{position:relative;width:min(260px,100%);aspect-ratio:4/3;overflow:hidden;border-radius:10px;background:var(--bg-hover)}
.nx-att-wait i{position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.08),transparent);animation:nxSheen 1.3s infinite}
@keyframes nxSheen{from{transform:translateX(-100%)}to{transform:translateX(100%)}}
.nx-saved-av{display:flex;align-items:center;justify-content:center;color:#fff;background:linear-gradient(135deg,#4c8bf5,#2b62c4)!important}
.nx-saved #btn-call{display:none}
.nx-more-btn{display:block;width:100%;margin:6px 0 0;padding:10px;border:0;border-radius:10px;background:transparent;color:var(--accent-light);font-size:14px;font-weight:500;cursor:pointer}
.nx-more-btn:hover{background:var(--bg-hover)}
.nx-cut{display:none!important}.nx-open>.nx-cut{display:block!important}
.nxm{position:fixed;inset:0;z-index:9100;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.55)}
.nxm-card{display:flex;flex-direction:column;width:min(420px,94vw);max-height:min(640px,88vh);overflow:hidden;background:var(--bg-sidebar);border:1px solid var(--b1);border-radius:16px;box-shadow:0 18px 50px rgba(0,0,0,.5)}
.nxm-head{display:flex;align-items:center;padding:14px 12px 6px 18px}
.nxm-title{flex:1;font-size:16px;font-weight:600;color:var(--text-primary)}
.nxm-x{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border:0;border-radius:50%;background:transparent;color:var(--text-secondary);cursor:pointer}
.nxm-x:hover{background:var(--bg-hover)}
.nxm-search{margin:4px 16px 8px;padding:9px 14px;border:0;border-radius:20px;outline:none;background:var(--bg-input);color:var(--text-primary);font:inherit;font-size:14px}
.nxm-list{flex:1;min-height:200px;overflow-y:auto;padding:0 8px 12px;scrollbar-width:none}.nxm-list::-webkit-scrollbar{display:none}
.nxm .info-member{display:flex;align-items:center;gap:12px;padding:8px 10px;border-radius:10px;cursor:pointer}
.nxm .info-member:hover{background:var(--bg-hover)}
.nxm .info-member .avatar{width:42px;height:42px;flex:none}
.nxm .info-member-info{flex:1;min-width:0}
.nxm .info-member-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:14.5px;font-weight:500;color:var(--text-primary)}
.nxm .info-member-role{font-size:12.5px;color:var(--text-muted)}
.nxm .info-member-actions{display:flex;gap:4px}
html[data-theme] #user-modal .pf-write{display:flex;align-items:center;gap:14px;width:100%;margin:2px 0 10px;padding:12px 14px;border:0;border-radius:12px;background:var(--bg-panel);color:var(--accent-light);font-size:14.5px;font-weight:500;text-align:left;cursor:pointer;box-shadow:none;transform:none}
html[data-theme] #user-modal .pf-write:hover{background:var(--bg-hover)}
html[data-theme] #user-modal .pf-write::before{content:"";flex:none;width:20px;height:20px;background:var(--accent-light);-webkit-mask-image:var(--ic-chat);mask-image:var(--ic-chat);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain}
html[data-theme] #user-modal #user-action-friend::before{-webkit-mask-image:var(--ic-userplus);mask-image:var(--ic-userplus)}
html[data-theme] #user-modal #user-action-mod::before{-webkit-mask-image:var(--ic-shield);mask-image:var(--ic-shield)}
html[data-theme] #user-modal #user-action-report::before{-webkit-mask-image:var(--ic-flag);mask-image:var(--ic-flag)}
html[data-theme] #user-modal #user-action-block::before{-webkit-mask-image:var(--ic-ban);mask-image:var(--ic-ban)}
html[data-theme] #user-modal .modal-footer:not(:has(button:not(.hidden))){display:none}

/* ===== v6: архив, вкладки профиля, голосовые, приглашение ===== */
.nx-arch-wrap{padding:0 8px 2px}
.nx-arch{cursor:pointer}
.nx-arch-av{display:flex;align-items:center;justify-content:center;color:#fff;background:linear-gradient(135deg,#8e99ab,#5f6b7e)!important}
html[data-theme] .info-tabs{overflow-x:auto;scrollbar-width:none}
.info-tabs::-webkit-scrollbar{display:none}
html[data-theme] .info-tab{flex:none;padding:10px 14px}
.nx-empty{padding:42px 0;text-align:center;font-size:14px;color:var(--text-muted)}
.nx-row{display:flex;align-items:center;gap:12px;padding:10px;border-radius:12px;color:inherit;text-decoration:none;cursor:pointer}
.nx-row:hover{background:var(--bg-hover)}
.nx-row.busy{opacity:.5;pointer-events:none}
.nx-row-body{flex:1;min-width:0}
.nx-row-title{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:14.5px;font-weight:500;color:var(--text-primary)}
.nx-row-sub{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:12.5px;color:var(--text-muted)}
.nx-file-ico{display:flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;border-radius:12px;background:hsl(var(--h) 52% 46%);color:#fff;font-size:11px;font-weight:700}
.nx-link-ico{display:flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;border-radius:12px;background:var(--bg-panel);color:var(--accent-light);font-size:18px;font-weight:700;text-transform:uppercase}
.nx-vc{display:flex;align-items:center;gap:12px;margin-bottom:8px;padding:12px 14px;border-radius:16px;background:var(--bg-panel);transition:background .15s}
.nx-vc:hover{background:var(--bg-hover)}
.nx-vc-play{display:flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;border:0;border-radius:50%;background:var(--accent);color:#fff;cursor:pointer;transition:transform .15s,filter .15s}
.nx-vc-play:hover{filter:brightness(1.12)}.nx-vc-play:active{transform:scale(.93)}
.nx-vc-play svg{width:20px;height:20px;fill:currentColor}
.nx-vc-play .s,.nx-vc.playing .nx-vc-play .p{display:none}
.nx-vc.playing .nx-vc-play .s{display:block}
.nx-vc-main{flex:1;min-width:0}
.nx-vc-wave{display:flex;align-items:center;gap:2px;height:34px;cursor:pointer}
.nx-vc-wave i{flex:1;min-width:2px;height:var(--h);border-radius:2px;background:var(--text-muted);opacity:.4;transition:background .12s,opacity .12s}
.nx-vc-wave i.on{background:var(--accent);opacity:1}
.nx-vc-meta{display:flex;justify-content:space-between;gap:10px;margin-top:5px;font-size:12px;color:var(--text-muted)}
.nx-vc-time{flex:none;font-variant-numeric:tabular-nums;color:var(--text-secondary)}
.nx-vc-who{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
html[data-theme] #invite-modal .modal-body{display:flex;flex-direction:column;align-items:center;gap:6px;padding:8px 22px 6px;text-align:center}
.inv-ico{display:flex;align-items:center;justify-content:center;width:60px;height:60px;border-radius:50%;background:rgba(var(--nx-a2-rgb),.16);color:var(--accent-light)}
.inv-title{margin-top:6px;font-size:18px;font-weight:600;color:var(--text-primary)}
.inv-text{margin:0 0 8px;font-size:13.5px;color:var(--text-secondary)}
html[data-theme] #invite-modal .invite-link-box{display:flex;width:100%;gap:8px;padding:6px;border:1px solid var(--b1);border-radius:14px;background:var(--bg-input);transition:border-color .2s,background .2s}
html[data-theme] #invite-modal .invite-link-box.copied{border-color:var(--success);background:rgba(61,220,132,.08)}
html[data-theme] #invite-link{flex:1;min-width:0;border:0;background:transparent;color:var(--text-primary);font-size:13.5px;text-overflow:ellipsis;cursor:pointer;box-shadow:none}
html[data-theme] #invite-copy{flex:none;min-width:112px;padding:9px 14px;border-radius:10px;box-shadow:none}
.inv-hint{font-size:12px;color:var(--text-muted)}

/* ===== v7: общий блок вложений, настройки группы, приватность, заявки ===== */
.nx-shared{margin:14px 0 6px}
.nx-sh-tabs{display:flex;gap:2px;padding:3px;border-radius:12px;background:var(--bg-panel)}
.nx-sh-tab{flex:1;min-width:0;padding:8px 4px;border:0;border-radius:9px;background:transparent;color:var(--text-secondary);font-size:13px;font-weight:500;cursor:pointer;transition:background .15s,color .15s;white-space:nowrap}
.nx-sh-tab:hover{color:var(--text-primary)}
.nx-sh-tab.active{background:var(--bg-hover);color:var(--text-primary)}
.nx-sh-panel{margin-top:10px}
.nx-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:3px}
.nx-cell{position:relative;aspect-ratio:1;overflow:hidden;border-radius:6px;background:var(--bg-panel);cursor:pointer}
.nx-cell img,.nx-cell video{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none;transition:transform .25s}
.nx-cell:hover img,.nx-cell:hover video{transform:scale(1.05)}
html[data-theme] .info-tabs{overflow:visible}
html[data-theme] .info-tab{flex:1}
html[data-theme] #user-modal .pf-tabs{overflow-x:visible}
html[data-theme] #user-modal .pf-tab{flex:1;padding:10px 4px;font-size:13.5px}
html[data-theme] #user-modal #pf-body{padding-top:10px}
.nx-req{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:10px}
.nx-req .avatar{width:40px;height:40px;flex:none}
.nx-req-name{flex:1;min-width:0;font-size:14.5px;font-weight:500;color:var(--text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nx-req-name small{display:block;font-size:12.5px;font-weight:400;color:var(--text-muted)}
.nx-req-yes,.nx-req-no{display:flex;align-items:center;justify-content:center;flex:none;width:34px;height:34px;border:0;border-radius:50%;cursor:pointer;transition:filter .15s,background .15s}
.nx-req-yes{background:var(--accent);color:#fff}.nx-req-yes:hover{filter:brightness(1.12)}
.nx-req-no{background:var(--bg-hover);color:var(--text-secondary)}.nx-req-no:hover{color:var(--danger)}
html[data-theme] #info-modal .gs-select .form-input{flex:none;width:auto;min-width:120px;padding:7px 10px;border-radius:10px}
html[data-theme] #info-modal .member-pick{border-radius:12px}
.nx-priv-list{display:flex;flex-direction:column}
.nx-priv-row{display:flex;align-items:center;gap:12px;width:100%;padding:12px 2px;border:0;border-top:1px solid var(--b1);background:transparent;color:var(--text-secondary);text-align:left;cursor:pointer}
.nx-priv-row:first-child{border-top:0}
.nx-priv-row:hover{color:var(--text-primary)}
.nx-priv-t{flex:1;min-width:0}
.nx-priv-t b{display:block;font-size:14.5px;font-weight:500;color:var(--text-primary)}
.nx-priv-t small{display:block;margin-top:2px;font-size:12.5px;color:var(--accent-light)}
.nxp-body{padding:4px 14px 8px;overflow-y:auto;scrollbar-width:none}
.nxp-body::-webkit-scrollbar{display:none}
.nxp-modes{display:flex;flex-direction:column;border-radius:12px;background:var(--bg-panel);overflow:hidden}
.nxp-mode{display:flex;align-items:center;gap:14px;padding:12px 14px;cursor:pointer;transition:background .15s}
.nxp-mode+.nxp-mode{border-top:1px solid var(--b1)}
.nxp-mode:hover{background:var(--bg-hover)}
.nxp-radio{display:flex;align-items:center;justify-content:center;flex:none;width:20px;height:20px;border:2px solid var(--text-muted);border-radius:50%;transition:border-color .15s}
.nxp-mode.on .nxp-radio{border-color:var(--accent)}
.nxp-mode.on .nxp-radio::after{content:"";width:10px;height:10px;border-radius:50%;background:var(--accent)}
.nxp-t b{display:block;font-size:14.5px;font-weight:500;color:var(--text-primary)}
.nxp-t small{display:block;margin-top:2px;font-size:12.5px;color:var(--text-muted)}
.nxp-cap{margin:16px 4px 6px;font-size:13px;font-weight:600;color:var(--accent-light)}
.nxp-ex{display:flex;align-items:center;gap:12px;width:100%;margin-bottom:6px;padding:12px 14px;border:0;border-radius:12px;background:var(--bg-panel);color:var(--text-secondary);text-align:left;cursor:pointer}
.nxp-ex:hover{background:var(--bg-hover)}
.nxp-ex .nxp-t{flex:1}
.nxp-note{margin:8px 4px 4px;font-size:12.5px;color:var(--text-muted)}
.nx-nofwd .msg-text{user-select:none;-webkit-user-select:none}
.nx-vc{background:var(--bg-panel);border:1px solid var(--b1)}

.msg-fwd-link{cursor:pointer;text-decoration:underline;text-underline-offset:2px}
.nx-saved #btn-mobile-back{display:none!important}
.ctx-item[data-action="delete-me"],.ctx-item[data-action="delete-all"]{color:#ff5a5a}
.ctx-item[data-action="delete-me"] svg,.ctx-item[data-action="delete-all"] svg{stroke:#ff5a5a}

/* v84: мини-окно звонка */
.call-mini{width:320px;border-radius:20px;overflow:hidden;box-shadow:0 18px 50px rgba(0,0,0,.45),0 0 0 1px rgba(255,255,255,.07);-webkit-backdrop-filter:blur(18px) saturate(1.3);backdrop-filter:blur(18px) saturate(1.3)}
@media(max-width:700px){.call-mini{width:auto}}
.call-mini-header{cursor:grab;padding:12px 14px}
.call-mini-title{font-size:14px;font-weight:700;letter-spacing:.1px}
.call-mini-status{font-size:11.5px;opacity:.8}
.call-mini-controls{display:flex;gap:8px;padding:10px 12px 12px;justify-content:space-between}
.call-mini-btn{flex:1 1 0;width:auto;max-width:60px;height:40px;border-radius:14px;transition:transform .15s,background .15s,box-shadow .15s}
.call-mini-btn svg{width:19px;height:19px;pointer-events:none}
.call-mini-btn .sl{display:none}
.call-mini-btn.off .sl{display:block}
.call-mini-btn:hover{transform:translateY(-2px)}
.call-mini-btn:active{transform:scale(.94)}
.call-mini-btn.active{background:linear-gradient(135deg,#3ddc84,#1fae63);color:#fff;box-shadow:0 0 14px rgba(61,220,132,.45)}
.call-mini-btn.call-mini-end{max-width:64px;background:linear-gradient(135deg,#ff6b6b,#e04848);box-shadow:0 4px 12px rgba(224,72,72,.4)}

/* ===== камера (веб) ===== */
/* nx-noshare больше не скрывает кнопку демонстрации */
.nxc-ov { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.nxc { width: min(440px, 100%); max-height: 92dvh; overflow: auto; background: var(--bg-panel, #17212b); color: var(--text-primary, #fff); border: 1px solid var(--b2, rgba(255,255,255,.1)); border-radius: 20px; padding: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.nxc-h { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.nxc-v { position: relative; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; background: #000; }
.nxc-v video { width: 100%; height: 100%; object-fit: cover; display: block; }
.nxc-v video.mir { transform: scaleX(-1); }
.nxc-e { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 14px; font-size: 13px; color: #fca5a5; }
.nxc-l { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.nxc-i { text-align: left; padding: 10px 12px; border-radius: 12px; font-size: 13px; color: var(--text-secondary, #aab); background: rgba(128,128,128,.1); border: 1px solid transparent; }
.nxc-i.on { border-color: var(--accent); color: var(--text-primary, #fff); background: rgba(var(--nx-a2-rgb), .16); }
.nxc-a { display: flex; gap: 10px; margin-top: 14px; }
.nxc-b { flex: 1; padding: 12px; border-radius: 12px; font-weight: 600; font-size: 14px; background: rgba(128,128,128,.15); color: inherit; }
.nxc-go { background: linear-gradient(135deg, var(--accent), var(--accent-light)); color: #fff; }
.nxc-go:disabled { opacity: .45; }
/* ===== настройки: иконки-плитки и выход в углу ===== */
html body .settings-window .settings-sidebar { position: relative; padding-bottom: 66px; }
html body .settings-window .settings-nav-item { gap: 12px; padding: 9px 12px; border-radius: 14px; font-size: 14px; font-weight: 600; transform: none; }
html body .settings-window .settings-nav-item .sni-icon, html body .settings-window .settings-nav-out .sni-icon { width: 32px; height: 32px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-light)); box-shadow: 0 2px 8px rgba(var(--nx-a2-rgb), .35), inset 0 0 0 1px rgba(255,255,255,.18); color: #fff; font-size: 0; transform: none !important; transition: box-shadow .2s, filter .2s; }
html body .settings-window .sni-icon svg { width: 17px; height: 17px; fill: none; stroke: #fff; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
html body .settings-window .settings-nav-item:hover .sni-icon { filter: brightness(1.12); }
html body .settings-window .settings-nav-item.active { background: rgba(var(--nx-a2-rgb), .16); color: var(--text-primary); }
html body .settings-window .settings-nav-item.active .sni-icon { box-shadow: 0 0 0 2px var(--bg-sidebar, #111), 0 0 0 4px var(--accent), 0 4px 12px rgba(var(--nx-a2-rgb), .45); }
html body .settings-window .s-navsep { display: none; }
html body .settings-window .settings-nav-out { position: absolute; left: 14px; bottom: 14px; width: auto; gap: 9px; padding: 6px 16px 6px 6px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #ef4444; background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.32); transition: background .2s, transform .15s; }
html body .settings-window .settings-nav-out:hover { background: rgba(239,68,68,.2); transform: translateY(-1px); }
html body .settings-window .settings-nav-out .sni-icon { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #ff6b6b, #e04848); box-shadow: 0 2px 8px rgba(224,72,72,.4); }
html body .settings-window .s-card { border-radius: 16px; border: 1px solid var(--b2, rgba(128,128,128,.18)); box-shadow: 0 2px 14px rgba(0,0,0,.08); }
@media (max-width: 720px) {
  html body .settings-window .settings-sidebar { padding-bottom: 0; }
  html body .settings-window .settings-nav-item { padding: 8px 12px; font-size: 12px; flex-direction: column; gap: 5px; }
  html body .settings-window .settings-nav-out { top: calc(12px + env(safe-area-inset-top, 0px)); right: 56px; left: auto; bottom: auto; padding: 4px; }
  html body .settings-window .settings-nav-out span:last-child { display: none; }
}

/* ===== мобильная версия ===== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { overscroll-behavior-y: none; }
@supports (height: 100dvh) { .app-screen { height: 100dvh; } .screen-viewer:-webkit-full-screen video { height: 100dvh; } }
.call-btn.nxc-flip { display: none; }
.call-btn.nxc-flip.show { display: flex; }
@media (pointer: coarse) {
  .app-screen { height: var(--vvh, 100dvh); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); box-sizing: border-box; }
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]), textarea, select, .composer-input, .form-input, .search-input { font-size: 16px !important; }
  .call-mini-btn { width: 44px; height: 44px; max-width: none; }
  .call-topbar-min { width: 44px; height: 44px; }
  .icon-btn { min-width: 42px; min-height: 42px; }
  .msg { -webkit-touch-callout: none; }
}
.nx-hint { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 99990; display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--bg-panel, #17212b); color: var(--text-primary, #fff); border: 1px solid var(--b2, rgba(255,255,255,.12)); box-shadow: 0 10px 30px rgba(0,0,0,.45); font-size: 13px; line-height: 1.4; }
.nx-hint button { flex: none; padding: 8px 14px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 600; }

/* ===== прокрутка на телефоне ===== */
@media (max-width: 720px) {
  html body .app-screen { grid-template-rows: minmax(0, 1fr) !important; }
  html body .sidebar { min-height: 0; overflow: hidden; }
  html body .chat-area { min-height: 0; }
  html body .contacts-list { min-height: 0; flex: 1 1 auto; overflow-y: auto !important; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  html body .settings-window { width: 100vw !important; height: var(--vvh, 100dvh) !important; max-width: none !important; max-height: none !important; border-radius: 0 !important; flex-direction: column !important; }
  html body .settings-window .settings-sidebar { width: 100% !important; flex: none; overflow: visible !important; }
  html body .settings-window .settings-nav { flex-direction: row !important; flex: none; overflow-x: auto !important; overflow-y: hidden !important; -webkit-overflow-scrolling: touch; touch-action: pan-x; padding: 8px 12px !important; gap: 6px !important; scrollbar-width: none; }
  html body .settings-window .settings-nav::-webkit-scrollbar { display: none; }
  html body .settings-window .settings-nav-item { flex: none !important; white-space: nowrap; }
  html body .settings-window .settings-content { flex: 1 1 auto; min-height: 0; overflow-y: auto !important; -webkit-overflow-scrolling: touch; touch-action: pan-y; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
}
@media (pointer: coarse) { .contact:active { background: rgba(var(--nx-a2-rgb), .14); } }

/* ===== список чатов: реальный контейнер прокрутки — .nx-scroll ===== */
@media (max-width: 720px) {
  html body .sidebar { display: flex; flex-direction: column; min-height: 0; }
  html body .nx-body { flex: 1 1 auto; min-height: 0; display: flex; overflow: hidden; }
  html body .nx-main { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
  html body .nx-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto !important; overflow-x: hidden; -webkit-overflow-scrolling: touch; touch-action: pan-y; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  html body .contacts-list { flex: none !important; overflow: visible !important; overscroll-behavior: auto !important; touch-action: auto !important; padding-bottom: 0 !important; }
}

@media (hover: none) and (pointer: coarse) {
  html.nx-noshare #call-toggle-share, html.nx-noshare #call-mini-share { display: flex !important; }
  #call-toggle-share, #call-toggle-cam, #call-toggle-mic, #call-toggle-headphones, #call-end { display: flex !important; }
  .call-controls { flex-wrap: wrap; justify-content: center; }
  .call-controls .call-btn { flex: 0 0 auto; }
}

#call-toggle-share, #call-mini-share { display: flex !important; visibility: visible !important; opacity: 1 !important; }
@media (max-width: 400px) {
  .call-controls { gap: 8px !important; padding-left: 8px !important; padding-right: 8px !important; }
  .call-controls .call-btn { width: 46px !important; height: 46px !important; }
  .call-mini-btn { max-width: 44px !important; }
}

/* v111: кнопки настроек в стиле плиток профиля */
html[data-theme] .settings-window :is(.btn-primary,.btn-secondary,.btn-danger){background:var(--bg-panel)!important;background-image:none!important;color:var(--text-primary)!important;border:0!important;border-radius:12px!important;box-shadow:none!important;transform:none!important;min-height:44px;padding:11px 18px;font-size:13px;font-weight:500;line-height:1.2;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:background .15s}
html[data-theme] .settings-window :is(.btn-primary,.btn-secondary,.btn-danger):hover{background:var(--bg-hover)!important;filter:none!important}
html[data-theme] .settings-window :is(.btn-primary,.btn-secondary,.btn-danger):active{opacity:.85}
html[data-theme] .settings-window .btn-primary{color:var(--accent-light)!important;font-weight:600}
html[data-theme] .settings-window .btn-danger{color:var(--danger)!important}
html[data-theme] .settings-window :is(.btn-primary,.btn-secondary,.btn-danger):disabled{opacity:.45;cursor:not-allowed}

/* v112: облегчение для телефонов */
@media (max-width:900px){
  .blob,.auth-grid{display:none!important;animation:none!important}
  .modal-backdrop{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
  .messages,.message-list,.chat-list,.sidebar-list{-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
}
@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* v113: форма входа видна сразу, без анимации появления */
.auth-logo,.auth-tabs,.auth-form,.form-group,.auth-form>*{animation:none!important;opacity:1!important;transform:none!important}
.auth-card{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
html.nx-tok #auth-screen:not(.hidden) .auth-card{visibility:hidden}
html.nx-tok #auth-screen:not(.hidden)::after{content:'Nexus';position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font:700 34px/1 system-ui,-apple-system,sans-serif;color:#fff;letter-spacing:.5px;z-index:2}

/* ===== mobile v2: тонкая строка ввода, без лишней высоты ===== */
@media (max-width: 720px) {
  html .composer { padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)) 8px !important; gap: 2px !important; align-items: flex-end; }
  html.kb-open .composer { padding-bottom: 6px !important; }
  html .composer .composer-btn, html .composer .composer-send, html .composer .composer-mic { width: 36px !important; height: 36px !important; flex: 0 0 36px; font-size: 17px; }
  html .composer .composer-btn svg, html .composer .composer-mic svg { width: 21px; height: 21px; }
  html .composer .composer-input { min-width: 0; box-sizing: border-box; height: 38px; min-height: 38px !important; padding: 8px 12px !important; line-height: 22px !important; font-size: 16px !important; border-radius: 19px !important; }
  .composer-input::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .messages { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .msg-bubble { max-width: 88%; overflow-wrap: anywhere; }
}

/* голосовые: зажать = запись, вверх = замок */
#btn-mic { touch-action: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.rec-lock { display: none; position: absolute; right: 8px; bottom: calc(100% + 6px); width: 44px; height: 84px; border-radius: 22px; background: var(--bg-panel, #1c2733); box-shadow: 0 6px 20px rgba(0,0,0,.35); flex-direction: column; align-items: center; justify-content: space-around; font-size: 18px; color: var(--text-secondary); z-index: 5; }
.rec-lock i { font-style: normal; font-size: 15px; opacity: .75; animation: recLockUp 1s ease-in-out infinite; }
@keyframes recLockUp { 0%, 100% { transform: translateY(3px); } 50% { transform: translateY(-3px); } }
.rec-hint { display: none; flex: none; font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.composer.recording.vr-hold .rec-lock { display: flex; }
.composer.recording.vr-hold .rec-hint { display: block; }
.composer.recording.vr-hold .rec-cancel, .composer.recording.vr-hold .rec-stop { display: none; }

/* при записи текст не выделяется */
html.vr-active, html.vr-active * { -webkit-user-select: none !important; user-select: none !important; -webkit-touch-callout: none !important; }
/* mobile v3: компактная строка ввода (убираем поля/отступы скина) */
@media (max-width: 720px) {
  html[data-theme] .composer, html[data-theme] .composer.recording { margin: 0 6px calc(6px + env(safe-area-inset-bottom, 0px)) !important; padding: 3px 4px !important; gap: 0 !important; border-radius: 22px !important; min-height: 0 !important; }
  html.kb-open[data-theme] .composer, html.kb-open[data-theme] .composer.recording { margin-bottom: 4px !important; }
  html[data-theme] .composer .composer-input { min-height: 34px !important; height: 34px; padding: 6px 6px !important; line-height: 22px !important; border-radius: 0 !important; }
  html[data-theme] .composer > button:not(.composer-send):not(.display-mode-btn):not(.rec-cancel):not(.rec-stop), html[data-theme] .composer .composer-send { width: 34px !important; height: 34px !important; flex: 0 0 34px; }
  html[data-theme] .composer > button svg { width: 20px; height: 20px; }
  html[data-theme] .composer .rec-cancel, html[data-theme] .composer .rec-stop { width: 34px !important; height: 34px !important; }
}

/* v100: история без скачков, строка ввода ниже */
.messages { overflow-anchor: none; }
@media (max-width: 720px) {
  html[data-theme] .composer, html[data-theme] .composer.recording { margin-bottom: calc(env(safe-area-inset-bottom, 0px) * .4 + 2px) !important; }
  html.kb-open[data-theme] .composer, html.kb-open[data-theme] .composer.recording { margin-bottom: 2px !important; }
}

/* список чатов: строки вне экрана не рендерятся (высота запоминается после первого показа) */
#contacts-list .contact{content-visibility:auto;contain-intrinsic-size:auto 68px}
