/* ==================== نظام التصميم الفائق V12 Signature (Obsidian OLED — Zero Lag 60fps) ==================== */
:root, [data-font="tajawal"] { --font-family: 'Tajawal', system-ui, -apple-system, sans-serif; }
[data-font="ibm"] { --font-family: 'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif; }
[data-font="readex"] { --font-family: 'Readex Pro', system-ui, -apple-system, sans-serif; }
[data-font="cairo"] { --font-family: 'Cairo', system-ui, -apple-system, sans-serif; }

:root, [data-fsize="md"] { --msg-fs: 14.5px; }
[data-fsize="sm"] { --msg-fs: 13px; }
[data-fsize="lg"] { --msg-fs: 16.5px; }

/* ==================== 5 ثيمات مصقولة بدقة (الافتراضي: Obsidian Signature) ==================== */
:root, [data-theme="midnight"] {
    --bg-main: #06080e;
    --bg-panel: #0c1018;
    --bg-glass: #101622;
    --bg-card: #151c2c;
    --bg-hover: #1d273b;
    --glass-inner: #090d14;
    --border: rgba(226, 232, 240, 0.085);
    --border-bright: rgba(148, 197, 255, 0.22);
    --spec-top: inset 0 1px 0 rgba(255, 255, 255, 0.09);
    --primary: #0ea5e9;
    --primary-grad: linear-gradient(135deg, #0ea5e9, #2563eb);
    --bubble-me: linear-gradient(135deg, #0284c7, #2563eb);
    --bubble-other: #141b29;
    --accent: #38bdf8;
    --success: #10b981;
    --danger: #f43f5e;
    --warning: #f59e0b;
    --text: #f8fafc;
    --text-dim: #8b9bb4;
    --pattern-dot: rgba(148, 197, 255, 0.065);
    --glow: rgba(14, 165, 233, 0.28);
    --aura-1: rgba(14, 165, 233, 0.09);
    --aura-2: rgba(99, 102, 241, 0.07);
}

[data-theme="obsidian"] {
    --bg-main: #050509;
    --bg-panel: #0b0b13;
    --bg-glass: #11101d;
    --bg-card: #181728;
    --bg-hover: #222038;
    --glass-inner: #08080f;
    --border: rgba(196, 181, 253, 0.11);
    --border-bright: rgba(167, 139, 250, 0.28);
    --spec-top: inset 0 1px 0 rgba(255, 255, 255, 0.09);
    --primary: #8b5cf6;
    --primary-grad: linear-gradient(135deg, #7c3aed, #4f46e5);
    --bubble-me: linear-gradient(135deg, #6d28d9, #4338ca);
    --bubble-other: #161524;
    --accent: #a78bfa;
    --success: #10b981;
    --danger: #fb7185;
    --warning: #fbbf24;
    --text: #ffffff;
    --text-dim: #9ca3af;
    --pattern-dot: rgba(167, 139, 250, 0.075);
    --glow: rgba(139, 92, 246, 0.28);
    --aura-1: rgba(139, 92, 246, 0.11);
    --aura-2: rgba(59, 130, 246, 0.07);
}

[data-theme="emerald"] {
    --bg-main: #040d0a;
    --bg-panel: #081712;
    --bg-glass: #0d211a;
    --bg-card: #122b23;
    --bg-hover: #193a2f;
    --glass-inner: #06120e;
    --border: rgba(110, 231, 183, 0.11);
    --border-bright: rgba(52, 211, 153, 0.28);
    --spec-top: inset 0 1px 0 rgba(255, 255, 255, 0.09);
    --primary: #10b981;
    --primary-grad: linear-gradient(135deg, #059669, #10b981);
    --bubble-me: linear-gradient(135deg, #047857, #0d9488);
    --bubble-other: #10241e;
    --accent: #34d399;
    --success: #34d399;
    --danger: #f43f5e;
    --warning: #fbbf24;
    --text: #ecfdf5;
    --text-dim: #8bb9aa;
    --pattern-dot: rgba(52, 211, 153, 0.075);
    --glow: rgba(16, 185, 129, 0.26);
    --aura-1: rgba(16, 185, 129, 0.10);
    --aura-2: rgba(14, 165, 233, 0.07);
}

[data-theme="amethyst"] {
    --bg-main: #09050e;
    --bg-panel: #130b1d;
    --bg-glass: #1a1028;
    --bg-card: #221534;
    --bg-hover: #2e1d46;
    --glass-inner: #0e0716;
    --border: rgba(244, 114, 182, 0.13);
    --border-bright: rgba(232, 121, 249, 0.30);
    --spec-top: inset 0 1px 0 rgba(255, 255, 255, 0.09);
    --primary: #d946ef;
    --primary-grad: linear-gradient(135deg, #c026d3, #7c3aed);
    --bubble-me: linear-gradient(135deg, #9d4edd, #7b2cbf);
    --bubble-other: #1c1328;
    --accent: #e879f9;
    --success: #10b981;
    --danger: #fb7185;
    --warning: #fbbf24;
    --text: #fdf4ff;
    --text-dim: #b99ec9;
    --pattern-dot: rgba(232, 121, 249, 0.075);
    --glow: rgba(217, 70, 239, 0.28);
    --aura-1: rgba(217, 70, 239, 0.11);
    --aura-2: rgba(244, 114, 182, 0.08);
}

[data-theme="amber"] {
    --bg-main: #080705;
    --bg-panel: #13100b;
    --bg-glass: #1a1610;
    --bg-card: #231d15;
    --bg-hover: #30271b;
    --glass-inner: #0d0b07;
    --border: rgba(251, 191, 36, 0.13);
    --border-bright: rgba(251, 191, 36, 0.30);
    --spec-top: inset 0 1px 0 rgba(255, 255, 255, 0.09);
    --primary: #eab308;
    --primary-grad: linear-gradient(135deg, #ca8a04, #f59e0b);
    --bubble-me: linear-gradient(135deg, #92400e, #b45309);
    --bubble-other: #1e1810;
    --accent: #fbbf24;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --text: #fefce8;
    --text-dim: #b8aa91;
    --pattern-dot: rgba(251, 191, 36, 0.075);
    --glow: rgba(245, 158, 11, 0.28);
    --aura-1: rgba(245, 158, 11, 0.10);
    --aura-2: rgba(234, 88, 12, 0.07);
}

/* ==================== الأساسيات ونظام أيقونات SVG الموحّد ==================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--bg-main);
    background-image:
        radial-gradient(circle at 12% 10%, var(--aura-1), transparent 40%),
        radial-gradient(circle at 88% 88%, var(--aura-2), transparent 42%);
    color: var(--text);
    height: 100dvh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

.ic, .ic-sm, .ic-xs {
    fill: none !important;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    display: block;
}
.ic { width: 20px; height: 20px; stroke-width: 1.85; }
.ic-sm { width: 17px; height: 17px; stroke-width: 1.9; }
.ic-xs { width: 14px; height: 14px; stroke-width: 2.1; }

/* شاشة البداية الفخمة (Splash V12) */
#splashScreen {
    position: fixed; inset: 0; z-index: 10000;
    background: radial-gradient(circle at 50% 42%, var(--bg-card) 0%, var(--bg-main) 68%);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    transition: opacity 0.24s ease;
}
#splashScreen.hide { opacity: 0; pointer-events: none; }
.splash-logo {
    width: 74px; height: 74px; border-radius: 24px;
    background: var(--primary-grad);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 12px 32px var(--glow), var(--spec-top);
}
.splash-logo svg { width: 34px; height: 34px; }
.splash-title { font-size: 17.5px; font-weight: 800; letter-spacing: 0.2px; }
.splash-bar { width: 104px; height: 3.5px; border-radius: 99px; background: rgba(255,255,255,0.1); overflow: hidden; }
.splash-bar i { display: block; height: 100%; width: 52%; border-radius: 99px; background: var(--primary-grad); animation: splashSlide 0.72s ease-in-out infinite; }
@keyframes splashSlide { 0% { transform: translateX(145%); } 100% { transform: translateX(-145%); } }

::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.13); border-radius: 10px; }

/* ==================== انيميشنات 60fps نظيفة (Transform + Opacity فقط) ==================== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes tabSlideIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popMorph { from { opacity: 0; transform: scale(0.78); } to { opacity: 1; transform: scale(1); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes shimmer { 0% { opacity: 0.32; } 50% { opacity: 0.72; } 100% { opacity: 0.32; } }
@keyframes typingBounce { 0%, 80%, 100% { transform: translateY(0); opacity: 0.45; } 40% { transform: translateY(-4px); opacity: 1; } }
@keyframes sparkBurst { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(0.2); } }
@keyframes heartPop { 0% { opacity: 0; transform: translate(-50%,-50%) scale(0.4); } 35% { opacity: 1; transform: translate(-50%,-50%) scale(1.22); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.4); } }
@keyframes wavePulse { 0%, 100% { height: 6px; } 50% { height: 20px; } }
@keyframes callPulse { 0% { box-shadow: 0 0 0 0 var(--glow); } 70% { box-shadow: 0 0 0 22px rgba(56, 189, 248, 0); } 100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); } }

.spark-dot { position: fixed; width: 6px; height: 6px; border-radius: 50%; pointer-events: none; z-index: 9800; animation: sparkBurst 0.48s ease-out forwards; }
.stagger-grid > * { animation: tabSlideIn 0.2s ease both; }

/* ==================== التنبيهات والشارات ==================== */
#toastBox {
    position: fixed; top: 14px; left: 50%;
    transform: translateX(-50%) translateY(-130px);
    background: var(--bg-glass); border: 1px solid var(--border-bright);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.62), var(--spec-top);
    color: #fff; padding: 9px 18px; border-radius: 99px;
    font-size: 13px; font-weight: 700; z-index: 9999;
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none; text-align: center; max-width: 90%;
}
#toastBox.show { transform: translateX(-50%) translateY(0); }

#netBanner {
    display: none; position: fixed; top: 0; left: 0; right: 0;
    background: linear-gradient(90deg, #b45309, #d97706);
    color: #fff; font-size: 12px; font-weight: 700; text-align: center; padding: 5px 12px; z-index: 9990;
}
#netBanner.show { display: block; }

.handle-ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; font-size: 13px; color: var(--accent); font-weight: 700; }
.v-badge { display: inline-flex; align-items: center; vertical-align: middle; margin-right: 3px; flex-shrink: 0; }
.v-badge svg { width: 15px; height: 15px; }
.dev-pill {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 9.5px; font-weight: 800; padding: 2px 7px; border-radius: 99px;
    background: linear-gradient(135deg, #f59e0b, #fde047); color: #0f172a; margin-right: 4px; flex-shrink: 0;
}
.grad-name {
    background: linear-gradient(90deg, #fde047, #38bdf8, #e879f9);
    -webkit-background-clip: text; background-clip: text; color: transparent !important;
}
.notif-dot {
    display: none; position: absolute; top: 6px; right: 6px;
    width: 8px; height: 8px; border-radius: 50%; background: var(--danger); border: 2px solid var(--bg-panel);
}
.notif-dot.on { display: block; }
.greeting-sub { font-size: 11px; color: var(--accent); font-weight: 700; opacity: 0.92; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==================== الأزرار والحقول ==================== */
.btn {
    width: 100%; padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 14px;
    font-size: 14px; font-weight: 700; cursor: pointer;
    transition: transform 0.12s ease, filter 0.14s;
    color: #fff; background: var(--primary-grad); box-shadow: var(--spec-top);
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.btn:active { transform: scale(0.96); }
.btn-lg { padding: 12px 18px; border-radius: 15px; font-size: 15px; }
.btn-outline { background: var(--bg-card); border: 1px solid var(--border); color: var(--text); box-shadow: none; }
.btn-danger { background: linear-gradient(135deg, #dc2626, #f43f5e); }
.btn-success { background: linear-gradient(135deg, #059669, #10b981); }
.btn-gold { background: linear-gradient(135deg, #ca8a04, #fbbf24); color: #111; }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 11px; width: auto; }

.input, textarea.input, select.input {
    width: 100%; padding: 11px 14px; border-radius: 13px;
    border: 1px solid var(--border); background: var(--glass-inner);
    color: var(--text); font-size: 14px; outline: none;
    transition: border-color 0.15s;
}
.input:focus { border-color: var(--accent); }

.icon-btn {
    width: 36px; height: 36px; border-radius: 12px;
    border: 1px solid var(--border); background: var(--bg-card); color: var(--text);
    box-shadow: var(--spec-top); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: transform 0.12s ease, background 0.14s;
}
.icon-btn:active { transform: scale(0.9); }
.icon-btn.danger { background: rgba(244, 63, 94, 0.14); border-color: rgba(244, 63, 94, 0.28); color: #fb7185; }
.icon-btn.accent { background: var(--primary-grad); border-color: transparent; color: #fff; }
.icon-btn.ai-glow-btn {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(139, 92, 246, 0.26));
    border-color: rgba(167, 139, 250, 0.36); color: #c4b5fd;
}
.morph-btn { animation: popMorph 0.18s ease; }

/* ==================== البوابة الفخمة ونقاط الرمز ==================== */
.center-screen { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; padding: 16px; position: relative; z-index: 2; }
.glass-card {
    width: 100%; max-width: 405px;
    background: var(--bg-glass);
    border: 1px solid var(--border-bright); border-radius: 26px; padding: 26px 22px;
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.68), var(--spec-top); text-align: center;
    max-height: 92dvh; overflow-y: auto;
}
.brand-icon {
    width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 20px;
    background: var(--primary-grad); display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 26px var(--glow), var(--spec-top);
}
.brand-icon svg { width: 28px; height: 28px; }
.glass-card h2 { font-size: 20px; font-weight: 800; margin-bottom: 5px; }
.glass-card .sub { font-size: 13px; color: var(--text-dim); margin-bottom: 16px; line-height: 1.5; }

.pin-dots {
    display: flex; justify-content: center; gap: 11px; margin: 4px 0 14px;
}
.pin-dots i {
    width: 11px; height: 11px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.12); border: 1.5px solid var(--border-bright);
    transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.pin-dots i.filled {
    background: var(--accent); border-color: var(--accent);
    transform: scale(1.22); box-shadow: 0 0 10px var(--glow);
}

.pin-field { text-align: center; letter-spacing: 6px; font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.err-text { color: #fb7185; font-size: 12.5px; margin-top: 10px; min-height: 18px; font-weight: 700; }
.tabs { display: flex; background: var(--glass-inner); padding: 4px; border-radius: 14px; margin-bottom: 14px; border: 1px solid var(--border); }
.tab-btn { flex: 1; padding: 8px; border: none; background: transparent; color: var(--text-dim); font-weight: 700; font-size: 13px; border-radius: 10px; cursor: pointer; }
.tab-btn.active { background: var(--primary-grad); color: #fff; }
.form-group { text-align: right; margin-bottom: 11px; }
.form-group label { font-size: 12px; color: var(--text-dim); display: block; margin-bottom: 5px; padding-right: 4px; font-weight: 600; }

/* ==================== شاشة التمويه الحقيقية ==================== */
#decoyStudyScreen { width: 100%; height: 100dvh; overflow-y: auto; position: relative; z-index: 2; background: linear-gradient(180deg, #0b1324 0%, #06080e 100%); padding: 16px; }
.decoy-wrap { max-width: 640px; margin: 0 auto; }
.decoy-header { display: flex; justify-content: space-between; align-items: center; background: var(--bg-panel); border: 1px solid var(--border-bright); border-radius: 20px; padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--spec-top); }
.decoy-header h3 { font-size: 17px; color: var(--accent); }
.decoy-header span { font-size: 12px; color: var(--text-dim); }
.decoy-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.decoy-tab { flex: 1; padding: 9px 6px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-dim); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.decoy-tab.active { background: var(--primary-grad); border-color: transparent; color: #fff; }
.decoy-pane { display: none; }
.decoy-pane.active { display: block; }
.decoy-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 16px; padding: 13px 15px; margin-bottom: 10px; line-height: 1.65; }
.decoy-card strong { display: block; color: var(--accent); font-size: 14px; margin-bottom: 4px; }
.decoy-card p { font-size: 13.5px; color: var(--text); }

/* ==================== الهيكل الرئيسي + الشريط السفلي المصقول ==================== */
#appShell {
    display: none; position: relative; z-index: 2;
    width: 100%; height: 100dvh; max-width: 1240px;
    background: var(--bg-panel); overflow: hidden; flex-direction: column;
}
@media (min-width: 860px) {
    #appShell {
        height: 95dvh; border-radius: 26px; border: 1px solid var(--border-bright);
        box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75), var(--spec-top); flex-direction: row;
    }
}

.nav-bar.floating-dock {
    display: flex; justify-content: space-around; align-items: center;
    background: var(--bg-glass);
    border: 1px solid var(--border); border-radius: 22px;
    margin: 5px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    padding: 5px 6px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.56), var(--spec-top);
    order: 2; flex-shrink: 0; z-index: 20;
}
@media (min-width: 860px) {
    .nav-bar.floating-dock {
        order: 0; flex-direction: column; justify-content: flex-start; gap: 10px;
        width: 78px; margin: 12px 10px 12px 0; border-radius: 22px; padding: 14px 6px;
    }
}
.nav-item {
    background: transparent; border: 1px solid transparent; color: var(--text-dim);
    cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 12px; border-radius: 16px; font-size: 10.5px; font-weight: 700;
    transition: transform 0.14s ease, background 0.16s ease, color 0.16s ease;
}
.nav-item:active { transform: scale(0.91); }
.nav-item .ic { width: 20px; height: 20px; transition: transform 0.16s ease; }
.nav-item.active {
    color: var(--accent);
    background: rgba(56, 189, 248, 0.13);
    border-color: rgba(56, 189, 248, 0.24);
    box-shadow: var(--spec-top);
}
.nav-item.active .ic { transform: translateY(-1px); }

.main-content { flex: 1; display: flex; overflow: hidden; position: relative; order: 1; }
.tab-view { display: none; width: 100%; height: 100%; }
.tab-view.active { display: flex; animation: tabSlideIn 0.16s ease; }

/* ==================== الشريط الجانبي والستوري ==================== */
.sidebar { width: 100%; height: 100%; display: flex; flex-direction: column; background: var(--bg-panel); border-left: 1px solid var(--border); }
@media (min-width: 860px) { .sidebar { width: 358px; flex-shrink: 0; } }

.top-bar {
    padding: 11px 14px; display: flex; align-items: center; justify-content: space-between;
    background: var(--bg-panel); border-bottom: 1px solid var(--border);
    gap: 8px; flex-shrink: 0;
}
.top-bar h3 { font-size: 17.5px; font-weight: 800; letter-spacing: -0.1px; display: flex; align-items: center; gap: 6px; }
.top-bar-acts { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.avatar {
    width: 46px; height: 46px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 17px; color: #fff; position: relative; flex-shrink: 0;
    background: var(--primary-grad); background-size: cover; background-position: center;
    border: 1.5px solid rgba(255, 255, 255, 0.14);
}
.avatar.sm { width: 38px; height: 38px; font-size: 14.5px; }
.avatar.lg { width: 86px; height: 86px; font-size: 30px; border: 3px solid var(--bg-panel); box-shadow: 0 6px 20px rgba(0,0,0,0.45); }

.avatar.av-frame-gold { border: 2.5px solid #fbbf24 !important; box-shadow: 0 0 11px rgba(251, 191, 36, 0.45); }
.avatar.av-frame-neon { border: 2.5px solid #22d3ee !important; box-shadow: 0 0 11px rgba(14, 165, 233, 0.48); }
.avatar.av-frame-galaxy { border: 2.5px solid #c084fc !important; box-shadow: 0 0 11px rgba(139, 92, 246, 0.48); }
.avatar.av-frame-rose { border: 2.5px solid #f472b6 !important; box-shadow: 0 0 11px rgba(236, 72, 153, 0.45); }

.online-badge { width: 11px; height: 11px; border-radius: 50%; background: var(--success); border: 2px solid var(--bg-panel); position: absolute; bottom: -1px; right: -1px; display: none; z-index: 3; }
.online-badge.on { display: block; }

.stories-strip { display: flex; gap: 12px; overflow-x: auto; padding: 10px 14px; border-bottom: 1px solid var(--border); flex-shrink: 0; align-items: center; }
.story-item { display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; min-width: 60px; text-align: center; }
.story-ring { padding: 2.5px; border-radius: 50%; position: relative; background: linear-gradient(135deg, #f59e0b, #ec4899, #8b5cf6); }
.story-ring.seen { background: rgba(255, 255, 255, 0.16); }
.story-ring.add-ring { background: rgba(255, 255, 255, 0.12); }
.story-plus { position: absolute; bottom: -2px; left: -2px; width: 20px; height: 20px; border-radius: 50%; background: var(--primary-grad); color: #fff; font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg-panel); }
.story-item span { font-size: 11px; color: var(--text-dim); max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

.search-wrap { padding: 9px 12px 5px; }
.search-box { display: flex; align-items: center; gap: 8px; background: var(--glass-inner); border: 1px solid var(--border); border-radius: 14px; padding: 0 12px; color: var(--text-dim); }
.search-box input { flex: 1; background: transparent; border: none; color: var(--text); padding: 9px 0; font-size: 13px; outline: none; min-width: 0; }
.vault-pill-btn { border: 1px solid rgba(251, 191, 36, 0.45); background: rgba(245, 158, 11, 0.18); color: #fde047; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 99px; cursor: pointer; white-space: nowrap; flex-shrink: 0; }

.chat-filter-bar { display: flex; gap: 6px; padding: 5px 12px 8px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.cf-pill { flex: 1; padding: 6px 8px; border-radius: 99px; border: 1px solid var(--border); background: var(--glass-inner); color: var(--text-dim); font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: 0.14s; }
.cf-pill.active { background: var(--primary-grad); border-color: transparent; color: #fff; }

.list-scroll { flex: 1; overflow-y: auto; padding: 6px 8px; -webkit-overflow-scrolling: touch; }
.chat-row {
    display: flex; align-items: center; gap: 12px; padding: 10px 11px; border-radius: 17px;
    cursor: pointer; margin-bottom: 2px; border: 1px solid transparent;
    contain: layout style; transition: background 0.12s;
}
.chat-row:hover { background: rgba(255, 255, 255, 0.035); }
.chat-row.active { background: var(--bg-card); border-color: var(--border-bright); }
.chat-row.vault-row { background: rgba(245, 158, 11, 0.08); border-color: rgba(251, 191, 36, 0.28); }
.chat-row-info { flex: 1; min-width: 0; }
.chat-row-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; gap: 6px; }
.chat-row-name { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-row-time { font-size: 11px; color: var(--text-dim); flex-shrink: 0; }
.chat-row-bottom { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.chat-row-preview { font-size: 12.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* ==================== غرفة المحادثة وتجميع الرسائل الذكي (V12 Signature) ==================== */
.chat-pane { flex: 1; height: 100%; display: flex; flex-direction: column; background: var(--bg-main); position: relative; }
@media (max-width: 859px) {
    .chat-pane {
        position: fixed; inset: 0; z-index: 40;
        transform: translate3d(-100%, 0, 0);
        transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
        will-change: transform;
    }
    .chat-pane.open { transform: translate3d(0, 0, 0); }
}
.empty-chat { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-dim); text-align: center; padding: 30px; }
#activeChatView { display: none; flex-direction: column; height: 100%; width: 100%; overflow: hidden; position: relative; }

.chat-header {
    position: relative; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 7px;
    background: var(--bg-panel); border-bottom: 1px solid var(--border); flex-shrink: 0; z-index: 25;
}
.pill-btn {
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-card);
    color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.back-mobile { display: inline-flex; }
@media (min-width: 860px) { .back-mobile { display: none; } }

.chat-partner-pill {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px;
    padding: 3px 6px; border-radius: 14px; cursor: pointer;
}
.partner-meta { min-width: 0; }
.partner-meta h4 { font-size: 14.5px; font-weight: 800; display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.partner-meta span { font-size: 11px; color: var(--text-dim); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-online { color: var(--success) !important; font-weight: 700; }
.status-typing { color: var(--accent) !important; font-weight: 700; }

.chat-actions-pill {
    display: flex; align-items: center; gap: 3px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 99px; padding: 3px 4px; flex-shrink: 0;
}
.pill-act {
    width: 32px; height: 32px; border-radius: 50%; border: none; background: transparent; color: var(--text);
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.pill-act:active { background: var(--bg-hover); }
.pill-act.danger { color: #fb7185; }

/* قائمة بروفايل الصديق المنسدلة */
#opMoreDropdown {
    display: none; position: absolute; top: calc(100% + 6px); left: 10px;
    background: var(--bg-glass); border: 1px solid var(--border-bright); border-radius: 18px; padding: 6px; width: 200px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.72), var(--spec-top); z-index: 60;
}
#opMoreDropdown.open { display: block; animation: fadeIn 0.14s ease; }

/* شبكة الأدوات والمرفقات السفلية (Native Action Grid Sheet V12) */
#chatToolsDropdown.open,
#mediaMenu.open,
#mediaMenu[style*="display: block"] {
    display: flex !important;
}
.action-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 8px; padding: 4px 2px 8px;
}
.ag-tile {
    background: transparent; border: none; color: var(--text); cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 700; text-align: center; padding: 4px 2px;
    transition: transform 0.12s ease;
}
.ag-tile:active { transform: scale(0.91); }
.ag-ic {
    width: 50px; height: 50px; border-radius: 17px; color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}
.ag-tile.danger-tile { color: #fda4af; }

#inChatSearchBar { display: none; align-items: center; gap: 8px; padding: 7px 12px; background: var(--bg-panel); border-bottom: 1px solid var(--border-bright); flex-shrink: 0; }
#inChatSearchBar.open { display: flex; }
#inChatSearchInp { flex: 1; background: var(--glass-inner); border: 1px solid var(--border); color: var(--text); padding: 7px 12px; border-radius: 99px; font-size: 13px; outline: none; }
#inChatSearchCount { font-size: 11.5px; color: var(--accent); font-weight: 800; white-space: nowrap; }
.msg-wrap.search-hit .msg-bubble { outline: 2px solid #fbbf24; }

#pinnedBar { display: none; background: var(--bg-card); padding: 6px 14px; border-bottom: 1px solid var(--border); align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; flex-shrink: 0; }
.pinned-content { border-right: 3px solid var(--accent); padding-right: 9px; min-width: 0; flex: 1; }
.pinned-content strong { color: var(--accent); font-size: 11px; display: block; }
.pinned-content span { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

#countdownBanner, #ytTogetherBar { display: none; }

.messages-area {
    flex: 1; overflow-y: auto; padding: 12px 10px; display: flex; flex-direction: column; gap: 8px;
    background-size: cover; background-position: center; contain: strict; -webkit-overflow-scrolling: touch;
}
[data-wp="pattern"] .messages-area {
    background-image: radial-gradient(var(--pattern-dot) 1.4px, transparent 1.4px);
    background-size: 24px 24px;
}
[data-wp="aurora"] .messages-area {
    background-image: radial-gradient(circle at 18% 18%, var(--glow), transparent 44%), radial-gradient(circle at 82% 82%, var(--glow), transparent 46%);
}
[data-wp="clean"] .messages-area { background-image: none; }

/* مؤشر تحميل الرسائل الأقدم تلقائياً عند التمرير للأعلى */
.history-loader {
    align-self: center; font-size: 11.5px; font-weight: 700; color: var(--accent);
    background: var(--bg-card); border: 1px solid var(--border);
    padding: 5px 14px; border-radius: 99px; margin: 4px 0 8px;
}

#scrollBottomBtn {
    display: none; position: absolute; bottom: 82px; left: 14px; z-index: 22;
    width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid var(--border-bright); background: var(--bg-glass); color: #fff;
    cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55); align-items: center; justify-content: center;
}
#scrollBottomBtn.show { display: flex; }
#scrollBottomCount { position: absolute; top: -7px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--primary-grad); color: #fff; font-size: 10.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg-main); }

.skel-list { display: flex; flex-direction: column; gap: 12px; padding: 14px 6px; width: 100%; margin: auto 0; }
.skel-bubble { height: 46px; border-radius: 18px; background: rgba(255, 255, 255, 0.07); animation: shimmer 1.2s infinite ease-in-out; }
.skel-bubble.me { align-self: flex-start; width: 62%; border-bottom-right-radius: 4px; }
.skel-bubble.other { align-self: flex-end; width: 54%; border-bottom-left-radius: 4px; }
.skel-bubble.tall { height: 74px; width: 70%; }

#typingBubbleWrap { display: none; padding: 4px 12px 6px; flex-shrink: 0; }
#typingBubbleWrap.show { display: flex; justify-content: flex-end; }
.typing-bubble { display: inline-flex; align-items: center; gap: 8px; background: var(--bubble-other); border: 1px solid var(--border-bright); padding: 6px 13px; border-radius: 18px; border-bottom-left-radius: 4px; font-size: 11.5px; color: var(--accent); font-weight: 700; }
.typing-dots { display: inline-flex; gap: 4px; align-items: center; }
.typing-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: typingBounce 1.1s infinite ease-in-out; }
.typing-dots i:nth-child(2) { animation-delay: 0.16s; }
.typing-dots i:nth-child(3) { animation-delay: 0.32s; }

.date-sep {
    align-self: center; background: rgba(16, 22, 34, 0.92); border: 1px solid var(--border);
    color: var(--text-dim); font-size: 11px; font-weight: 700; padding: 3px 12px; border-radius: 99px; margin: 8px 0 4px;
}
.load-more-btn { align-self: center; background: var(--bg-card); border: 1px solid var(--border); color: var(--accent); font-size: 12px; font-weight: 700; padding: 6px 14px; border-radius: 99px; cursor: pointer; margin-bottom: 6px; }

.msg-wrap {
    display: flex; flex-direction: column; max-width: 84%; position: relative;
    animation: msgIn 0.14s ease; transition: transform 0.16s ease;
    touch-action: pan-y; contain: layout style;
}
.msg-wrap.swiping { transition: none !important; }
.msg-wrap.me { align-self: flex-start; }
.msg-wrap.other { align-self: flex-end; }
.msg-wrap.channel-post { align-self: center; max-width: 96%; width: 100%; }

/* تجميع الرسائل المتتالية هندسياً (V12 Message Grouping) */
.msg-wrap.grp-cont { margin-top: -5.5px; }
.msg-wrap.me.grp-first .msg-bubble { border-bottom-right-radius: 7px; }
.msg-wrap.me.grp-mid .msg-bubble { border-top-right-radius: 7px; border-bottom-right-radius: 7px; }
.msg-wrap.me.grp-last .msg-bubble { border-top-right-radius: 7px; border-bottom-right-radius: 4px; }
.msg-wrap.other.grp-first .msg-bubble { border-bottom-left-radius: 7px; }
.msg-wrap.other.grp-mid .msg-bubble { border-top-left-radius: 7px; border-bottom-left-radius: 7px; }
.msg-wrap.other.grp-last .msg-bubble { border-top-left-radius: 7px; border-bottom-left-radius: 4px; }
.msg-wrap.grp-cont .msg-sender-lbl { display: none; }

.msg-bubble {
    padding: 8px 12px 6px; border-radius: 19px; position: relative;
    word-wrap: break-word; word-break: break-word;
    box-shadow: 0 2px 9px rgba(0, 0, 0, 0.22); min-width: 96px; user-select: none;
}
.msg-wrap.me .msg-bubble { background: var(--chat-me-bg, var(--bubble-me)); border-bottom-right-radius: 4px; color: #fff; }
.msg-wrap.other .msg-bubble { background: var(--bubble-other); border: 1px solid var(--border); border-bottom-left-radius: 4px; color: var(--text); }
.msg-wrap.channel-post .msg-bubble { background: var(--bg-panel); border: 1px solid var(--border-bright); border-radius: 18px; }
.msg-bubble.sticker-bubble { background: transparent !important; border: none !important; box-shadow: none !important; padding: 2px !important; min-width: auto; }

/* ستايلات الفقاعات الـ 4 */
[data-bubble="glass"] .msg-wrap.me .msg-bubble { background: linear-gradient(135deg, rgba(14, 165, 233, 0.62), rgba(139, 92, 246, 0.62)); border: 1px solid rgba(255, 255, 255, 0.22); box-shadow: var(--spec-top); }
[data-bubble="glass"] .msg-wrap.other .msg-bubble { background: rgba(20, 29, 52, 0.78); border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: var(--spec-top); }
[data-bubble="neon"] .msg-wrap.me .msg-bubble { background: #0c1426; border: 1.5px solid var(--accent); box-shadow: 0 0 12px var(--glow); }
[data-bubble="neon"] .msg-wrap.other .msg-bubble { background: #0b101d; border: 1.5px solid rgba(255, 255, 255, 0.2); }
[data-bubble="classic"] .msg-bubble { border-radius: 11px !important; }
[data-bubble="classic"] .msg-wrap.me .msg-bubble { border-bottom-right-radius: 2px !important; }
[data-bubble="classic"] .msg-wrap.other .msg-bubble { border-bottom-left-radius: 2px !important; }

.e2e-pill { font-size: 9.5px; opacity: 0.68; margin-left: 2px; }
.sd-pill { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 800; background: rgba(244, 63, 94, 0.25); color: #fda4af; border: 1px solid rgba(244, 63, 94, 0.45); padding: 1px 6px; border-radius: 99px; margin-left: 4px; }

.sticker-render { width: 124px; height: 124px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 20px; }
.sticker-img-render { width: 145px; height: 145px; object-fit: contain; border-radius: 14px; display: block; }

.msg-top-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 2px; }
.msg-sender-lbl { font-size: 11.5px; font-weight: 800; color: var(--accent); display: flex; align-items: center; }
.msg-menu-trigger { background: rgba(255, 255, 255, 0.08); border: none; color: rgba(255, 255, 255, 0.8); width: 22px; height: 22px; border-radius: 7px; cursor: pointer; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.reply-quote { background: rgba(0, 0, 0, 0.24); border-right: 3px solid var(--accent); padding: 4px 8px; border-radius: 8px; margin-bottom: 5px; font-size: 12px; }
.reply-quote strong { display: block; color: var(--accent); font-size: 11px; }
.reply-quote span { color: rgba(255, 255, 255, 0.82); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }

.msg-text { font-size: var(--msg-fs); line-height: 1.56; white-space: pre-wrap; user-select: text; }
.spoiler-txt { background: rgba(255, 255, 255, 0.22); color: transparent; border-radius: 6px; padding: 0 5px; cursor: pointer; filter: blur(4px); }
.spoiler-txt.revealed { background: rgba(255, 255, 255, 0.08); color: inherit; filter: none; }
.msg-code-inline { background: rgba(0, 0, 0, 0.36); padding: 1px 6px; border-radius: 6px; font-family: monospace; font-size: 13px; color: #93c5fd; }
.msg-quote-block { display: block; border-right: 3px solid rgba(255, 255, 255, 0.5); background: rgba(0, 0, 0, 0.18); padding: 4px 8px; border-radius: 6px; margin: 4px 0; font-style: italic; }
.msg-link { color: #93c5fd; text-decoration: underline; }
.msg-img { max-width: 100%; max-height: 295px; border-radius: 13px; margin-top: 4px; cursor: pointer; display: block; object-fit: cover; }

.voice-player { display: flex; align-items: center; gap: 10px; min-width: 225px; max-width: 280px; padding: 4px 2px; }
.vp-play { width: 38px; height: 38px; border-radius: 50%; border: none; background: rgba(255, 255, 255, 0.2); color: #fff; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vp-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.vp-wave { display: flex; align-items: flex-end; gap: 2.5px; height: 24px; cursor: pointer; }
.vp-bar { flex: 1; border-radius: 3px; background: rgba(255, 255, 255, 0.34); }
.vp-bar.played { background: #fff; }
.vp-meta { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: rgba(255, 255, 255, 0.85); }
.vp-speed { background: rgba(0, 0, 0, 0.28); border: none; color: #fff; font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 99px; cursor: pointer; }

.custom-vid-box { position: relative; border-radius: 14px; overflow: hidden; background: #000; margin-top: 4px; max-width: 280px; cursor: pointer; }
.custom-vid-box video { width: 100%; max-height: 260px; display: block; object-fit: cover; }
.cvp-overlay-play { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.34); display: flex; align-items: center; justify-content: center; }
.cvp-play-circle { width: 50px; height: 50px; border-radius: 50%; background: rgba(10, 16, 30, 0.82); border: 2px solid rgba(255, 255, 255, 0.85); color: #fff; font-size: 19px; display: flex; align-items: center; justify-content: center; }
.cvp-badge { position: absolute; top: 8px; right: 8px; background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.custom-full-vid { position: relative; width: 100%; max-width: 520px; background: #000; border-radius: 20px; overflow: hidden; border: 1px solid var(--border-bright); }
.custom-full-vid video { width: 100%; max-height: 74dvh; display: block; }
.cvp-controls { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--bg-panel); }
.cvp-btn { width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--primary-grad); color: #fff; font-size: 15px; cursor: pointer; flex-shrink: 0; }
.cvp-seek { flex: 1; accent-color: var(--accent); cursor: pointer; }
.cvp-time { font-size: 12px; color: var(--text-dim); font-weight: 700; min-width: 40px; text-align: center; }

.msg-bottom-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 5px; flex-wrap: wrap; }
.in-bubble-reacts { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.react-chip { display: inline-flex; align-items: center; gap: 5px; background: rgba(0, 0, 0, 0.24); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 99px; padding: 2px 8px 2px 5px; font-size: 13px; font-weight: 700; color: #fff; cursor: pointer; }
.react-chip.mine { background: rgba(255, 255, 255, 0.22); border-color: rgba(255, 255, 255, 0.4); }
.react-av { width: 18px; height: 18px; border-radius: 50%; background: var(--primary-grad); background-size: cover; background-position: center; font-size: 9px; font-weight: 800; color: #fff; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255, 255, 255, 0.45); }
.ch-reactions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); align-items: center; }
.ch-pill { background: var(--bg-card); border: 1px solid var(--border); color: var(--text); padding: 4px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.ch-pill.mine { background: var(--primary-grad); border-color: transparent; color: #fff; }
.ch-add-react { width: 28px; height: 28px; border-radius: 50%; border: 1px dashed var(--border-bright); background: transparent; color: var(--text-dim); font-size: 15px; cursor: pointer; }

.msg-footer { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: rgba(255, 255, 255, 0.72); margin-right: auto; }
.ticks { font-weight: bold; font-size: 12px; }
.ticks.seen { color: #7dd3fc; }
.ticks.pending { color: #fbbf24; }

.vo-card { display: flex; align-items: center; gap: 10px; background: rgba(0, 0, 0, 0.28); border: 1px dashed rgba(251, 191, 36, 0.65); padding: 10px 14px; border-radius: 14px; margin-top: 4px; cursor: pointer; font-weight: 700; font-size: 13.5px; color: #fde68a; }
.vo-card.opened { border-color: var(--border); color: var(--text-dim); cursor: default; opacity: 0.72; }

.poll-box { margin-top: 6px; min-width: 220px; }
.poll-q { font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.poll-opt { position: relative; background: rgba(0, 0, 0, 0.24); border: 1px solid var(--border); border-radius: 12px; padding: 9px 11px; margin-bottom: 6px; cursor: pointer; overflow: hidden; display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; }
.poll-opt.voted { border-color: var(--accent); }
.poll-bar { position: absolute; inset: 0; right: 0; left: auto; background: rgba(56, 189, 248, 0.24); pointer-events: none; }
.poll-opt span { position: relative; z-index: 2; }
.poll-meta { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

/* ==================== شريط الكتابة الكبسولي العائم (Floating Pill Composer V12) ==================== */
#replyPreviewBar { display: none; background: var(--bg-panel); padding: 7px 12px; border-top: 1px solid var(--border); align-items: center; justify-content: space-between; gap: 10px; flex-shrink: 0; }
.reply-bar-info { border-right: 3px solid var(--accent); padding-right: 9px; min-width: 0; flex: 1; }
.reply-bar-info strong { font-size: 12px; color: var(--accent); display: block; }
.reply-bar-info span { font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

#chatExtrasTray { display: none; flex-direction: column; background: var(--bg-panel); border-top: 1px solid var(--border); flex-shrink: 0; }
#chatExtrasTray.open { display: flex; }
.extras-row { display: flex; gap: 6px; overflow-x: auto; padding: 6px 10px; align-items: center; }
.extras-row + .extras-row { border-top: 1px solid var(--border); }
#formatBar button { background: var(--bg-card); border: 1px solid var(--border); color: var(--text); padding: 5px 11px; border-radius: 10px; font-size: 12px; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
#formatBar button:active { background: var(--primary-grad); color: #fff; }
.fx-select-pill { background: var(--bg-card); border: 1px solid var(--border-bright); color: var(--text); padding: 5px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 700; outline: none; flex-shrink: 0; }

.input-area {
    background: var(--bg-main); padding: 7px 10px calc(9px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border); position: relative; flex-shrink: 0;
}
.composer-pill {
    display: flex; align-items: flex-end; gap: 4px;
    background: var(--bg-panel); border: 1px solid var(--border-bright);
    border-radius: 26px; padding: 4px 5px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32), var(--spec-top);
}
.comp-btn {
    width: 36px; height: 36px; border-radius: 50%; border: none;
    background: transparent; color: var(--text-dim); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    transition: color 0.14s, background 0.14s;
}
.comp-btn:active { background: var(--bg-hover); color: #fff; }
.comp-btn.accent { background: rgba(56, 189, 248, 0.2); color: var(--accent); }

#msgInput {
    flex: 1; width: 100%; min-width: 110px; background: transparent; border: none;
    color: var(--text); padding: 7px 6px; font-size: 14.5px; line-height: 1.45;
    outline: none; min-height: 36px; max-height: 116px; resize: none; overflow-y: auto;
}
.send-circle {
    width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--primary-grad);
    color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    box-shadow: 0 3px 10px var(--glow);
}
.send-circle.mic-circle { background: var(--bg-card); color: var(--accent); box-shadow: none; border: 1px solid var(--border); }

#inputRecordBar { display: none; align-items: center; justify-content: space-between; gap: 7px; background: rgba(244, 63, 94, 0.14); border: 1px solid rgba(244, 63, 94, 0.34); padding: 6px 10px; border-radius: 26px; }
.rec-live-wave { display: flex; align-items: center; gap: 6px; color: #fb7185; font-weight: 800; font-size: 13px; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: #f43f5e; animation: blink 1s infinite; }
.live-bars { display: flex; align-items: center; gap: 2.5px; height: 20px; }
.live-bars i { width: 3px; border-radius: 3px; background: #fb7185; animation: wavePulse 0.7s infinite ease-in-out; }
.live-bars i:nth-child(2) { animation-delay: 0.1s; }
.live-bars i:nth-child(3) { animation-delay: 0.2s; }
.live-bars i:nth-child(4) { animation-delay: 0.3s; }
.live-bars i:nth-child(5) { animation-delay: 0.15s; }
#chatNoticeBar { display: none; text-align: center; padding: 10px; font-size: 13px; color: var(--text-dim); font-weight: 700; }

.pop-item { width: 100%; background: transparent; border: none; color: var(--text); padding: 10px 12px; border-radius: 12px; display: flex; align-items: center; gap: 10px; font-size: 13.5px; cursor: pointer; text-align: right; font-weight: 700; }
.pop-item:hover { background: var(--bg-hover); }

.mg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mg-tile { aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: var(--bg-card); cursor: pointer; position: relative; }
.mg-tile img, .mg-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mg-audio-row { background: var(--glass-inner); border: 1px solid var(--border); border-radius: 14px; padding: 8px 10px; margin-bottom: 8px; }

#stickerDrawer { display: none; background: var(--bg-panel); border-top: 1px solid var(--border); height: 290px; flex-direction: column; flex-shrink: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 10px 12px; }
.drawer-bottom-tabs { display: flex; align-items: center; justify-content: space-around; padding: 7px 10px; border-top: 1px solid var(--border); background: var(--bg-main); gap: 6px; }
.dbt-btn { flex: 1; padding: 7px 6px; border: none; border-radius: 99px; background: transparent; color: var(--text-dim); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.dbt-btn.active { background: var(--bg-card); color: #fff; border: 1px solid var(--border-bright); }
.dbt-close { width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--bg-card); color: var(--text-dim); cursor: pointer; font-weight: 800; }
.emoji-search { width: 100%; padding: 8px 12px; border-radius: 99px; border: 1px solid var(--border); background: var(--glass-inner); color: var(--text); font-size: 13px; margin-bottom: 10px; outline: none; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.emoji-cell { background: transparent; border: none; font-size: 25px; padding: 5px 0; cursor: pointer; border-radius: 10px; }
.st-sec-title { font-size: 12px; color: var(--text-dim); font-weight: 800; margin: 4px 0 8px; }
.sticker-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.sticker-tile { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 7px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; gap: 3px; aspect-ratio: 1 / 1; overflow: hidden; }
.sticker-tile img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.sticker-tile .st-em { font-size: 32px; line-height: 1.1; }
.sticker-tile .st-cap { font-size: 10px; color: var(--text-dim); font-weight: 700; }
.sticker-create-tile { border-style: dashed; border-color: var(--accent); color: var(--accent); font-weight: 800; font-size: 12px; }
.gif-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gif-card { height: 82px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; color: #fff; font-weight: 800; font-size: 12px; gap: 4px; border: 1px solid rgba(255,255,255,0.16); }

/* ==================== المنشورات والمزيد والألعاب ==================== */
.feed-wrap { width: 100%; height: 100%; display: flex; flex-direction: column; background: var(--bg-main); }
.feed-scroll { flex: 1; overflow-y: auto; padding: 10px 0 30px; display: flex; flex-direction: column; gap: 14px; align-items: center; -webkit-overflow-scrolling: touch; }
.ig-post { width: 100%; max-width: 500px; background: var(--bg-panel); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); contain: layout style; }
@media (min-width: 540px) { .ig-post { border: 1px solid var(--border); border-radius: 20px; overflow: hidden; } }
.ig-head { padding: 11px 14px; display: flex; align-items: center; justify-content: space-between; }
.ig-author { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.ig-media { position: relative; background: #000; width: 100%; overflow: hidden; }
.ig-media img { width: 100%; max-height: 520px; object-fit: cover; display: block; }
.ig-text-canvas { min-height: 230px; padding: 34px 24px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 20px; font-weight: 800; color: #fff; line-height: 1.65; }
.ig-heart-pop { position: absolute; top: 50%; left: 50%; font-size: 76px; pointer-events: none; opacity: 0; }
.ig-heart-pop.boom { animation: heartPop 0.65s ease forwards; }
.ig-actions { padding: 10px 14px 4px; display: flex; align-items: center; justify-content: space-between; }
.ig-act-left { display: flex; align-items: center; gap: 16px; }
.ig-act-btn { background: transparent; border: none; color: var(--text); font-size: 21px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.ig-act-btn span { font-size: 13.5px; font-weight: 700; }
.ig-act-btn.liked { color: #f43f5e; }
.ig-likes-line { padding: 2px 14px 4px; font-size: 13px; font-weight: 800; cursor: pointer; }
.ig-caption { padding: 2px 14px 6px; font-size: 14px; line-height: 1.55; }
.ig-comments-preview { padding: 2px 14px 8px; font-size: 13px; color: var(--text-dim); cursor: pointer; }
.ig-time { padding: 0 14px 12px; font-size: 11px; color: var(--text-dim); }

.spaces-wrap { width: 100%; height: 100%; display: flex; flex-direction: column; background: var(--bg-panel); }
.hub-section-title { font-size: 12.5px; font-weight: 800; color: var(--text-dim); letter-spacing: 0.2px; margin-bottom: 10px; padding-right: 4px; }
.future-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.future-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px;
    padding: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
    box-shadow: var(--spec-top); cursor: pointer; transition: transform 0.12s;
}
.future-card:active { transform: scale(0.97); }
.fc-badge-ic {
    width: 40px; height: 40px; border-radius: 13px; color: #fff;
    display: flex; align-items: center; justify-content: center; margin-bottom: 4px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}
.future-card strong { font-size: 14px; color: var(--text); }
.fc-sub { font-size: 11.5px; color: var(--text-dim); }
.space-badge { font-size: 10px; padding: 2px 7px; border-radius: 7px; background: rgba(56, 189, 248, 0.15); color: var(--accent); font-weight: 800; margin-right: 6px; flex-shrink: 0; }
.space-badge.grp { background: rgba(16, 185, 129, 0.15); color: var(--success); }

.games-wrap { width: 100%; height: 100%; display: flex; flex-direction: column; background: var(--bg-main); }
.games-scroll { flex: 1; overflow-y: auto; padding: 14px; max-width: 680px; width: 100%; margin: 0 auto; }
.game-card { background: var(--bg-panel); border: 1px solid var(--border-bright); border-radius: 20px; padding: 16px; margin-bottom: 12px; }
.game-card h4 { font-size: 16px; margin-bottom: 4px; display: flex; align-items: center; gap: 7px; }
.game-card p { font-size: 12.5px; color: var(--text-dim); margin-bottom: 12px; line-height: 1.5; }
.game-invite-card { background: rgba(14, 165, 233, 0.14); border: 1px solid var(--accent); border-radius: 16px; padding: 12px; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.xo-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 270px; margin: 14px auto; }
.xo-cell { aspect-ratio: 1 / 1; border-radius: 16px; border: 1px solid var(--border-bright); background: var(--bg-card); font-size: 34px; font-weight: 800; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.xo-cell.x { color: #38bdf8; }
.xo-cell.o { color: #f472b6; }
.quiz-opts { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.quiz-opt { width: 100%; padding: 11px 14px; border-radius: 13px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text); font-size: 14px; font-weight: 700; cursor: pointer; text-align: right; }
.quiz-opt.correct { background: rgba(16, 185, 129, 0.28); border-color: var(--success); }
.quiz-opt.wrong { background: rgba(244, 63, 94, 0.25); border-color: var(--danger); }
.score-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-card); border: 1px solid var(--border); padding: 5px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 800; }

/* ==================== البروفايل الكامل والهدايا ==================== */
.profile-wrap { width: 100%; height: 100%; overflow-y: auto; background: var(--bg-main); position: relative; -webkit-overflow-scrolling: touch; }
.profile-container { max-width: 680px; margin: 0 auto; padding-bottom: 34px; }
.prof-cover { height: 158px; background: var(--primary-grad); background-size: cover; background-position: center; position: relative; }
.prof-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.14) 0%, rgba(6,8,14,0.80) 100%); pointer-events: none; }
.cover-edit-btn {
    position: absolute; bottom: 12px; left: 12px; z-index: 3;
    background: rgba(10, 14, 24, 0.84); border: 1px solid rgba(255, 255, 255, 0.2); color: #fff;
    font-size: 11.5px; font-weight: 700; padding: 6px 11px; border-radius: 99px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
}
.prof-header-body { padding: 0 16px 18px; position: relative; z-index: 2; }
.prof-av-row { display: flex; justify-content: space-between; align-items: flex-end; margin-top: -45px; margin-bottom: 10px; gap: 8px; }
.prof-sub-head { font-size: 12.5px; font-weight: 800; color: var(--text-dim); margin: 4px 0 4px; }
.prof-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; background: var(--bg-panel); padding: 12px; border-radius: 18px; border: 1px solid var(--border); text-align: center; }
.prof-stats strong { display: block; font-size: 18px; color: var(--accent); }
.prof-stats span { font-size: 11.5px; color: var(--text-dim); }

.op-sticky-bar { position: sticky; top: 0; left: 0; right: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; margin-bottom: -54px; background: transparent; border-bottom: 1px solid transparent; transition: background 0.2s ease; }
.op-sticky-bar.scrolled { background: var(--bg-panel); border-bottom-color: var(--border); }
.op-sticky-title { flex: 1; font-size: 15px; font-weight: 800; color: #fff; opacity: 0; transition: opacity 0.18s ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-sticky-bar.scrolled .op-sticky-title { opacity: 1; }
.op-parallax-cover { height: 175px; }

.op-quick-actions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin: 12px 0 4px; }
.op-qa-btn {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 15px;
    padding: 10px 4px; color: var(--text); cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11px; font-weight: 700;
}
.op-qa-btn.primary { background: var(--primary-grad); border-color: transparent; color: #fff; }
.op-qa-btn.gold { background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(234, 179, 8, 0.26)); border-color: rgba(251, 191, 36, 0.4); color: #fde047; }

.op-tabs-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; background: var(--bg-panel); padding: 4px; border-radius: 15px; border: 1px solid var(--border); margin-top: 8px; }
.op-tab { border: none; background: transparent; color: var(--text-dim); padding: 8px 4px; border-radius: 11px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.op-tab.active { background: var(--primary-grad); color: #fff; }

.gifts-row { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px 12px; }
.gift-card { min-width: 118px; max-width: 138px; flex-shrink: 0; background: linear-gradient(135deg, rgba(251, 191, 36, 0.10), rgba(139, 92, 246, 0.12)); border: 1px solid rgba(251, 191, 36, 0.26); border-radius: 16px; padding: 10px 8px; text-align: center; }
.gift-card .g-em { font-size: 28px; display: block; margin-bottom: 3px; }
.gift-card .g-from { font-size: 11px; font-weight: 800; color: var(--accent); display: block; }
.gift-card .g-msg { font-size: 10.5px; color: var(--text-dim); margin-top: 2px; line-height: 1.35; word-break: break-word; }

.gift-picker-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gift-pick-tile { background: var(--glass-inner); border: 1.5px solid var(--border); border-radius: 16px; padding: 12px 6px; text-align: center; cursor: pointer; }
.gift-pick-tile.active { border-color: #fbbf24; background: rgba(251, 191, 36, 0.16); }
.gift-pick-tile span { display: block; }
.gift-pick-tile .gp-em { font-size: 28px; margin-bottom: 4px; }
.gift-pick-tile .gp-lbl { font-size: 11.5px; font-weight: 800; color: var(--text); }

.highlights-row { display: flex; gap: 14px; overflow-x: auto; padding: 8px 2px 14px; }
.hl-item { display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; min-width: 66px; }
.hl-circle { width: 60px; height: 60px; border-radius: 50%; background: var(--bg-card); border: 2px solid var(--accent); display: flex; align-items: center; justify-content: center; font-size: 22px; background-size: cover; background-position: center; overflow: hidden; }
.hl-item span { font-size: 11.5px; color: var(--text-dim); max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 8px; }
.grid-tile { aspect-ratio: 1 / 1; background: var(--bg-card); border-radius: 10px; overflow: hidden; cursor: pointer; position: relative; display: flex; align-items: center; justify-content: center; padding: 8px; text-align: center; font-size: 12px; font-weight: 700; color: #fff; }
.grid-tile img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

.set-row {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--glass-inner); padding: 9px 13px; border-radius: 13px;
    margin-bottom: 8px; border: 1px solid var(--border); font-size: 13px; font-weight: 700;
}
.chip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 5px; }
.chip-btn { padding: 8px 5px; border-radius: 11px; border: 1px solid var(--border); background: var(--glass-inner); color: var(--text-dim); font-size: 12px; font-weight: 700; cursor: pointer; }
.chip-btn.active { background: var(--primary-grad); border-color: transparent; color: #fff; }
.pwa-box { background: var(--glass-inner); border: 1px solid var(--border); border-radius: 15px; padding: 10px; margin-bottom: 10px; }

/* ==================== عارض الستوري والنوافذ ==================== */
#storyViewer { display: none; position: fixed; inset: 0; background: #000; z-index: 600; flex-direction: column; justify-content: space-between; }
.sv-bars { display: flex; gap: 4px; padding: 12px 12px 6px; z-index: 5; }
.sv-bar { flex: 1; height: 3px; background: rgba(255, 255, 255, 0.28); border-radius: 4px; overflow: hidden; }
.sv-bar-fill { height: 100%; background: #fff; width: 0%; }
.sv-header { display: flex; align-items: center; justify-content: space-between; padding: 6px 12px; z-index: 5; }
.sv-stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sv-stage img, .sv-stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.sv-text-box { padding: 30px; font-size: 24px; font-weight: 800; text-align: center; color: #fff; line-height: 1.6; }
.sv-caption { position: absolute; bottom: 16px; left: 16px; right: 16px; background: rgba(0, 0, 0, 0.72); padding: 10px 14px; border-radius: 14px; text-align: center; font-size: 14px; }
.sv-footer { padding: 10px 14px 20px; display: flex; flex-direction: column; gap: 8px; z-index: 5; background: linear-gradient(transparent, rgba(0, 0, 0, 0.92)); }
.sv-react-row { display: flex; justify-content: center; gap: 12px; }
.sv-react-btn { background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50%; width: 42px; height: 42px; font-size: 20px; cursor: pointer; }

.modal-bg { display: none; position: fixed; inset: 0; background: rgba(2, 4, 10, 0.80); z-index: 300; justify-content: center; align-items: center; padding: 16px; }
.story-top-modal { z-index: 850 !important; }
.sheet-bg { align-items: flex-end; padding: 0; }
.bottom-sheet {
    width: 100%; max-width: 470px; background: var(--bg-panel);
    border-top: 1px solid var(--border-bright); border-radius: 26px 26px 0 0;
    box-shadow: var(--spec-top); padding: 12px 18px calc(22px + env(safe-area-inset-bottom, 0px));
    animation: slideUp 0.2s cubic-bezier(0.22, 1, 0.36, 1); position: relative;
}
.bottom-sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.2); margin: 0 auto 12px; }
.react-picker { display: flex; justify-content: space-around; background: var(--bg-card); padding: 10px; border-radius: 18px; margin-bottom: 12px; }
.react-picker button { background: transparent; border: none; font-size: 23px; cursor: pointer; }
.sheet-action { width: 100%; background: var(--bg-card); border: 1px solid var(--border); color: var(--text); padding: 11px 15px; border-radius: 13px; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 12px; cursor: pointer; margin-bottom: 7px; }
.sheet-action.danger { background: rgba(244, 63, 94, 0.14); color: #fb7185; border-color: rgba(244, 63, 94, 0.28); }

.theme-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 8px 0 12px; }
.theme-swatch { height: 40px; border-radius: 12px; cursor: pointer; border: 2px solid transparent; display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 800; color: #fff; }
.theme-swatch.active { border-color: #fff; transform: scale(1.04); }

.notif-item { background: var(--glass-inner); border: 1px solid var(--border); padding: 10px 12px; border-radius: 13px; margin-bottom: 7px; font-size: 13px; }
.notif-item.unread { border-color: var(--accent); background: rgba(56, 189, 248, 0.1); }
.search-cat-title { font-size: 12px; color: var(--accent); font-weight: 800; margin: 8px 0 6px; }
#lightboxModal img { max-width: 95%; max-height: 85dvh; border-radius: 16px; }

/* ==================== شاشة المكالمات ولوحة التحكم ==================== */
#callOverlay { display: none; position: fixed; inset: 0; background: #05070e; z-index: 900; flex-direction: column; justify-content: space-between; align-items: center; padding: 24px 16px; }
.call-header { text-align: center; z-index: 5; }
.call-header h3 { font-size: 22px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.call-header span { font-size: 14px; color: var(--accent); font-weight: 700; }
.video-stage { position: relative; width: 100%; max-width: 500px; flex: 1; margin: 16px 0; border-radius: 26px; overflow: hidden; background: #0d1320; border: 1px solid var(--border-bright); display: flex; align-items: center; justify-content: center; }
#remoteVideo { width: 100%; height: 100%; object-fit: cover; background: #000; display: none; }
#callAvatarFallback { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 12px; z-index: 2; }
.pulse-ring { width: 108px; height: 108px; border-radius: 50%; background: var(--primary-grad); display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 800; animation: callPulse 1.8s infinite; background-size: cover; background-position: center; }
#localVideo { width: 110px; height: 152px; object-fit: cover; border-radius: 16px; position: absolute; bottom: 14px; right: 14px; border: 2px solid var(--accent); background: #000; z-index: 4; display: none; transform: scaleX(-1); }
.call-actions { display: flex; gap: 12px; z-index: 5; flex-wrap: wrap; justify-content: center; background: var(--bg-panel); border: 1px solid var(--border-bright); padding: 10px 16px; border-radius: 99px; }
.c-btn { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--border); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; background: var(--bg-card); }
.c-btn.accept { background: var(--success); border-color: transparent; }
.c-btn.hangup { background: var(--danger); border-color: transparent; }
.c-btn.muted { background: var(--warning); color: #000; border-color: transparent; }

#adminScreen { display: none; width: 100%; height: 100%; overflow-y: auto; padding: 20px 14px; position: relative; z-index: 5; }
.admin-wrap { max-width: 760px; margin: 0 auto; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat-card { background: var(--bg-panel); border: 1px solid var(--border-bright); padding: 14px; border-radius: 16px; text-align: center; }
.stat-card h3 { font-size: 23px; color: var(--accent); }
.stat-card span { font-size: 11.5px; color: var(--text-dim); }
.adm-section { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 18px; padding: 15px; margin-bottom: 14px; }
.adm-section h4 { font-size: 15px; margin-bottom: 11px; color: var(--accent); }
.adm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--glass-inner); padding: 10px 12px; border-radius: 13px; margin-bottom: 8px; border: 1px solid var(--border); flex-wrap: wrap; }
.adm-logs { max-height: 160px; overflow-y: auto; background: var(--glass-inner); padding: 10px; border-radius: 12px; font-size: 12px; color: var(--text-dim); line-height: 1.7; }
