        *,
        *::before,
        *::after {
            box-sizing: border-box;
        }

        html {
            scroll-behavior: smooth;
        }

        :root {
            --glass-bg: rgba(9, 9, 11, 0.92);
            --glass-strong: rgba(9, 9, 11, 0.96);
            --glass-border: rgba(255, 255, 255, 0.06);
            --glow-primary: rgba(99, 102, 241, 0.2);
            --glow-amber: rgba(251, 191, 36, 0.15);
            --glow-blue: rgba(99, 102, 241, 0.18);
            --surface-1: rgba(9, 9, 11, 0.94);
            --surface-2: rgba(24, 24, 27, 0.9);
            --accent-primary: rgba(99, 102, 241, 0.6);
            --accent-amber: rgba(251, 191, 36, 0.5);
            --accent-blue: rgba(99, 102, 241, 0.45);
            --shadow-deep: 0 32px 80px rgba(0, 0, 0, 0.6);
            --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
            --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
            --popup-bg-base: #09090b;
            --popup-bg-mid: #18181b;
            --popup-bg-surface: #27272a;
            --popup-border: rgba(255, 255, 255, 0.1);
            --popup-border-soft: rgba(255, 255, 255, 0.06);
            --popup-text: #f4f4f5;
            --popup-muted: #a1a1aa;
            --popup-shadow: 0 28px 70px rgba(0, 0, 0, 0.7);
        }

        body {
            overflow: hidden;
            background: #09090b;
            min-height: 100vh;
            min-height: 100dvh;
            position: relative;
            isolation: isolate;
        }

        .low-perf {
            scroll-behavior: auto;
        }

        .low-perf *,
        .low-perf *::before,
        .low-perf *::after {
            animation: none !important;
            transition: none !important;
        }

        .low-perf .glass-card,
        .low-perf .glass-ultra,
        .low-perf .glass-subtle,
        .low-perf .glass-strong {
            backdrop-filter: none !important;
            box-shadow: none !important;
        }

        .low-perf .holo-border::before,
        .low-perf .channel-btn::after,
        .low-perf .cosmic-bg,
        .low-perf .grid-overlay,
        .low-perf .glow-orb,
        .low-perf .mesh-gradient,
        .low-perf .mesh-orb,
        .low-perf .holo-grid {
            display: none !important;
        }

        .low-perf .msg-own,
        .low-perf .msg-other,
        .low-perf .msg-important,
        .low-perf .promo-message,
        .low-perf .shop-message,
        .low-perf .brief-message {
            box-shadow: none !important;
        }

        /* Keep the page loader animated even in low-perf mode. */
        .low-perf #pageLoader .loader-ring {
            animation: loaderSpin 0.95s linear infinite !important;
        }

        .low-perf #pageLoader .loader-ring::after {
            animation: loaderSpinReverse 1.35s linear infinite !important;
        }

        .low-perf #pageLoader .loader-text {
            animation: loaderTextPulse 1.8s ease-in-out infinite !important;
        }

        .low-perf #pageLoader .loader-text::after {
            animation: loaderDots 1.1s steps(4, end) infinite !important;
        }

        .low-perf .messages-loading__ring {
            animation-duration: 1.1s !important;
            animation-timing-function: linear !important;
            animation-iteration-count: infinite !important;
        }

        .low-perf .messages-loading__ring--two {
            animation-duration: 1.7s !important;
        }

        .low-perf .messages-loading__ring--three {
            animation-duration: 2.2s !important;
        }

        .low-perf .messages-loading__label {
            animation: loaderTextPulse 1.8s ease-in-out infinite !important;
        }

        #mainApp {
            height: 100vh;
            height: 100dvh;
            transition: padding-right 0.4s var(--ease-smooth);
        }

        /* Ultra-thin Scrollbar */
        ::-webkit-scrollbar {
            width: 3px;
            height: 3px;
        }

        ::-webkit-scrollbar-track {
            background: transparent;
        }

        ::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, rgba(99, 102, 241, 0.35), rgba(99, 102, 241, 0.35));
            border-radius: 10px;
        }

        /* Cosmic Void Background */
        .cosmic-bg {
            position: fixed;
            inset: 0;
            background:
                radial-gradient(1200px circle at 12% 15%, rgba(99, 102, 241, 0.1) 0%, transparent 55%),
                radial-gradient(900px circle at 85% 80%, rgba(99, 102, 241, 0.12) 0%, transparent 60%),
                radial-gradient(700px circle at 55% -10%, rgba(74, 111, 227, 0.1) 0%, transparent 55%),
                linear-gradient(180deg, #050608 0%, #0a1018 45%, #111827 100%);
            z-index: 0;
            pointer-events: none;
            overflow: hidden;
            filter: saturate(105%);
        }

        .cosmic-bg::before {
            content: '';
            position: absolute;
            inset: -25%;
            background: conic-gradient(from 90deg, transparent, rgba(99, 102, 241, 0.08), transparent 40%, rgba(99, 102, 241, 0.1), transparent 70%, rgba(74, 111, 227, 0.08));
            opacity: 0.25;
            filter: blur(40px);
            animation: spin-slow 45s linear infinite;
        }

        .cosmic-bg::after {
            content: '';
            position: absolute;
            inset: 0;
            background:
                radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.05), transparent 35%),
                repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.015) 1px, transparent 1px, transparent 6px);
            mix-blend-mode: soft-light;
            opacity: 0.2;
            animation: pulse-soft 12s ease-in-out infinite;
        }

        /* Animated Mesh Gradient */
        .mesh-gradient {
            position: fixed;
            inset: 0;
            z-index: -9;
            opacity: 0.35;
            filter: blur(110px);
            mix-blend-mode: screen;
        }

        .mesh-orb {
            position: absolute;
            border-radius: 50%;
            animation: float 30s ease-in-out infinite, morph 20s ease-in-out infinite;
        }

        .mesh-orb-1 {
            width: 50vw;
            height: 50vw;
            max-width: 600px;
            max-height: 600px;
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(74, 111, 227, 0.16));
            top: -20%;
            left: -12%;
            animation-delay: 0s;
        }

        .mesh-orb-2 {
            width: 45vw;
            height: 45vw;
            max-width: 500px;
            max-height: 500px;
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(99, 102, 241, 0.1));
            bottom: -14%;
            right: -8%;
            animation-delay: -10s;
        }

        .mesh-orb-3 {
            width: 35vw;
            height: 35vw;
            max-width: 400px;
            max-height: 400px;
            background: linear-gradient(135deg, rgba(224, 139, 61, 0.22), rgba(99, 102, 241, 0.12));
            top: 38%;
            left: 46%;
            animation-delay: -20s;
        }

        /* Holographic Grid */
        .holo-grid {
            position: fixed;
            inset: 0;
            z-index: -7;
            background-image:
                linear-gradient(rgba(99, 102, 241, 0.012) 1px, transparent 1px),
                linear-gradient(90deg, rgba(99, 102, 241, 0.012) 1px, transparent 1px);
            background-size: 120px 120px;
            mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, black 20%, transparent 70%);
            -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, black 20%, transparent 70%);
            animation: pulse-soft 8s ease-in-out infinite, grid-drift 26s linear infinite;
        }
       .glass-card {
    background: rgba(24, 24, 27, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.glass-card::after {
    content: none;
}

.glass-card:hover::after {
    opacity: 0;
}

        .glass-subtle {
            background: rgba(24, 24, 27, 0.5);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid rgba(255, 255, 255, 0.08);
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .glass-ultra {
            background: rgba(9, 9, 11, 0.95);
            backdrop-filter: blur(24px);
            -webkit-backdrop-filter: blur(24px);
            border: 1px solid rgba(255, 255, 255, 0.06);
        }

        .panel-rail {
            position: relative;
            isolation: isolate;
        }

        .panel-rail::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: inherit;
            background: none;
            pointer-events: none;
            z-index: -1;
        }

        .holo-border {
            position: relative;
            isolation: isolate;
        }



        .holo-border:hover::before,
        .holo-border:focus-within::before {
            opacity: 1;
        }

        .msg-own {
            background: rgba(79, 70, 229, 0.65);
            border: 1px solid rgba(129, 140, 248, 0.15);
            border-radius: 18px 18px 4px 18px;
            position: relative;
            overflow: hidden;
            transition: box-shadow 0.2s ease;
            display: inline-flex;
            flex-direction: column;
            width: fit-content;
            max-width: min(70ch, 100%);
            overflow-wrap: anywhere;
            transition: transform 0.15s ease, box-shadow 0.15s ease;
        }

        .msg-own::before {
            content: none;
        }

        .self-bubble {
            max-width: min(520px, 65%);
        }

        .msg-other {
            background: rgba(39, 39, 42, 0.9);
            border: 1px solid rgba(255, 255, 255, 0.07);
            border-radius: 18px 18px 18px 4px;
            display: inline-flex;
            flex-direction: column;
            transition: box-shadow 0.2s ease;
            width: fit-content;
            max-width: min(70ch, 100%);
            overflow-wrap: anywhere;
            transition: transform 0.15s ease, box-shadow 0.15s ease;
        }

        .msg-important {
            background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.1) 100%);
            border: 1px solid rgba(239, 68, 68, 0.3);
            border-radius: 20px;
            position: relative;
            overflow: hidden;
            display: inline-flex;
            flex-direction: column;
            width: fit-content;
            max-width: min(70ch, 100%);
            overflow-wrap: anywhere;
        }

        .msg-important::before {
            content: none;
        }

        .message-wrapper {
            transition: background 0.15s ease;
            border-radius: 12px;
            margin: 0 -8px;
            padding: 2px 8px;
            transition:transform 1s ease-in-out;
        }

        .message-wrapper:hover {
            transform: translateY(-1px);
            transition:transform 1s ease-in-out;
        }

        .message-wrapper:hover .msg-own {
            box-shadow: 0 8px 24px rgba(79, 70, 229, 0.15);
        }

        .message-wrapper:hover .msg-other {
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
        }

        /* ── Media Grid ── */
        .media-grid {
            display: grid;
            gap: 3px;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            max-width: min(380px, 72vw);
            border-radius: 14px;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.1);
            background: rgba(255, 255, 255, 0.04);
        }

        .media-grid.single {
            grid-template-columns: minmax(0, 1fr);
            max-width: min(320px, 68vw);
        }

        .media-grid.count-4 {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .media-thumb {
            position: relative;
            overflow: hidden;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            background: rgba(24, 24, 27, 0.6);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 14px;
        }

        .media-grid .media-thumb {
            border-radius: 0;
            border: none;
        }

        .media-grid .media-thumb:first-child:last-child {
            border-radius: 14px;
        }

        .media-grid.single .media-thumb {
            min-height: clamp(100px, 14vw, 160px);
            border-radius: 14px;
        }

        .media-viewer {
            position: fixed;
            inset: 0;
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 60;
            padding: 0;
        }

        .media-viewer.is-open {
            display: flex;
        }

        .media-viewer__backdrop {
            position: absolute;
            inset: 0;
            background: rgba(0, 0, 0, 0.82);
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
        }

        .media-viewer__panel {
            position: relative;
            width: 100vw;
            height: 100vh;
            max-width: 100vw;
            max-height: 100vh;
            border-radius: 0;
            border: 0;
            background: transparent;
            overflow: hidden;
            z-index: 1;
        }

        .media-viewer__panel::before {
            content: none;
        }

        .media-viewer__stage {
            position: absolute;
            inset: 28px 28px 128px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 0;
            overflow: hidden;
            min-height: 0;
            max-height: none;
            background: transparent;
        }

        .media-viewer__asset {
            max-width: 100%;
            max-height: 100%;
            width: auto;
            height: auto;
            transform-origin: center center;
            transition: transform 0.18s ease;
            will-change: transform;
        }

        .media-viewer__stage img.media-viewer__asset {
            user-select: none;
            -webkit-user-drag: none;
        }

        .media-viewer__stage.is-pan-enabled {
            cursor: grab;
            touch-action: none;
        }

        .media-viewer__stage.is-pan-enabled .media-viewer__asset {
            cursor: grab;
        }

        .media-viewer__stage.is-panning,
        .media-viewer__stage.is-panning .media-viewer__asset {
            cursor: grabbing;
        }

        .media-viewer__stage.is-panning .media-viewer__asset {
            transition: none;
        }

        .media-viewer__zoom-indicator {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            padding: 8px 12px;
            border-radius: 10px;
            color: rgba(255, 255, 255, 0.96);
            background: rgba(0, 0, 0, 0.55);
            font-size: 13px;
            font-weight: 600;
            letter-spacing: 0.02em;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.16s ease;
        }

        .media-viewer__zoom-indicator.is-visible {
            opacity: 1;
        }

        .media-viewer__controls {
            position: absolute;
            left: 20px;
            right: 20px;
            bottom: 18px;
            display: grid;
            grid-template-columns: auto 1fr auto;
            align-items: center;
            gap: 12px;
            padding: 8px 12px;
            border-radius: 12px;
            border: 0;
            background: rgba(0, 0, 0, 0.28);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }

        .media-viewer__controls-group {
            display: flex;
            gap: 8px;
        }

        .media-viewer__controls-group--right {
            justify-self: end;
        }

        .media-viewer__button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 38px;
            height: 38px;
            min-width: 38px;
            padding: 0;
            border-radius: 10px;
            border: 0;
            background: rgba(255, 255, 255, 0.11);
            color: white;
            font-size: 0;
            transition: all 0.2s ease;
        }

        .media-viewer__button:hover {
            background: rgba(255, 255, 255, 0.18);
        }

        .media-viewer__button.is-active {
            background: rgba(255, 255, 255, 0.24);
        }

        .media-viewer__button.is-disabled {
            opacity: 0.42;
        }

        .media-viewer__meta {
            font-size: 12px;
            color: rgba(255, 255, 255, 0.82);
            text-align: center;
            font-weight: 600;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }

        .media-viewer__caption {
            position: absolute;
            left: 50%;
            bottom: 74px;
            transform: translateX(-50%);
            max-width: min(72ch, calc(100vw - 44px));
            padding: 8px 12px;
            border-radius: 10px;
            border: 0;
            background: rgba(0, 0, 0, 0.34);
            color: rgba(255, 255, 255, 0.9);
            font-size: 12px;
            text-align: center;
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        @media (max-width: 720px) {
            .media-viewer__panel {
                width: 100vw;
                height: 100vh;
                border-radius: 0;
            }

            .media-viewer__stage {
                inset: 16px 12px 164px;
            }

            .media-viewer__caption {
                left: 50%;
                right: auto;
                bottom: 92px;
                max-width: calc(100vw - 24px);
                white-space: normal;
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
            }

            .media-viewer__controls {
                left: 10px;
                right: 10px;
                bottom: 10px;
                grid-template-columns: 1fr;
                gap: 8px;
            }

            .media-viewer__controls-group,
            .media-viewer__controls-group--right {
                justify-self: stretch;
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 8px;
            }
        }

        .media-grid--sidebar .media-thumb {
            aspect-ratio: 1 / 1;
            min-height: 120px;
        }

        .media-grid--sidebar .media-thumb__asset {
            width: 100%;
            height: 100%;
            max-height: none;
            object-fit: cover;
        }

        .media-thumb::after {
            content: '';
            position: absolute;
            inset: 0;
            background: rgba(255, 255, 255, 0.04);
            opacity: 0;
            transition: opacity 0.2s ease;
        }

        .media-thumb:hover::after {
            opacity: 1;
        }

        .media-thumb__asset {
            width: 100%;
            height: auto;
            object-fit: cover;
            object-position: center;
            display: block;
            max-height: min(36vh, 280px);
        }

        .media-grid.single .media-thumb__asset {
            max-height: min(42vh, 320px);
            object-fit: contain;
        }
        .media-thumb__asset.media-thumb__asset--tred {
            max-height: min(24vh, 150px);
            object-fit: contain;
            user-select: none;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            -webkit-user-drag: none;
            -webkit-touch-callout: none;
            pointer-events: none;
        }
        .media-grid.single .media-thumb__asset.media-thumb__asset--tred {
            max-height: min(24vh, 150px);
        }

        .media-thumb--overflow::after {
            content: '';
            position: absolute;
            inset: 0;
            background: rgba(9, 9, 11, 0.72);
            opacity: 1;
            z-index: 1;
        }

        .media-thumb__more {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2;
            pointer-events: none;
        }

        .media-thumb__more span {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 8px 16px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.12);
            border: 1px solid rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            font-size: 14px;
            font-weight: 700;
            color: #fff;
            letter-spacing: 0.02em;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
        }

        .media-thumb__badge {
            position: absolute;
            bottom: 8px;
            left: 8px;
            padding: 3px 8px;
            border-radius: 6px;
            font-size: 10px;
            font-weight: 600;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            color: rgba(255, 255, 255, 0.9);
            z-index: 1;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .media-thumb__play {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1;
            color: rgba(255, 255, 255, 0.9);
            filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
            transition: transform 0.2s ease;
        }

        .media-thumb:hover .media-thumb__play {
            transform: scale(1.1);
        }

        .media-thumb__actions {
            position: absolute;
            top: 8px;
            right: 8px;
            display: flex;
            gap: 4px;
            opacity: 0;
            transform: translateY(-4px);
            transition: all 0.2s ease;
            z-index: 3;
        }

        .media-thumb:hover .media-thumb__actions {
            opacity: 1;
            transform: translateY(0);
        }

        .media-thumb__action {
            width: 30px;
            height: 30px;
            border-radius: 8px;
            border: 1px solid rgba(255, 255, 255, 0.15);
            background: rgba(0, 0, 0, 0.65);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            color: rgba(255, 255, 255, 0.9);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .media-thumb__action:hover {
            background: rgba(99, 102, 241, 0.7);
            border-color: rgba(129, 140, 248, 0.4);
            transform: scale(1.08);
        }

        @media (hover: none) {
            .media-thumb__actions {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* ── File Attachments ── */
        .file-attachment {
            transition: all 0.2s ease;
        }

        .file-attachment:hover {
            background: rgba(255, 255, 255, 0.06);
            border-color: rgba(255, 255, 255, 0.12);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }

        .file-attachment__actions {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .file-attachment__download {
            padding: 4px 10px;
            border-radius: 6px;
            background: rgba(99, 102, 241, 0.12);
            border: 1px solid rgba(99, 102, 241, 0.2);
            transition: all 0.15s ease;
        }

        .file-attachment__download:hover {
            background: rgba(99, 102, 241, 0.25);
            border-color: rgba(129, 140, 248, 0.4);
        }

        /* ── Creative: Typing indicator pulse ── */
        .typing-dots span {
            animation: typing-bounce 1.4s infinite ease-in-out;
        }

        .typing-dots span:nth-child(2) { animation-delay: 0.16s; }
        .typing-dots span:nth-child(3) { animation-delay: 0.32s; }

        @keyframes typing-bounce {
            0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
            30% { transform: translateY(-4px); opacity: 1; }
        }

        /* ── Creative: Smooth message entrance ── */
        .message-wrapper {
            animation: msg-enter 0.25s ease-out;
        }

        @keyframes msg-enter {
            from {
                opacity: 0;
                transform: translateY(6px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .message-day-divider {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 24px 0 16px;
        }

        .message-day-divider span {
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: rgba(161, 161, 170, 0.7);
            padding: 4px 14px;
            border-radius: 999px;
            background: rgba(39, 39, 42, 0.6);
            border: 1px solid rgba(255, 255, 255, 0.06);
        }

        .msg-sticker {
            border-radius: 20px;
            padding: 0;
        }

        .msg-sticker .sticker-image {
            display: block;
            width: clamp(110px, 24vw, 180px);
            max-width: 100%;
            max-height: 180px;
            object-fit: contain;
            border-radius: 16px;
        }

        .msg-special {
            background: transparent;
            border: 1px solid transparent;
            border-radius: 0;
            box-shadow: none;
        }

        .msg-special::before {
            display: none;
        }
        .msg-tred-trigger {
            cursor: pointer;
        }
        .tred-detached-media {
            margin-top: 8px;
            display: block;
        }
        .tred-confetti-layer {
            position: fixed;
            inset: 0;
            pointer-events: none;
            z-index: 120;
            overflow: hidden;
        }
        .tred-confetti-piece {
            position: absolute;
            width: 8px;
            height: 12px;
            border-radius: 2px;
            opacity: 0.9;
            will-change: transform, opacity;
            animation-name: tred-confetti-fall;
            animation-timing-function: linear;
            animation-fill-mode: forwards;
        }
        @keyframes tred-confetti-fall {
            0% {
                transform: translate3d(0, -8vh, 0) rotate(0deg);
                opacity: 0;
            }
            8% {
                opacity: 0.95;
            }
            100% {
                transform: translate3d(var(--confetti-drift, 0px), 110vh, 0) rotate(var(--confetti-rotate, 0deg));
                opacity: 0;
            }
        }

        .message-reply-snippet {
            width: 100%;
            text-align: left;
            padding: 9px 12px;
            border-radius: 14px;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.06);
            cursor: pointer;
            transition: background 0.15s ease;
        }

        .message-reply-snippet:hover {
            background: rgba(255, 255, 255, 0.08);
        }

        .upload-progress-bar {
            height: 100%;
            background: linear-gradient(90deg, #6366f1, #818cf8);
            border-radius: 2px;
            transition: width 0.3s ease;
        }

        .composer-upload-preview {
            display: grid;
            gap: 10px;
            max-height: 220px;
            overflow-y: auto;
            padding-right: 2px;
        }

        .composer-upload-status {
            padding: 10px 12px;
            border-radius: 12px;
            border: 1px solid rgba(99, 102, 241, 0.2);
            background: rgba(24, 24, 27, 0.7);
            backdrop-filter: blur(8px);
            color: #e4e4e7;
            font-size: 12px;
            display: grid;
            gap: 8px;
        }

        .composer-upload-status.hidden {
            display: none;
        }

        .composer-upload-status-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
        }

        .composer-upload-status-label {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            min-width: 0;
            color: rgba(228, 228, 231, 0.95);
        }

        .composer-upload-status-count {
            color: rgba(228, 228, 231, 0.72);
            font-size: 11px;
            letter-spacing: 0.02em;
            white-space: nowrap;
        }

        .composer-upload-status-file {
            color: rgba(228, 228, 231, 0.7);
            font-size: 11px;
            line-height: 1.2;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .composer-upload-status-track {
            width: 100%;
            height: 6px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.14);
            overflow: hidden;
        }

        .composer-upload-status-fill {
            height: 100%;
            border-radius: inherit;
            background: linear-gradient(90deg, #6366f1, #818cf8);
            transition: width 0.2s ease;
        }

        .composer-upload-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 12px;
            border-radius: 14px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.08);
            backdrop-filter: blur(6px);
        }

        .composer-upload-thumb {
            width: 56px;
            height: 56px;
            border-radius: 12px;
            flex-shrink: 0;
            object-fit: cover;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.06);
            color: rgba(255, 255, 255, 0.65);
            overflow: hidden;
        }

        .composer-upload-meta {
            min-width: 0;
            flex: 1;
        }

        .composer-upload-name {
            font-size: 13px;
            line-height: 1.2;
            color: #fff;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .composer-upload-detail {
            margin-top: 4px;
            font-size: 11px;
            color: rgba(255, 255, 255, 0.52);
            letter-spacing: 0.02em;
        }

        .composer-upload-remove {
            width: 32px;
            height: 32px;
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            background: rgba(255, 255, 255, 0.04);
            color: rgba(255, 255, 255, 0.7);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
        }

        .composer-upload-remove:hover {
            background: rgba(239, 68, 68, 0.15);
            border-color: rgba(239, 68, 68, 0.3);
            color: #fecaca;
        }

        .composer-upload-remove:disabled {
            opacity: 0.45;
            cursor: not-allowed;
            pointer-events: none;
        }

        @media (max-width: 640px) {
            .composer-upload-item {
                padding: 9px 10px;
                gap: 10px;
            }

            .composer-upload-thumb {
                width: 48px;
                height: 48px;
            }
        }

        /* Recording Waveform */
        .live-waveform {
            display: flex;
            align-items: center;
            gap: 2px;
            height: 32px;
            padding: 0 8px;
        }

        .live-waveform-bar {
            width: 3px;
            background: linear-gradient(180deg, #818cf8, #6366f1);
            border-radius: 2px;
            animation: live-wave 0.5s ease-in-out infinite;
        }

        @keyframes live-wave {

            0%,
            100% {
                height: 8px;
                opacity: 0.4;
            }

            50% {
                height: 100%;
                opacity: 1;
            }
        }

        .rec-dot {
            width: 8px;
            height: 8px;
            border-radius: 999px;
            background: #ef4444;
            box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
            animation: rec-pulse 1s ease-in-out infinite;
        }

        @keyframes rec-pulse {

            0%,
            100% {
                transform: scale(0.8);
                opacity: 0.6;
            }

            50% {
                transform: scale(1.1);
                opacity: 1;
            }
        }

        /* Message Actions */
        .message-actions {
            position: absolute;
            display: flex;
            top: 68%;
            gap: 10px;
            flex-direction: row-reverse;
            transform: translateY(-50%);
            display: inline-flex;
            align-items: start;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2sease;
            z-index: 24;
            width: max-content;
        }

        .message-actions.actions-left {
            left: calc(100% + 10px);
        }

        .message-actions-wrap.actions-right .message-actions-buttons {
            flex-direction: row-reverse;
            align-self: end;
        }

        .message-actions-wrap {
            position: absolute;
            top: 50%;
            transform: translateY(-80%);
            display: inline-flex;
            gap: 8px;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease;
            z-index: 24;
            width: max-content;
            flex-direction: column;
        }

        .message-actions-wrap.actions-right {
            right: calc(100% + 10px);
        }

        .message-actions-wrap.actions-left {
            left: calc(100% + 10px);
        }

        .message-wrapper:hover .message-actions-wrap,
        .message-actions-wrap.is-open {
            opacity: 1;
            pointer-events: auto;
        }

        .message-actions-buttons {
            display: inline-flex;
            align-items: center;
            gap: 2px;
            width: min-content;
            background: rgba(24, 24, 27, 0.88);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 10px;
            padding: 2px;
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
        }

        .message-actions-buttons .action-orbit-btn {
            background: transparent;
            border: none;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            box-shadow: none;
        }

        .message-actions-buttons .action-orbit-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            border: none;
            box-shadow: none;
        }

        .message-wrapper:hover .message-actions,
        .message-actions.is-open {
            opacity: 1;
            pointer-events: auto;
        }

        .action-orbit-btn {
            width: 30px;
            height: 30px;
            border-radius: 8px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: rgba(24, 24, 27, 0.92);
            border: 1px solid rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            color: rgba(255, 255, 255, 0.72);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
            transition: all 0.2s ease;
        }

        .action-orbit-btn:hover {
            color: white;
            background: rgba(99, 102, 241, 0.5);
            border-color: rgba(129, 140, 248, 0.3);
            transform: translateY(-1px);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
        }

        .action-orbit-btn:active {
            transform: translateY(0) scale(0.96);
        }

        .message-actions-wrap.actions-left .reaction-tray {
            transform: translatex(-15px);

        }

        .reaction-tray {
            transform: translateY(-17%);
            display: inline-flex;
            align-items: center;
            padding: 4px 6px;
            border-radius: 12px;
            background: rgba(24, 24, 27, 0.95);
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            white-space: nowrap;
            z-index: 26;
            opacity: 1;
            pointer-events: none;
            transition: opacity 0.15s ease, transform 0.15s ease;
        }

        .reaction-tray.hidden {
            opacity: 0 !important;
            pointer-events: none !important;
        }

        .message-actions-wrap.actions-left .reaction-tray {
            left: calc(100% + 10px);
            right: auto;
        }

        .message-actions-wrap.actions-right .reaction-tray {
            right: calc(100% + 10px);
            left: auto;
        }

        /* When relative inline-flex contains msg-own and message-actions-wrap has actions-right, position reaction-tray on right */
        .relative.inline-flex:has(.msg-own) .message-actions-wrap.actions-right .reaction-tray {
            left: auto;
            right: calc(100% + 10px);
        }

        .message-actions-wrap.is-tray-open .reaction-tray {
            opacity: 1;
            pointer-events: auto;
        }

        .reaction-btn {
            transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .reaction-btn:hover {
            transform: scale(1.4) translateY(-2px);
        }

        .reaction-btn:active {
            transform: scale(1);
        }

        .reaction-btn img {
            image-rendering: -webkit-optimize-contrast;
            image-rendering: crisp-edges;
        }

        .reaction-pill-wrap {
            position: relative;
            display: inline-flex;
            align-items: center;
        }

        .reaction-tooltip {
            position: absolute;
            left: 50%;
            bottom: calc(100% + 10px);
            transform: translateX(-50%) translateY(4px);
            min-width: 140px;
            max-width: 220px;
            padding: 8px 10px;
            border-radius: 10px;
            background: rgba(7, 10, 16, 0.97);
            border: 1px solid rgba(255, 255, 255, 0.12);
            box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
            color: rgba(255, 255, 255, 0.95);
            font-size: 13px;
            line-height: 1.3;
            z-index: 40;
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
        }

        .reaction-pill-wrap:hover .reaction-tooltip,
        .reaction-pill-wrap:focus-within .reaction-tooltip {
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(0);
        }

        .reaction-tooltip__title {
            font-weight: 600;
            margin-bottom: 6px;
            color: #fff;
        }

        .reaction-tooltip__list {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .reaction-tooltip__user,
        .reaction-tooltip__empty,
        .reaction-tooltip__more {
            color: rgba(244, 244, 245, 0.9);
        }

        .reaction-tooltip__more {
            margin-top: 6px;
            font-size: 12px;
            color: rgba(99, 102, 241, 0.95);
        }

        /* Channel Active State */
        .channel-active {
            background: rgba(99, 102, 241, 0.12) !important;
            border-color: rgba(99, 102, 241, 0.3) !important;
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
            color: #fff !important;
        }

        .channel-active::before {
            content: '';
            position: absolute;
            left: 1px;
            top: 50%;
            transform: translateY(-50%);
            width: 4px;
            height: 68%;
            background: linear-gradient(180deg, #818cf8, #6366f1);
            border-radius: 0 3px 3px 0;
            box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
        }

        .channel-btn {
            position: relative;
            transition: transform 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth), border-color 0.3s var(--ease-smooth);
        }

        .channel-btn::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: inherit;
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(99, 102, 241, 0.08));
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s var(--ease-smooth);
        }

        #leftSidebar .channel-btn {
    transition: all 0.3s ease;
}


        .channel-btn>* {
            position: relative;
            z-index: 1;
        }

        .channel-btn:hover::after {
            opacity: 1;
        }

        .channel-btn.is-group-pinned {
            border-color: rgba(251, 191, 36, 0.42);
            background: linear-gradient(120deg, rgba(251, 191, 36, 0.08), rgba(99, 102, 241, 0.08));
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 6px 18px rgba(0, 0, 0, 0.22);
        }

        .channel-btn.is-group-pinned .group-avatar-shell {
            border-color: rgba(251, 191, 36, 0.45);
            box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.2);
            background: rgba(251, 191, 36, 0.08);
        }

        .channel-btn.is-group-pinned .group-name {
            color: #fff;
        }

        .channel-btn.is-group-pinned .group-pinned-label {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            color: #fde68a;
            border: 1px solid rgba(251, 191, 36, 0.42);
            background: rgba(251, 191, 36, 0.12);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
        }

        .group-pin-btn {
            opacity: 0.35;
            transition: opacity 0.2s ease, color 0.2s ease, transform 0.2s ease;
        }

        .channel-mute-btn {
            opacity: 0.35;
            transition: opacity 0.2s ease, color 0.2s ease, transform 0.2s ease;
        }

        .channel-btn:hover .group-pin-btn {
            opacity: 0.7;
        }

        .channel-btn:hover .channel-mute-btn {
            opacity: 0.7;
        }

        .group-pin-btn.is-pinned {
            opacity: 1;
            transform: rotate(-18deg);
        }

        #groupMenu .group-pin-btn {
            opacity: 1;
            transform: none;
        }

        .channel-mute-btn.is-muted {
            opacity: 1;
            transform: scale(1.04);
        }

        .channel-mute-all-btn {
            border: 1px solid rgba(255, 255, 255, 0.08);
        }

        .channel-mute-all-btn.is-muted {
            color: #f97316;
            border-color: rgba(249, 115, 22, 0.45);
            background: rgba(249, 115, 22, 0.12);
        }

        /* Status Indicators */
        .status-online {
            box-shadow: 0 0 0 2.5px #18181b, 0 0 6px rgba(52, 211, 153, 0.6);
            animation: status-glow 2.5s ease-in-out infinite;
        }

        .status-away {
            box-shadow: 0 0 0 2.5px #18181b, 0 0 6px rgba(251, 191, 36, 0.5);
        }

        @keyframes status-glow {
            0%, 100% { box-shadow: 0 0 0 2.5px #18181b, 0 0 6px rgba(52, 211, 153, 0.6); }
            50% { box-shadow: 0 0 0 2.5px #18181b, 0 0 10px rgba(52, 211, 153, 0.9); }
        }

        /* Break Timer Styles */
        #leftSidebar .break-container {
            position: relative;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.1);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 24px rgba(0, 0, 0, 0.28);
        }

        #leftSidebar .break-container::before {
            content: '';
            position: absolute;
            inset: -60%;
            background: conic-gradient(from 20deg, transparent, rgba(99, 102, 241, 0.35), rgba(99, 102, 241, 0.2), transparent);
            animation: spin-slow 10s linear infinite;
            opacity: 0;
            transition: opacity 0.5s ease;
        }

        #leftSidebar .break-container.active::before {
            opacity: 1;
            animation: spin-slow 6s linear infinite;
        }

        #leftSidebar .break-container.active::after {
            content: '';
            position: absolute;
            inset: -100%;
            background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.2), transparent 68%);
            animation: pulse-break 2.2s ease-in-out infinite;
            opacity: 1;
            transition: opacity 0.4s ease;
        }

        @keyframes pulse-break {

            0%,
            100% {
                transform: scale(1);
                opacity: 0.5;
            }

            50% {
                transform: scale(1.18);
                opacity: 0.82;
            }
        }

        #leftSidebar .break-card {
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.018) 100%);
            border: 1px solid rgba(255, 255, 255, 0.12);
            position: relative;
            z-index: 1;
            transition: all 0.3s ease;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
        }

        #leftSidebar .break-container.active .break-card {
            background: linear-gradient(180deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.04) 100%);
            border-color: rgba(99, 102, 241, 0.42);
            box-shadow: 0 0 22px rgba(99, 102, 241, 0.2), inset 0 0 18px rgba(99, 102, 241, 0.1);
        }

        #leftSidebar .break-container.expired::before {
            opacity: 1;
            background: conic-gradient(from 0deg, transparent, rgba(244, 63, 94, 0.45), rgba(99, 102, 241, 0.25), transparent);
        }

        #leftSidebar .break-container.expired .break-card {
            background: linear-gradient(180deg, rgba(244, 63, 94, 0.22) 0%, rgba(244, 63, 94, 0.08) 100%);
            border-color: rgba(244, 63, 94, 0.55);
            box-shadow: 0 0 24px rgba(244, 63, 94, 0.22), inset 0 0 18px rgba(244, 63, 94, 0.12);
        }

        .break-progress-ring {
            transform: rotate(-90deg);
            filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.5));
        }

        #leftSidebar .break-time-display {
            font-feature-settings: 'tnum';
            color: #f6f8fc;
            text-shadow: 0 0 26px rgba(99, 102, 241, 0.35);
            transition: all 0.3s ease;
        }

        #leftSidebar .break-container.active .break-time-display {
            text-shadow: 0 0 38px rgba(99, 102, 241, 0.58), 0 0 58px rgba(99, 102, 241, 0.32);
            animation: break-glow 2.2s ease-in-out infinite;
        }

        #leftSidebar .break-container.expired .break-time-display {
            color: #ffd2df;
            text-shadow: 0 0 34px rgba(244, 63, 94, 0.58), 0 0 56px rgba(99, 102, 241, 0.28);
        }

        #leftSidebar #breakStatusText {
            color: #b6bcc9;
        }

        #leftSidebar #breakStatusText span {
            box-shadow: 0 0 10px rgba(99, 102, 241, 0.35);
        }

        #leftSidebar #shiftButtonGroup {
            gap: 0.55rem;
        }

        #leftSidebar .sidebar-action-btn {
            position: relative;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.14);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02));
            color: #e5e9f3;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 18px rgba(0, 0, 0, 0.26);
            transition: border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
        }

        #leftSidebar .sidebar-action-btn::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(130deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.08));
            opacity: 0;
            transition: opacity 0.2s ease;
        }

        #leftSidebar .sidebar-action-btn > * {
            position: relative;
            z-index: 1;
        }

        #leftSidebar .sidebar-action-btn:not([disabled]):hover {
            transform: translateY(-1px);
            border-color: rgba(99, 102, 241, 0.5);
            box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(99, 102, 241, 0.22);
        }

        #leftSidebar .sidebar-action-btn:not([disabled]):hover::before {
            opacity: 1;
        }

        #leftSidebar .sidebar-action-btn[disabled] {
            opacity: 0.56 !important;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
        }

        #leftSidebar .sidebar-action-btn--shift-start:not([disabled]) {
            border-color: rgba(112, 196, 255, 0.42);
            color: #d5eeff;
            background: linear-gradient(180deg, rgba(112, 196, 255, 0.18), rgba(112, 196, 255, 0.06));
        }

        #leftSidebar .sidebar-action-btn--shift-end:not([disabled]) {
            border-color: rgba(99, 102, 241, 0.44);
            color: #ffe1d2;
            background: linear-gradient(180deg, rgba(99, 102, 241, 0.18), rgba(99, 102, 241, 0.06));
        }

        #leftSidebar .sidebar-action-btn--break {
            border-color: rgba(99, 102, 241, 0.55);
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.34), rgba(99, 102, 241, 0.26));
            color: #fff;
            box-shadow: 0 12px 22px rgba(99, 102, 241, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.16);
        }

        #leftSidebar .sidebar-action-btn--break:not([disabled]):hover {
            border-color: rgba(99, 102, 241, 0.72);
            box-shadow: 0 14px 30px rgba(99, 102, 241, 0.38), 0 0 0 1px rgba(99, 102, 241, 0.3);
        }

        #leftSidebar .break-container.expired .sidebar-action-btn--break {
            border-color: rgba(244, 63, 94, 0.65);
            background: linear-gradient(135deg, rgba(244, 63, 94, 0.35), rgba(99, 102, 241, 0.22));
        }

        @keyframes break-glow {

            0%,
            100% {
                filter: brightness(1);
            }

            50% {
                filter: brightness(1.15);
            }
        }

        #breakMonitorPanel {
            position: sticky !important;
            top: 0;
            left: 0;
            right: 0;
            padding-top: 0.45rem;
            padding-bottom: 0.45rem;
        }

        .break-monitor-wrap {
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
        }

        .break-monitor {
            position: relative;
            border: 1px solid rgba(99, 102, 241, 0.34);
            background: linear-gradient(165deg, rgba(8, 6, 12, 0.96) 0%, rgba(21, 13, 34, 0.95) 54%, rgba(33, 16, 43, 0.95) 100%);
            overflow: hidden;
            box-shadow: 0 16px 36px rgba(1, 0, 6, 0.56), inset 0 1px 0 rgba(255, 255, 255, 0.08);
        }

        .break-monitor::before {
            content: '';
            position: absolute;
            inset: 0;
            background:
                radial-gradient(900px circle at 84% -25%, rgba(168, 96, 232, 0.2), transparent 62%),
                radial-gradient(700px circle at 10% 130%, rgba(136, 57, 180, 0.16), transparent 66%);
            opacity: 1;
            pointer-events: none;
        }

        .break-monitor__icon {
            background: linear-gradient(135deg, rgba(160, 99, 230, 0.32), rgba(98, 39, 134, 0.24));
            border-color: rgba(188, 139, 255, 0.34) !important;
            box-shadow: 0 8px 16px rgba(43, 15, 62, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.13);
        }

        .break-monitor__icon i {
            color: #f1b6ff !important;
        }

        .break-monitor__eyebrow,
        .break-monitor__active-label {
            color: rgba(200, 177, 231, 0.76) !important;
        }

        .break-monitor__title {
            color: #f4efff !important;
        }

        .break-monitor__active-count {
            color: #f7f3ff !important;
            text-shadow: 0 0 16px rgba(165, 101, 228, 0.28);
        }

        .break-monitor__grid {
            display: grid;
            grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
            gap: 1.5rem;
        }

        .break-monitor__card {
            border: 1px solid rgba(99, 102, 241, 0.26);
            background: rgba(255, 255, 255, 0.04);
        }

        .break-monitor__pill {
            border: 1px solid rgba(99, 102, 241, 0.28);
            background: rgba(15, 18, 24, 0.5);
        }

        @media (max-width: 900px) {
            .break-monitor__grid {
                grid-template-columns: 1fr;
            }
        }

        .break-monitor-offset {
            padding-top: 20px;
        }

        .break-monitor__chips {
            padding-bottom: 2px;
            scrollbar-width: thin;
            scrollbar-color: rgba(99, 102, 241, 0.3) rgba(255, 255, 255, 0.00);
        }

        .break-monitor__chips::-webkit-scrollbar {
            height: 8px;
        }

        .break-monitor__chips::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.06);
            border-radius: 999px;
        }

        .break-monitor__chips::-webkit-scrollbar-thumb {
            background: rgba(99, 102, 241, 0.35);
            border-radius: 999px;
        }

        .break-monitor__chips::-webkit-scrollbar-thumb:hover {
            background: rgba(99, 102, 241, 0.5);
        }

        .break-monitor__chip {
            position: relative;
            flex: 0 0 auto;
            max-width: min(100%, 280px);
            border: 1px solid rgba(99, 102, 241, 0.26);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
        }

        .break-monitor__chip--empty {
            max-width: none;
        }

        .break-monitor__chip--expired {
            border-color: rgba(241, 110, 163, 0.5);
            background: linear-gradient(180deg, rgba(97, 25, 61, 0.76), rgba(60, 18, 39, 0.64));
            box-shadow: 0 0 16px rgba(177, 53, 103, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
        }

        .break-monitor__user {
            display: inline-block;
            min-width: 0;
            max-width: 118px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            flex: 0 1 auto;
        }

        .break-monitor__sep {
            color: rgba(185, 168, 209, 0.75) !important;
            flex: 0 0 auto;
        }

        .break-monitor__time {
            flex: 0 0 auto;
            letter-spacing: 0.02em;
            font-weight: 700;
        }

        .break-monitor__badge {
            font-size: 8px;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            line-height: 1;
            padding: 2px 5px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            background: rgba(255, 255, 255, 0.1);
            color: #f0f3f8;
            flex: 0 0 auto;
        }

        .break-monitor__badge--expired {
            border-color: rgba(241, 110, 163, 0.62);
            background: rgba(241, 110, 163, 0.2);
            color: #ffd8e8;
        }

        .break-monitor__over {
            color: #ff9bc7;
            font-weight: 700;
            font-size: 11px;
            flex: 0 0 auto;
            letter-spacing: 0.02em;
        }

        .break-monitor__chip--meta {
            border-style: dashed;
            opacity: 0.92;
        }

        .break-monitor__tooltip {
            position: absolute;
            left: 50%;
            bottom: 100%;
            transform: translate(-50%, -6px);
            padding: 8px 10px;
            border-radius: 10px;
            border: 1px solid rgba(99, 102, 241, 0.38);
            background: rgba(15, 10, 24, 0.97);
            color: #f0e8ff;
            font-size: 11px;
            line-height: 1.3;
            white-space: nowrap;
            opacity: 0;
            pointer-events: none;
            transition: opacity 160ms ease, transform 160ms ease;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.52);
            z-index: 20;
        }

        .break-monitor__tooltip .text-zinc-400 {
            color: rgba(205, 188, 230, 0.74) !important;
        }

        .break-monitor__chip--details:hover .break-monitor__tooltip {
            opacity: 1;
            transform: translate(-50%, -10px);
        }

        @media (max-width: 640px) {
            .break-monitor__chip {
                max-width: 232px;
            }

            .break-monitor__user {
                max-width: 84px;
            }
        }

        .chat-avatar {
            margin-top: 17px;
        }

        /* Typing Indicator */
        #typingIndicator {
            background: transparent !important;
            background-color: transparent !important;
            background-image: none !important;
            backdrop-filter: none !important;
        }

        .typing-dot {
            width: 6px;
            height: 6px;
            background: rgba(99, 102, 241, 0.9);
            border-radius: 50%;
            animation: typing 1.4s ease-in-out infinite;
        }

        .typing-dot:nth-child(2) {
            animation-delay: 0.2s;
        }

        .typing-dot:nth-child(3) {
            animation-delay: 0.4s;
        }

        /* Input Focus Effects */
        .input-glow:focus-within {
            box-shadow:
                0 0 0 1px rgba(99, 102, 241, 0.3),
                0 0 16px rgba(99, 102, 241, 0.08);
        }

        /* Role Badges with Glow */
        .role-admin {
            background: none;
            box-shadow: none;
        }

        .role-it {
            background: none;
            box-shadow: none;
        }

        .role-manager {
            background: none;
            box-shadow: none;
        }

        .role-teamlead {
            background: none;
            box-shadow: none;
        }

        .role-agent {
            background: none;
            box-shadow: none;
        }

        /* Sidebar Transitions */
        #leftSidebar {
            transition: transform 0.4s var(--ease-smooth), width 0.4s var(--ease-smooth), flex-basis 0.4s var(--ease-smooth);
            height: 100vh;
            height: 100dvh;
            position: absolute;
            top: 0;
            left: 0;
        }

        :root {
            --left-sidebar-handle: 28px;
            --right-sidebar-handle: 28px;
        }

        @media (min-width: 768px) {
            #leftSidebar {
                flex: 0 0 310px;
                flex-basis: 310px;
                position: relative;
            }

            #leftSidebar.is-collapsed {
                width: 0;
                min-width: 0;
                max-width: 0;
                flex: 0 0 0;
                flex-basis: 0;
                transform: translateX(0);
                overflow: visible;
            }

            #leftSidebar > :not(.left-sidebar-handle) {
                transition: opacity 0.25s ease;
            }
            
            #leftSidebar.is-collapsed > :not(.left-sidebar-handle) {
                opacity: 0;
                visibility: hidden;
                pointer-events: none;
            }
        }

        #leftSidebar{
            border-right: 1px solid #272727;
        }
        #rightSidebar{
            border-left: 1px solid #272727;
        }

        .left-sidebar-handle:hover {
            background: rgba(196, 196, 196, 0.062);
        }

        .left-sidebar-handle {
            padding: 2px;
            position: absolute;
            top: 45%;
            right: -29px;
            width: var(--left-sidebar-handle);
            height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.1);
            border-right: 1px solid rgba(255, 255, 255, 0.12);
            border-left: none;
            border-radius: 0 12px 12px 0;
            box-shadow: 0 10px 20px rgba(3, 7, 18, 0.45);
            z-index: 2;
            transform: translateY(-50%);
        }

        @media (max-width: 767px) {
            .left-sidebar-handle {
                display: none;
            }
        }

        .right-sidebar-handle {
            padding: 2px;
            position: absolute;
            top: 45%;
            left: -29px;
            width: var(--right-sidebar-handle);
            height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.1);
            border-left: 1px solid rgba(255, 255, 255, 0.12);
            border-right: none;
            border-radius: 12px 0 0 12px;
            box-shadow: 0 10px 20px rgba(3, 7, 18, 0.45);
            z-index: 50;
            transform: translateY(-50%);
        }

        #rightSidebar.is-closed .right-sidebar-handle {
            left: -29px;
        }

        .right-sidebar-handle:hover {
            background: rgba(196, 196, 196, 0.062);
        }

        .right-sidebar-mobile-open-btn {
            position: fixed;
            top: 50%;
            right: 0;
            transform: translateY(-50%);
            width: 34px;
            height: 56px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 12px 0 0 12px;
            background: rgba(17, 24, 39, 0.88);
            border: 1px solid rgba(255, 255, 255, 0.18);
            border-right: none;
            box-shadow: 0 10px 20px rgba(3, 7, 18, 0.45);
            color: rgba(226, 232, 240, 0.95);
            z-index: 38;
            backdrop-filter: blur(8px);
        }

        .right-sidebar-mobile-open-btn:hover {
            background: rgba(31, 41, 55, 0.95);
        }

        .right-sidebar-mobile-open-btn.is-hidden-mobile-btn {
            display: none !important;
        }
        
        @media (max-width: 1023px) {
            .right-sidebar-handle {
                display: flex;
            }
        }

        @media (min-width: 1024px) {
            .right-sidebar-mobile-open-btn {
                display: none !important;
            }
        }

        .icon-flip {
            transform: rotate(180deg);
        }

        #rightSidebar {
            transition: transform 0.4s var(--ease-smooth), opacity 0.25s ease;
            height: 100vh;
            height: 100dvh;
            overflow: visible;
            position: absolute;
            top: 0;
            right: 0;
            transform: translateX(0);
            opacity: 1;
        }

        .sidebar-boost {
            --sidebar-rail: rgba(255, 255, 255, 0.04);
            --sidebar-border: rgba(255, 255, 255, 0.08);
            --sidebar-text: #f4f4f5;
            --sidebar-muted: #a1a1aa;
            --sidebar-subtle: #71717a;
            --sidebar-accent: #818cf8;
            --sidebar-accent-border: rgba(99, 102, 241, 0.4);
            background: #09090b;
            border-color: var(--sidebar-border);
            box-shadow: none;
            overflow: visible;
        }

        .sidebar-boost.panel-rail::after {
            background: none;
            opacity: 0;
        }

        .sidebar-boost::after {
            opacity: 0;
        }

        .sidebar-boost .glass-subtle {
            background: rgba(24, 24, 27, 0.5);
            border-color: rgba(255, 255, 255, 0.08);
            box-shadow: none;
        }

        .sidebar-boost .glass-card {
            background: rgba(24, 24, 27, 0.7);
            border-color: rgba(255, 255, 255, 0.08);
            box-shadow: none;
        }

        .sidebar-boost .text-zinc-500 {
            color: var(--sidebar-subtle) !important;
        }

        .sidebar-boost .text-zinc-400 {
            color: var(--sidebar-muted) !important;
        }

        .sidebar-boost .text-zinc-300 {
            color: #dce1eb !important;
        }

        #leftSidebar .chat-header,
        #rightSidebar > .h-20 {
            border-bottom-color: rgba(255, 255, 255, 0.1);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
        }

        #leftSidebar .holo-border::before,
        #rightSidebar .holo-border::before {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
        }

        #leftSidebar #searchInput {
            color: var(--sidebar-text);
        }

        #leftSidebar #searchInput::placeholder {
            color: var(--sidebar-muted);
        }

        #leftSidebar #channelGroupsView h3,
        #leftSidebar #channelDmsView h3,
        #leftSidebar #channelAllUsersView h3 {
            color: var(--sidebar-accent) !important;
        }

        #leftSidebar .channel-btn::after {
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(99, 102, 241, 0.08));
        }

        .alluseroverflow{
            overflow-x: hidden;
        }

        #leftSidebar .channel-active {
            background: rgba(99, 102, 241, 0.1) !important;
            border-color: var(--sidebar-accent-border) !important;
            box-shadow: none;
        }

        #leftSidebar .channel-active::before {
            background: linear-gradient(180deg, #818cf8, #6366f1);
            box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
        }

        #leftSidebar .notification-badge {
            background: #ef4444 !important;
            border: 1px solid rgba(239, 68, 68, 0.6);
            color: #ffffff !important;
            box-shadow: none;
        }

        #leftSidebar .dm-sort-button {
            color: var(--sidebar-muted);
        }

        #leftSidebar .dm-sort-button:hover {
            color: var(--sidebar-text);
            border-color: var(--sidebar-accent-border);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.26);
        }

        #leftSidebar .dm-sort-button[aria-expanded="true"] {
            border-color: var(--sidebar-accent-border);
            background: rgba(99, 102, 241, 0.1);
        }

        #leftSidebar .dm-sort-menu {
            border-color: rgba(255, 255, 255, 0.1);
        }

        #leftSidebar .dm-sort-option:hover {
            background: rgba(255, 255, 255, 0.08);
        }

        #leftSidebar .dm-sort-option.is-active {
            background: rgba(99, 102, 241, 0.12);
            border-color: rgba(99, 102, 241, 0.4);
        }

        #leftSidebar .all-users-sort-select {
            color: var(--sidebar-muted);
        }

        #leftSidebar .all-users-sort-select:hover,
        #leftSidebar .all-users-sort-select:focus-visible {
            color: var(--sidebar-text);
            border-color: var(--sidebar-accent-border);
        }

        #rightSidebarContent {
            background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), transparent 18%);
        }

        .left-sidebar-handle,
        .right-sidebar-handle,
        .right-sidebar-mobile-open-btn {
            background: linear-gradient(180deg, #040506 0%, #0f1216 100%);
            border-color: rgba(255, 255, 255, 0.14);
            color: #dbe1eb;
        }

        .left-sidebar-handle:hover,
        .right-sidebar-handle:hover,
        .right-sidebar-mobile-open-btn:hover {
            background: rgba(60, 64, 73, 0.233) !important;
        }

        #rightSidebarContent #shiftStatusValue,
        #rightSidebarContent #shiftStartedAtValue,
        #rightSidebarContent #shiftEndedAtValue,
        #rightSidebarContent #breakUsedValue,
        #rightSidebarContent #breakRemainingValue,
        #rightSidebarContent #breakOverflowValue {
            color: #f3f6fb !important;
        }

        #rightSidebarContent #shiftStatusNote,
        #rightSidebarContent #breakTotalValue,
        #rightSidebarContent #breakUpdatedAt {
            color: #aeb5c4 !important;
        }

        #rightSidebarContent #breakPercentValue {
            color: #818cf8 !important;
            font-weight: 700;
        }

        #rightSidebarContent #breakProgressBar {
            background: linear-gradient(90deg, #6366f1, #818cf8) !important;
            box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
        }

        .shift-end-modal #shiftEndConfirmInput {
            border: 1px solid rgba(255, 255, 255, 0.14);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
        }

        .shift-end-modal .shift-mood-btn {
            border: 1px solid rgba(255, 255, 255, 0.14);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
            color: #d8deea;
            transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
        }

        .shift-end-modal .shift-mood-btn:hover {
            transform: translateY(-1px);
            border-color: rgba(99, 102, 241, 0.4);
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
        }

        .shift-end-modal .shift-mood-btn.ring-1,
        .shift-end-modal .shift-mood-btn.ring-indigo-500 {
            border-color: rgba(99, 102, 241, 0.6) !important;
            box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.38), 0 10px 20px rgba(99, 102, 241, 0.2);
            color: #fff;
        }

        .shift-end-modal .shift-end-confirm-btn {
            border: 1px solid rgba(239, 68, 68, 0.4);
            background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(239, 68, 68, 0.2));
            box-shadow: 0 8px 16px rgba(239, 68, 68, 0.2);
        }

        .shift-end-modal .shift-end-confirm-btn:hover {
            opacity: 1 !important;
            box-shadow: 0 12px 24px rgba(239, 68, 68, 0.3);
        }

        .shift-end-modal .shift-end-cancel-btn {
            border: 1px solid rgba(255, 255, 255, 0.16);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
            color: #d0d6e3 !important;
        }

        .shift-end-modal .shift-end-cancel-btn:hover {
            border-color: rgba(255, 255, 255, 0.24);
            color: #fff !important;
        }

        #adminBreakCooldownBtn,
        #adminBreakDurationBtn {
            border: 1px solid rgba(255, 255, 255, 0.14);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
        }

        #adminBreakCooldownBtn:hover,
        #adminBreakDurationBtn:hover {
            border-color: rgba(99, 102, 241, 0.4);
            background: linear-gradient(180deg, rgba(99, 102, 241, 0.12), rgba(99, 102, 241, 0.04));
        }

        /* ─── Sticker Picker ─── */

        @keyframes picker-entrance {
            0% {
                opacity: 0;
                transform: translateY(18px) scale(0.92);
                filter: blur(6px);
            }
            60% {
                opacity: 1;
                filter: blur(0);
            }
            100% {
                opacity: 1;
                transform: translateY(0) scale(1);
                filter: blur(0);
            }
        }

        @keyframes picker-glow-pulse {
            0%, 100% { opacity: 0.35; }
            50% { opacity: 0.62; }
        }

        @keyframes sticker-pop-in {
            0% { opacity: 0; transform: scale(0.4) rotate(-8deg); }
            50% { opacity: 1; transform: scale(1.08) rotate(2deg); }
            100% { opacity: 1; transform: scale(1) rotate(0deg); }
        }

        .picker-panel {
            position: fixed;
            left: 50%;
            bottom: 108px;
            margin-left: -220px;
            width: 440px;
            max-width: calc(100vw - 24px);
            max-height: 480px;
            border-radius: 24px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            z-index: 220;
            background: linear-gradient(180deg, rgba(15, 15, 22, 0.97), rgba(9, 9, 14, 0.98));
            border: 1px solid rgba(129, 140, 248, 0.18);
            box-shadow:
                0 32px 72px rgba(0, 0, 0, 0.55),
                0 0 0 1px rgba(99, 102, 241, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
            backdrop-filter: blur(24px);
            -webkit-backdrop-filter: blur(24px);
            animation: picker-entrance 0.38s var(--ease-smooth) both;
        }

        .picker-panel::before {
            content: '';
            position: absolute;
            inset: -2px;
            border-radius: 26px;
            background: conic-gradient(
                from 180deg,
                rgba(129, 140, 248, 0.22),
                rgba(56, 189, 248, 0.12),
                rgba(139, 92, 246, 0.18),
                rgba(129, 140, 248, 0.22)
            );
            z-index: -1;
            animation: picker-glow-pulse 4s ease-in-out infinite;
            filter: blur(14px);
            pointer-events: none;
        }

        .picker-panel.hidden {
            display: none !important;
        }

        .picker-header {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 16px 20px 12px;
            border-bottom: 1px solid rgba(129, 140, 248, 0.12);
            background: linear-gradient(180deg, rgba(99, 102, 241, 0.06), transparent);
        }

        .picker-header span {
            font-weight: 700;
            letter-spacing: 0.03em;
            background: linear-gradient(135deg, #e0e7ff, #a5b4fc);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .picker-content {
            flex: 1;
            overflow-y: auto;
            padding: 10px 14px 16px;
            scrollbar-width: thin;
            scrollbar-color: rgba(129, 140, 248, 0.2) transparent;
        }

        .picker-content::-webkit-scrollbar { width: 4px; }
        .picker-content::-webkit-scrollbar-track { background: transparent; }
        .picker-content::-webkit-scrollbar-thumb {
            background: rgba(129, 140, 248, 0.25);
            border-radius: 10px;
        }

        .picker-grid {
            display: grid;
            grid-template-columns: repeat(8, 1fr);
            gap: 4px;
        }

        .picker-grid.stickers {
            grid-template-columns: repeat(5, 1fr);
            gap: 8px;
        }

        .sticker-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            aspect-ratio: 1;
            border-radius: 16px;
            cursor: pointer;
            position: relative;
            overflow: hidden;
            animation: sticker-pop-in 0.35s var(--ease-spring) both;
            transition: transform 0.2s var(--ease-spring), border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
        }

        .sticker-btn::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: inherit;
            background: radial-gradient(circle at 50% 30%, rgba(129, 140, 248, 0.2), transparent 70%);
            opacity: 0;
            transition: opacity 0.2s ease;
            pointer-events: none;
        }

        .sticker-btn:nth-child(1)  { animation-delay: 0.02s; }
        .sticker-btn:nth-child(2)  { animation-delay: 0.04s; }
        .sticker-btn:nth-child(3)  { animation-delay: 0.06s; }
        .sticker-btn:nth-child(4)  { animation-delay: 0.08s; }
        .sticker-btn:nth-child(5)  { animation-delay: 0.10s; }
        .sticker-btn:nth-child(6)  { animation-delay: 0.12s; }
        .sticker-btn:nth-child(7)  { animation-delay: 0.14s; }
        .sticker-btn:nth-child(8)  { animation-delay: 0.16s; }
        .sticker-btn:nth-child(9)  { animation-delay: 0.18s; }
        .sticker-btn:nth-child(10) { animation-delay: 0.20s; }
        .sticker-btn:nth-child(n+11) { animation-delay: 0.22s; }

        .sticker-btn:hover {
            transform: translateY(-4px) scale(1.12);
            border-color: rgba(129, 140, 248, 0.42);
            box-shadow:
                0 8px 20px rgba(99, 102, 241, 0.22),
                0 0 12px rgba(129, 140, 248, 0.15);
            background: linear-gradient(180deg, rgba(49, 46, 129, 0.45), rgba(30, 27, 75, 0.35));
        }

        .sticker-btn:hover::after {
            opacity: 1;
        }

        .sticker-btn:active {
            transform: scale(0.92);
            transition-duration: 0.1s;
        }

        .sticker-btn img {
            height: 100%;
            width: 100%;
            object-fit: cover;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
            transition: transform 0.2s var(--ease-spring), filter 0.2s ease;
        }

        .sticker-btn:hover img {
            transform: scale(1.06);
            filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.3));
        }

        .sticker-category-tabs {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 10px 16px;
            border-bottom: 1px solid rgba(129, 140, 248, 0.1);
            overflow-x: auto;
            overflow-y: hidden;
            min-height: 50px;
            flex-shrink: 0;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), transparent);
        }

        .sticker-category-tabs::-webkit-scrollbar {
            height: 6px;
        }

        .sticker-category-tabs::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.04);
            border-radius: 3px;
        }

        .sticker-category-tabs::-webkit-scrollbar-thumb {
            background: rgba(129, 140, 248, 0.3);
            border-radius: 3px;
        }

        .sticker-category-tabs::-webkit-scrollbar-thumb:hover {
            background: rgba(129, 140, 248, 0.5);
        }

        .sticker-cat-tab {
            flex-shrink: 0;
            padding: 7px 16px;
            border-radius: 10px;
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.04em;
            white-space: nowrap;
            border: 1px solid transparent;
            color: rgba(199, 210, 254, 0.65);
            background: transparent;
            cursor: pointer;
            position: relative;
            transition: all 0.22s var(--ease-smooth);
        }

        .sticker-cat-tab:hover {
            color: rgba(224, 231, 255, 0.95);
            background: rgba(99, 102, 241, 0.12);
            border-color: rgba(129, 140, 248, 0.24);
        }

        .sticker-cat-tab.active {
            color: #fff;
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(79, 70, 229, 0.25));
            border-color: rgba(165, 180, 252, 0.42);
            box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
        }

        @media (max-width: 480px) {
            .picker-panel {
                left: 12px;
                right: 12px;
                margin-left: 0;
                width: auto;
                bottom: 90px;
                max-height: 400px;
            }

            .picker-grid.stickers {
                grid-template-columns: repeat(4, 1fr);
            }
        }

        /* Popup Theme */
        #modalOverlay > .absolute {
            background: rgba(0, 0, 0, 0.8) !important;
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
        }

        #modalOverlay .glass-card,
        #contextMenu,
        #groupMenu,
        #debugPanel {
            background: #18181b !important;
            border: 1px solid rgba(255, 255, 255, 0.1) !important;
            box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5) !important;
            color: #f4f4f5;
        }

        #contextMenu {
            position: absolute !important;
            z-index: 200 !important;
            pointer-events: auto;
        }

        #modalOverlay .glass-card::after,
        #contextMenu::after,
        #groupMenu::after {
            opacity: 0;
        }

        #contextMenu button,
        #groupMenu button {
            position: relative;
            border-radius: 8px;
            margin: 0 6px;
            width: calc(100% - 12px);
        }

        #contextMenu button:hover i,
        #groupMenu button:hover i {
            color: rgba(129, 140, 248, 0.9);
        }

        #contextMenu #deleteActionBtn:hover i {
            color: #fca5a5;
        }

        #modalOverlay .holo-border::before {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04)) !important;
        }

        #modalOverlay #modalTitle,
        #contextMenu .text-zinc-300,
        #groupMenu .text-zinc-300 {
            color: var(--popup-text) !important;
        }

        #modalOverlay .text-zinc-500,
        #modalOverlay .text-zinc-400,
        #modalOverlay .text-zinc-300,
        #debugPanel .debug-panel__time {
            color: var(--popup-muted) !important;
        }

        #modalOverlay .glass-subtle {
            background: rgba(39, 39, 42, 0.6) !important;
            border-color: rgba(255, 255, 255, 0.06) !important;
        }

        #modalOverlay input,
        #modalOverlay textarea,
        #modalOverlay select {
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02)) !important;
            border: 1px solid var(--popup-border-soft) !important;
            color: var(--popup-text) !important;
        }

        #modalOverlay input::placeholder,
        #modalOverlay textarea::placeholder,
        #modalOverlay select::placeholder {
            color: rgba(219, 202, 248, 0.52) !important;
        }

        #modalOverlay button,
        #debugPanel .debug-panel__btn {
            border: 1px solid rgba(160, 122, 224, 0.28);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
            color: var(--popup-text);
        }

        #modalOverlay button:hover,
        #debugPanel .debug-panel__btn:hover {
            border-color: rgba(178, 136, 248, 0.52);
            background: linear-gradient(180deg, rgba(151, 111, 223, 0.28), rgba(97, 62, 158, 0.14));
        }

        #stickerPicker .sticker-btn,
        #stickerPicker .sticker-cat-tab {
            border: 1px solid rgba(255, 255, 255, 0.04);
        }

        #stickerPicker .sticker-btn:hover {
            border-color: rgba(129, 140, 248, 0.42);
        }

        #stickerPicker .sticker-cat-tab:hover {
            border-color: rgba(129, 140, 248, 0.24);
        }

        #stickerPicker .sticker-cat-tab.active {
            border-color: rgba(165, 180, 252, 0.42);
        }

        #modalOverlay #modalBody [class*="bg-gradient-to-r"] {
            background: linear-gradient(135deg, rgba(112, 67, 187, 0.88), rgba(66, 39, 116, 0.92)) !important;
            border: 1px solid rgba(177, 136, 245, 0.42);
            box-shadow: 0 10px 20px rgba(59, 27, 106, 0.45);
        }

        #stickerPicker .picker-header,
        #stickerPicker .sticker-category-tabs {
            border-bottom-color: rgba(129, 140, 248, 0.14) !important;
        }

        #contextMenu #deleteActionBtn,
        #groupMenu #groupMenuDeleteBtn {
            border-color: transparent;
            background: transparent;
            color: #fca5a5 !important;
        }

        #mediaViewer .media-viewer__backdrop {
            background: rgba(0, 0, 0, 0.88);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
        }

        #mediaViewer .media-viewer__panel {
            background: transparent;
            box-shadow: none;
        }

        #mediaViewer .media-viewer__panel::before {
            background: none;
        }

        #mediaViewer .media-viewer__stage {
            background: transparent;
        }

        #mediaViewer .media-viewer__controls,
        #mediaViewer .media-viewer__caption {
            background: rgba(0, 0, 0, 0.36);
        }

        #mediaViewer .media-viewer__button {
            background: rgba(118, 78, 190, 0.18);
            color: var(--popup-text);
        }

        #mediaViewer .media-viewer__button:hover {
            background: rgba(153, 108, 226, 0.26);
        }

        #mediaViewer .media-viewer__meta {
            color: rgba(203, 184, 235, 0.88);
        }

        #mediaViewer .media-viewer__caption {
            color: rgba(238, 230, 255, 0.94);
        }

        #debugPanel .debug-panel__title,
        #debugPanel .debug-panel__footer {
            color: rgba(204, 184, 236, 0.78);
        }

        @media (min-width: 1024px) {
            #mainApp.right-sidebar-open {
                padding-right: 360px;
            }

            #rightSidebar.is-closed {
                transform: translateX(100%);
                opacity: 1;
                overflow: visible;
            }

            #rightSidebar > :not(.right-sidebar-handle) {
                transition: opacity 0.25s ease;
            }

            #rightSidebar.is-closed > :not(.right-sidebar-handle) {
                opacity: 0;
                visibility: hidden;
                pointer-events: none;
            }
        }

        @media (max-width: 1023px) {
            #rightSidebar {
                top: 0;
                right: 0;
                transform: translateX(100%);
                opacity: 0;
            }

            #rightSidebar.is-open {
                transform: translateX(0);
                opacity: 1;
            }

            #rightSidebar.is-closed {
                display: none;
            }
        }

        @media (max-width: 640px) {

            #leftSidebar,
            #rightSidebar {
                width: 100vw;
                max-width: 100vw;
            }

            #leftSidebar.-translate-x-full {
                display: none;
            }

            #rightSidebarContent {
                padding: 20px;
            }

            #messagesContainer {
                padding-left: 16px;
                padding-right: 16px;
            }

            #chatInputContainer,
            #typingIndicator {
                padding-left: 16px;
                padding-right: 16px;
            }

            .chat-header {
                height: 72px;
                padding-left: 16px;
                padding-right: 16px;
            }
        }

        /* No Scrollbar */
        .no-scrollbar::-webkit-scrollbar {
            display: none;
        }

        .no-scrollbar {
            -ms-overflow-style: none;
            scrollbar-width: none;
        }

        /* Fullscreen Loader */
        #pageLoader {
            position: fixed;
            inset: 0;
            background: #000;
            z-index: 9999;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            gap: 18px;
            opacity: 1;
            transition: opacity 0.35s ease, visibility 0.35s ease;
        }

        #pageLoader.is-hidden {
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
        }

        .loader-ring {
            position: relative;
            width: 74px;
            height: 74px;
            border-radius: 9999px;
            border: 3px solid rgba(255, 255, 255, 0.15);
            border-top-color: #fff;
            animation: loaderSpin 0.95s linear infinite;
        }

        .loader-ring::after {
            content: "";
            position: absolute;
            inset: 10px;
            border-radius: 9999px;
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-bottom-color: #fff;
            animation: loaderSpinReverse 1.35s linear infinite;
        }

        .loader-text {
            font-size: 13px;
            letter-spacing: 0.28em;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.92);
            font-weight: 600;
            animation: loaderTextPulse 1.8s ease-in-out infinite;
        }

        .loader-text::after {
            content: "...";
            display: inline-block;
            width: 0;
            overflow: hidden;
            vertical-align: bottom;
            animation: loaderDots 1.1s steps(4, end) infinite;
        }

        @keyframes loaderSpin {
            0% {
                transform: rotate(0deg);
            }
            100% {
                transform: rotate(360deg);
            }
        }

        @keyframes loaderSpinReverse {
            0% {
                transform: rotate(360deg);
            }
            100% {
                transform: rotate(0deg);
            }
        }

        @keyframes loaderTextPulse {
            0%,
            100% {
                opacity: 0.45;
                letter-spacing: 0.24em;
            }
            50% {
                opacity: 1;
                letter-spacing: 0.32em;
            }
        }

        @keyframes loaderDots {
            0% {
                width: 0;
            }
            100% {
                width: 3ch;
            }
        }

        .messages-loading {
            position: relative;
            margin: 0 auto;
            width: min(100%, 380px);
            min-height: 250px;
            border-radius: 24px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 0.7rem;
            text-align: center;
            isolation: isolate;
        }

        #messagesList.messages-list-loading {
            min-height: calc(100dvh - 340px);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .messages-loading__halo {
            position: absolute;
            inset: 22% 10% 26%;
            border-radius: 999px;
            background:
                radial-gradient(circle at 30% 35%, rgba(148, 26, 92, 0.3), rgba(148, 26, 92, 0) 62%),
                radial-gradient(circle at 68% 70%, rgba(99, 16, 61, 0.28), rgba(99, 16, 61, 0) 58%),
                linear-gradient(135deg, rgba(17, 23, 34, 0.58), rgba(10, 14, 22, 0.25));
            filter: blur(22px);
            opacity: 0.85;
            z-index: 0;
        }

        .messages-loading__rings {
            position: relative;
            width: 86px;
            height: 86px;
            z-index: 1;
        }

        .messages-loading__ring {
            position: absolute;
            inset: 0;
            border-radius: 999px;
            border: 2px solid transparent;
            animation: message-ring-spin 1.15s linear infinite;
            box-shadow: 0 0 18px rgba(148, 26, 92, 0.24);
        }

        .messages-loading__ring--one {
            border-top-color: rgba(194, 42, 124, 0.95);
            border-right-color: rgba(194, 42, 124, 0.34);
        }

        .messages-loading__ring--two {
            inset: 10px;
            border-left-color: rgba(148, 26, 92, 0.9);
            border-bottom-color: rgba(148, 26, 92, 0.32);
            animation-duration: 1.7s;
            animation-direction: reverse;
        }

        .messages-loading__ring--three {
            inset: 22px;
            border-top-color: rgba(99, 16, 61, 0.92);
            border-left-color: rgba(99, 16, 61, 0.3);
            animation-duration: 2.2s;
        }

        .messages-loading__label {
            z-index: 1;
            font-size: 12px;
            letter-spacing: 0.2em;
            text-transform: uppercase;
            font-weight: 700;
            color: rgba(232, 240, 253, 0.95);
            animation: loaderTextPulse 1.8s ease-in-out infinite;
        }

        .messages-loading__sub {
            z-index: 1;
            font-size: 11px;
            letter-spacing: 0.05em;
            color: rgba(161, 173, 194, 0.84);
        }

        @keyframes message-ring-spin {
            0% {
                transform: rotate(0deg) scale(0.96);
                opacity: 0.58;
            }
            50% {
                transform: rotate(180deg) scale(1);
                opacity: 1;
            }
            100% {
                transform: rotate(360deg) scale(0.96);
                opacity: 0.58;
            }
        }

        .filter-chip {
            padding: 0.35rem 0.6rem;
            border-radius: 9999px;
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.18em;
            color: rgba(228, 232, 240, 0.9);
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.12);
            transition: all 0.2s ease;
        }

        .filter-chip:hover {
            color: #fff;
            border-color: rgba(255, 255, 255, 0.25);
        }

        .filter-chip.is-active {
            color: #fff;
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(99, 102, 241, 0.18));
            border-color: rgba(99, 102, 241, 0.5);
            box-shadow: 0 0 18px rgba(99, 102, 241, 0.3);
        }

        .sort-dropdown-control {
            min-height: 30px;
            border-radius: 999px;
            padding: 0.38rem 0.8rem;
            border: 1px solid rgba(255, 255, 255, 0.14);
            background: rgba(255, 255, 255, 0.035);
            color: rgba(226, 232, 240, 0.86);
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.03em;
            transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }

        .sort-dropdown-control:hover {
            color: #fff;
            border-color: rgba(255, 255, 255, 0.28);
            background: rgba(255, 255, 255, 0.055);
        }

        .sort-dropdown-control:focus-visible {
            outline: none;
            border-color: rgba(99, 102, 241, 0.6);
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
        }

        .dm-sort-button {
            min-width: 128px;
            justify-content: space-between;
        }

        .dm-sort-button[aria-expanded="true"] {
            color: #fff;
            border-color: rgba(99, 102, 241, 0.56);
            background: rgba(99, 102, 241, 0.12);
            box-shadow: 0 10px 24px rgba(7, 14, 24, 0.42);
        }

        .dm-sort-menu {
            min-width: 176px;
            padding: 0.4rem;
            border-radius: 14px;
            background: rgba(10, 14, 22, 0.96);
            border: 1px solid rgba(255, 255, 255, 0.12);
            box-shadow: 0 16px 36px rgba(4, 8, 16, 0.52);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
        }

        .dm-sort-option {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            padding: 0.52rem 0.72rem;
            border-radius: 10px;
            border: 1px solid transparent;
            font-size: 12px;
            font-weight: 600;
            color: rgba(226, 232, 240, 0.78);
            transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
        }

        .dm-sort-option:hover {
            color: #fff;
            background: rgba(255, 255, 255, 0.07);
        }

        .dm-sort-option.is-active {
            color: #fff;
            background: rgba(99, 102, 241, 0.14);
            border-color: rgba(99, 102, 241, 0.45);
        }

        .all-users-sort-wrap {
            border-radius: 999px;
            background: linear-gradient(140deg, rgba(99, 102, 241, 0.09), rgba(255, 255, 255, 0.01));
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
            transition: box-shadow 0.2s ease, background 0.2s ease;
        }

        .all-users-sort-wrap:focus-within {
            background: linear-gradient(140deg, rgba(99, 102, 241, 0.16), rgba(255, 255, 255, 0.015));
            box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.09);
        }

        .all-users-sort-select {
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            border-color: rgba(255, 255, 255, 0.16);
            background: transparent;
            padding-left: 0.78rem;
            padding-right: 1.8rem;
            cursor: pointer;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.04em;
        }

        .all-users-sort-select option {
            background: #0d1320;
            color: rgba(234, 242, 255, 0.96);
        }

        .all-users-sort-chevron {
            position: absolute;
            right: 0.7rem;
            top: 50%;
            transform: translateY(-50%);
            color: rgba(226, 232, 240, 0.68);
            pointer-events: none;
            transition: color 0.2s ease, transform 0.2s ease;
        }

        .all-users-sort-wrap:hover .all-users-sort-chevron,
        .all-users-sort-wrap:focus-within .all-users-sort-chevron {
            color: rgba(226, 232, 240, 0.96);
            transform: translateY(-50%) scale(1.05);
        }

        /* Quick Action Buttons */
        #quickActionButtons .quick-action-btn {
            position: relative;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.12) !important;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.018)) !important;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 8px 20px rgba(0, 0, 0, 0.24);
            transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
        }

        #quickActionButtons .quick-action-btn::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(99, 102, 241, 0.08));
            opacity: 0;
            transition: opacity 0.25s ease;
        }

        #quickActionButtons .quick-action-btn:hover {
            transform: translateY(-1px);
            border-color: rgba(99, 102, 241, 0.45) !important;
            box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(99, 102, 241, 0.18);
        }

        #quickActionButtons .quick-action-btn:hover::before {
            opacity: 1;
        }

        #quickActionButtons .quick-action-btn:active {
            transform: scale(0.98);
        }

        /* Shop Item Styles */
        .shop-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1rem;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 12px;
            margin-bottom: 0.5rem;
        }

        .shop-item:hover {
            background: rgba(255, 255, 255, 0.05);
            border-color: rgba(255, 255, 255, 0.1);
        }

        .shop-message {
            position: relative;
            background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.18), transparent 55%),
                linear-gradient(135deg, rgba(12, 18, 28, 0.9), rgba(10, 14, 22, 0.96));
            border: 1px solid rgba(99, 102, 241, 0.28);
            border-radius: 22px;
            padding: 1.1rem;
            overflow: hidden;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 14px 35px rgba(6, 16, 26, 0.45);
        }

        .shop-message::before {
            content: '';
            position: absolute;
            top: -60px;
            right: -40px;
            width: 180px;
            height: 180px;
            background: radial-gradient(circle, rgba(99, 102, 241, 0.25), transparent 70%);
            opacity: 0.6;
            pointer-events: none;
        }

        .shop-message__header {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            position: relative;
            z-index: 1;
        }

        .shop-message__icon {
            width: 40px;
            height: 40px;
            border-radius: 14px;
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(74, 111, 227, 0.18));
            border: 1px solid rgba(99, 102, 241, 0.35);
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 8px 18px rgba(99, 102, 241, 0.2);
        }

        .shop-message__title {
            font-size: 0.9rem;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #e2f8f5;
        }

        .shop-message__badge {
            margin-left: auto;
            padding: 0.3rem 0.6rem;
            border-radius: 999px;
            font-size: 0.65rem;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #0d1a18;
            background: linear-gradient(135deg, #818cf8, #6366f1);
            box-shadow: 0 6px 14px rgba(99, 102, 241, 0.25);
        }

        .shop-message__desc {
            margin-top: 0.75rem;
            font-size: 0.85rem;
            line-height: 1.5;
            color: rgba(226, 232, 240, 0.75);
        }

        .shop-message__list {
            margin-top: 0.9rem;
            padding: 0.85rem;
            border-radius: 16px;
            background: rgba(8, 12, 20, 0.6);
            border: 1px solid rgba(255, 255, 255, 0.06);
        }

        .shop-message__list-title {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            font-size: 0.7rem;
            font-weight: 700;
            letter-spacing: 0.18em;
            text-transform: uppercase;
            color: rgba(148, 163, 184, 0.9);
        }

        .shop-message__items {
            margin-top: 0.6rem;
            display: grid;
            gap: 0.45rem;
        }

        .shop-message__item {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.82rem;
            color: rgba(241, 245, 249, 0.92);
        }

        .shop-message__dot {
            width: 8px;
            height: 8px;
            border-radius: 999px;
            background: linear-gradient(135deg, #818cf8, #6366f1);
            box-shadow: 0 0 8px rgba(99, 102, 241, 0.6);
            flex-shrink: 0;
        }

        .shop-message__empty {
            font-size: 0.8rem;
            color: rgba(148, 163, 184, 0.7);
            font-style: italic;
        }

        .shop-message__footer {
            margin-top: 1rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
        }

        .shop-message__starter {
            font-size: 0.7rem;
            color: rgba(148, 163, 184, 0.7);
            letter-spacing: 0.05em;
            text-transform: uppercase;
        }

        .shop-message__cta {
            padding: 0.6rem 1rem;
            border-radius: 999px;
            font-size: 0.72rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: #f8fafc;
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.85), rgba(74, 111, 227, 0.85));
            border: 1px solid rgba(99, 102, 241, 0.4);
            box-shadow: 0 8px 18px rgba(99, 102, 241, 0.3);
            transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
        }

        .shop-message__cta:hover {
            transform: translateY(-1px);
            box-shadow: 0 12px 26px rgba(99, 102, 241, 0.35);
        }

        .shop-message.is-closed {
            opacity: 0.85;
        }

        .shop-message.is-closed .shop-message__badge {
            background: linear-gradient(135deg, rgba(148, 163, 184, 0.7), rgba(100, 116, 139, 0.7));
            color: #0b0f16;
            box-shadow: none;
        }

        .shop-message__cta[disabled] {
            opacity: 0.5;
            cursor: not-allowed;
            box-shadow: none;
            transform: none;
        }

        .brief-message {
            position: relative;
            padding: 1.25rem 1.4rem;
            border-radius: 22px;
            background:
                radial-gradient(circle at 15% 20%, rgba(224, 139, 61, 0.22), transparent 45%),
                radial-gradient(circle at 85% 80%, rgba(74, 111, 227, 0.18), transparent 45%),
                linear-gradient(135deg, rgba(20, 16, 24, 0.92), rgba(12, 16, 24, 0.98));
            border: 1px solid rgba(224, 139, 61, 0.35);
            box-shadow: 0 18px 40px rgba(8, 12, 20, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.04);
            overflow: hidden;
            text-align: left;
            animation: brief-glow 3s ease-in-out infinite;
        }

        .brief-message::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(120deg, rgba(224, 139, 61, 0.2), rgba(99, 102, 241, 0.08), transparent 70%);
            opacity: 0.35;
            pointer-events: none;
        }

        .brief-message__badge {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.35rem 0.7rem;
            border-radius: 999px;
            font-size: 0.65rem;
            font-weight: 700;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: #1b1106;
            background: linear-gradient(135deg, #6366f1, #818cf8);
            box-shadow: 0 8px 16px rgba(224, 139, 61, 0.35);
        }

        .brief-message__title {
            margin-top: 0.7rem;
            font-size: 1.05rem;
            font-weight: 700;
            color: #f8fafc;
        }

        .brief-message__body {
            margin-top: 0.4rem;
            font-size: 0.9rem;
            color: rgba(226, 232, 240, 0.78);
        }

        .brief-message__meta {
            margin-top: 0.9rem;
            display: flex;
            align-items: center;
            gap: 0.6rem;
            font-size: 0.75rem;
            color: rgba(148, 163, 184, 0.85);
            text-transform: uppercase;
            letter-spacing: 0.12em;
        }

        .promo-message {
            position: relative;
            overflow: hidden;
            padding: 18px 20px;
            border-radius: 20px;
            border: 1px solid rgba(255, 255, 255, 0.14);
            background:
                radial-gradient(140px circle at 10% 10%, rgba(255, 255, 255, 0.16), transparent 55%),
                radial-gradient(220px circle at 90% 0%, rgba(99, 102, 241, 0.22), transparent 60%),
                linear-gradient(135deg, rgba(30, 44, 64, 0.92), rgba(14, 20, 30, 0.98));
            box-shadow: 0 18px 40px rgba(2, 6, 23, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
        }

        .promo-message::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(120deg, rgba(99, 102, 241, 0.16), transparent 55%);
            opacity: 0.8;
            pointer-events: none;
        }

        .promo-message__badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px;
            border-radius: 999px;
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 0.2em;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.92);
            background: rgba(12, 16, 24, 0.7);
            border: 1px solid rgba(255, 255, 255, 0.18);
            box-shadow: 0 6px 16px rgba(2, 6, 23, 0.35);
        }

        .promo-message__title {
            margin-top: 10px;
            font-size: 17px;
            font-weight: 700;
            color: rgba(248, 250, 252, 0.98);
        }

        .promo-message__body {
            margin-top: 8px;
            font-size: 13px;
            line-height: 1.55;
            color: rgba(226, 232, 240, 0.78);
        }

        .promo-message__meta {
            margin-top: 12px;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            font-size: 10px;
            color: rgba(148, 163, 184, 0.8);
            text-transform: uppercase;
            letter-spacing: 0.16em;
        }

        .system-log {
            position: relative;
            border-radius: 18px;
            padding: 10px 12px;
            overflow: hidden;
            user-select: none;
            -webkit-user-select: none;
            border: 1px solid rgba(255, 255, 255, 0.08);
            box-shadow: 0 18px 40px rgba(6, 10, 20, 0.6);
        }

        .system-log::before {
            content: '';
            position: absolute;
            inset: 0;
            opacity: 0.35;
            border-radius: 18px;
            background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.1), transparent 55%);
            pointer-events: none;
        }

        .system-log__badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-size: 10px;
            letter-spacing: 0.2em;
            text-transform: uppercase;
            font-weight: 700;
        }

        .system-log__title {
            margin-top: -2px;
            font-size: 11px;
            font-weight: 600;
            color: rgba(248, 250, 252, 0.95);
        }

        .system-log__meta {
            margin-top: 5px;
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            font-size: 11px;
            color: rgba(226, 232, 240, 0.75);
        }

        .system-log__pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            background: rgba(255, 255, 255, 0.04);
        }

        .system-log--hover-meta {
            overflow: visible;
        }

        .system-log__meta--floating {
            position: absolute;
            left: 0;
            bottom: calc(100% + 10px);
            width: max-content;
            min-width: 240px;
            max-width: min(620px, calc(100vw - 24px));
            margin-top: 0;
            padding: 11px;
            border-radius: 12px;
            border: 1px solid rgba(148, 163, 184, 0.3);
            background: rgba(7, 10, 18, 0.985);
            color: rgba(241, 245, 249, 0.98);
            box-shadow: 0 20px 42px rgba(2, 6, 23, 0.72);
            backdrop-filter: blur(6px);
            display: flex;
            flex-wrap: nowrap;
            gap: 8px;
            align-items: center;
            overflow-x: auto;
            overflow-y: hidden;
            opacity: 0;
            pointer-events: none;
            transform: translateY(6px);
            transition: opacity 0.2s ease, transform 0.2s ease;
            z-index: 120;
        }

        .system-log__meta--floating::before {
            content: '';
            position: absolute;
            left: 16px;
            top: 100%;
            border-width: 6px;
            border-style: solid;
            border-color: rgba(148, 163, 184, 0.32) transparent transparent transparent;
        }

        .system-log__meta--floating::after {
            content: '';
            position: absolute;
            left: 16px;
            top: calc(100% - 1px);
            border-width: 6px;
            border-style: solid;
            border-color: rgba(7, 10, 18, 0.985) transparent transparent transparent;
        }

        .system-log__meta--floating .system-log__pill {
            flex: 0 0 auto;
            white-space: nowrap;
            border-color: rgba(148, 163, 184, 0.35);
            background: rgba(15, 23, 42, 0.9);
            color: rgba(241, 245, 249, 0.98);
        }

        .system-log--hover-meta:hover .system-log__meta--floating,
        .system-log--hover-meta:focus-within .system-log__meta--floating {
            opacity: 1;
            pointer-events: auto;
            transform: translateY(0);
        }

        .system-log--break {
            border-color: rgba(99, 102, 241, 0.35);
        }

        .system-log--break::after {
            content: '';
            position: absolute;
            inset: -60%;
            opacity: 0.7;
            pointer-events: none;
        }

        .system-log--break .system-log__badge {
            color: rgba(99, 102, 241, 0.9);
        }

        .system-log--shift {
            border-color: rgba(74, 111, 227, 0.35);
        }

        .system-log--shift::after {
            content: '';
            position: absolute;
            inset: -60%;
            opacity: 0.7;
            pointer-events: none;
        }

        .system-log--shift .system-log__badge {
            color: rgba(129, 140, 248, 0.95);
        }

        .new-message-indicator {
            position: absolute;
            left: 50%;
            bottom: 22px;
            transform: translateX(-50%);
            z-index: 25;
            padding: 10px 16px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            background: rgba(13, 18, 28, 0.92);
            color: rgba(255, 255, 255, 0.9);
            font-size: 12px;
            font-weight: 600;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            box-shadow: 0 10px 24px rgba(3, 7, 18, 0.45);
        }

        .debug-panel {
            position: fixed;
            right: 16px;
            bottom: 16px;
            width: min(520px, 92vw);
            max-height: 70vh;
            flex-direction: column;
            gap: 10px;
            padding: 14px;
            border-radius: 16px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(10, 14, 22, 0.96);
            box-shadow: 0 20px 40px rgba(5, 8, 16, 0.6);
            z-index: 200;
        }

        .debug-panel__header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }

        .debug-panel__title {
            font-size: 12px;
            letter-spacing: 0.2em;
            text-transform: uppercase;
            color: rgba(226, 232, 240, 0.7);
            font-weight: 700;
        }

        .debug-panel__actions {
            display: inline-flex;
            gap: 6px;
        }

        .debug-panel__btn {
            padding: 6px 10px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            background: rgba(255, 255, 255, 0.04);
            color: rgba(226, 232, 240, 0.8);
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.16em;
        }

        .debug-panel__log {
            overflow-y: auto;
            max-height: 55vh;
            padding-right: 4px;
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
            font-size: 11px;
            line-height: 1.5;
            color: rgba(226, 232, 240, 0.78);
        }

        .debug-panel__item {
            display: flex;
            gap: 8px;
            padding: 6px 0;
            border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
        }

        .debug-panel__time {
            color: rgba(148, 163, 184, 0.7);
            min-width: 78px;
        }

        .debug-panel__level {
            min-width: 52px;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            font-size: 10px;
        }

        .debug-panel__level--warn {
            color: rgba(251, 191, 36, 0.9);
        }

        .debug-panel__level--error {
            color: rgba(244, 63, 94, 0.9);
        }

        .debug-panel__footer {
            font-size: 10px;
            color: rgba(148, 163, 184, 0.6);
        }

        .system-log--membership {
            border-color: rgba(148, 163, 184, 0.25);
            box-shadow: 0 12px 26px rgba(6, 10, 20, 0.35);
            text-align: center;
        }

        .system-log--membership .system-log__title {
            margin-top: 0;
            font-size: 14px;
            font-weight: 600;
            color: rgba(226, 232, 240, 0.9);
        }

        .system-log--membership .system-log__meta {
            margin-top: 6px;
            justify-content: center;
            font-size: 10px;
            letter-spacing: 0.18em;
            text-transform: uppercase;
            color: rgba(148, 163, 184, 0.8);
        }

        @keyframes brief-glow {

            0%,
            100% {
                box-shadow: 0 18px 40px rgba(8, 12, 20, 0.6), 0 0 0 0 rgba(99, 102, 241, 0.3);
            }

            50% {
                box-shadow: 0 18px 40px rgba(8, 12, 20, 0.6), 0 0 0 10px rgba(99, 102, 241, 0);
            }
        }

        /* Ripple Effect */
        .ripple {
            position: relative;
            overflow: hidden;
        }

        .ripple-effect {
            position: absolute;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            animation: ripple 0.6s ease-out;
            pointer-events: none;
        }

      /* Premium Button */
.btn-premium {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.85), rgba(99, 102, 241, 0.75));
    border: 1px solid rgba(129, 140, 248, 0.35);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.btn-premium:hover {
    transform: translateY(-1px);
    border-color: rgba(129, 140, 248, 0.55);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.3);
}


        /* Chat Composer */
        #chatInputContainer {
            position: relative;
        }

        .chat-composer-shell {
            position: relative;
            border-radius: 24px;
        }

        .chat-composer-shell.holo-border::before {
            opacity: 0.95;
            background: linear-gradient(135deg, rgba(129, 140, 248, 0.32), rgba(99, 102, 241, 0.08) 45%, rgba(255, 255, 255, 0.1));
        }

        .chat-composer-shell::after {
            content: '';
            position: absolute;
            inset: -8px;
            border-radius: 30px;
            background:
                radial-gradient(420px 90px at 15% 50%, rgba(129, 140, 248, 0.16), transparent 70%),
                radial-gradient(360px 80px at 85% 50%, rgba(56, 189, 248, 0.1), transparent 70%);
            opacity: 0.55;
            filter: blur(18px);
            pointer-events: none;
            z-index: -1;
        }

        .chat-composer {
            background:
                linear-gradient(180deg, rgba(15, 20, 30, 0.96), rgba(8, 11, 18, 0.97)),
                radial-gradient(140% 100% at 0% 0%, rgba(99, 102, 241, 0.15), transparent 60%);
            border: 1px solid rgba(148, 163, 184, 0.2);
            box-shadow:
                inset 0 1px 0 rgba(255, 255, 255, 0.08),
                inset 0 -1px 0 rgba(255, 255, 255, 0.03),
                0 20px 48px rgba(2, 6, 23, 0.55);
        }

        .chat-composer.input-glow:focus-within {
            border-color: rgba(129, 140, 248, 0.52);
            box-shadow:
                0 0 0 1px rgba(129, 140, 248, 0.35),
                0 22px 48px rgba(8, 10, 32, 0.58),
                0 0 35px rgba(99, 102, 241, 0.25);
        }

        @keyframes input-border-flow {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        @keyframes input-breathe {
            0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 24px rgba(2, 6, 23, 0.2); }
            50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 28px rgba(2, 6, 23, 0.24), 0 0 16px rgba(99, 102, 241, 0.06); }
        }

        .chat-composer-textarea {
            color: rgba(248, 250, 252, 0.99);
            caret-color: rgba(165, 180, 252, 0.98);
            text-shadow: none;
            letter-spacing: 0.012em;
            font-size: 15px;
            line-height: 1.7;
            padding: 20px 24px !important;
            min-height: 64px;
            border-radius: 0;
            border: none;
            background: transparent;
            box-shadow: none;
            transition:
                caret-color 0.4s ease;
            animation: input-breathe 5s ease-in-out infinite;
        }

        .chat-composer:focus-within .chat-composer-textarea {
            animation: none;
            box-shadow: none;
        }

        .chat-composer.input-glow:focus-within {
            border-image: linear-gradient(
                90deg,
                rgba(129, 140, 248, 0.55),
                rgba(56, 189, 248, 0.45),
                rgba(139, 92, 246, 0.55),
                rgba(129, 140, 248, 0.55)
            ) 1;
            border-image: none;
            border-color: rgba(129, 140, 248, 0.52);
            box-shadow:
                0 0 0 1px rgba(129, 140, 248, 0.35),
                0 22px 48px rgba(8, 10, 32, 0.58),
                0 0 35px rgba(99, 102, 241, 0.2),
                0 0 80px rgba(99, 102, 241, 0.08);
        }

        .chat-composer-textarea::placeholder {
            color: rgba(148, 163, 184, 0.5);
            font-style: italic;
            letter-spacing: 0.025em;
            transition: opacity 0.3s ease, color 0.3s ease;
        }

        .chat-composer-textarea:focus::placeholder {
            opacity: 0.3;
            color: rgba(165, 180, 252, 0.5);
        }

        #messageInput::selection {
            background: rgba(99, 102, 241, 0.35);
            color: #fff;
        }

        #messageInput::-webkit-scrollbar { width: 5px; }
        #messageInput::-webkit-scrollbar-track { background: transparent; }
        #messageInput::-webkit-scrollbar-thumb {
            border-radius: 999px;
            background: linear-gradient(180deg, rgba(129, 140, 248, 0.45), rgba(56, 189, 248, 0.35));
        }

        .chat-composer-recording {
            border-top: 1px solid rgba(148, 163, 184, 0.14);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.008));
        }

        .chat-composer-actions {
            border-top: 1px solid rgba(148, 163, 184, 0.14);
            padding-top: 0.9rem;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.012), rgba(255, 255, 255, 0));
        }

        .chat-composer-tools {
            gap: 0.45rem;
        }

        .composer-tool-btn {
            border: 1px solid rgba(148, 163, 184, 0.22);
            background: linear-gradient(180deg, rgba(30, 41, 59, 0.5), rgba(15, 23, 42, 0.3));
            color: rgba(226, 232, 240, 0.82);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
            transition: transform 0.22s var(--ease-smooth), border-color 0.22s var(--ease-smooth), color 0.22s var(--ease-smooth), background 0.22s var(--ease-smooth), box-shadow 0.22s var(--ease-smooth);
        }

        .composer-tool-btn:hover {
            transform: translateY(-1px);
            border-color: rgba(129, 140, 248, 0.52);
            color: rgba(255, 255, 255, 0.97);
            background: linear-gradient(180deg, rgba(79, 70, 229, 0.22), rgba(30, 64, 175, 0.18));
            box-shadow: 0 6px 16px rgba(30, 41, 59, 0.35);
        }

        .composer-tool-btn:active {
            transform: scale(0.97);
        }

        .composer-tool-btn[disabled] {
            opacity: 0.45;
            cursor: not-allowed;
        }

        .composer-stop-btn {
            border: 1px solid rgba(244, 63, 94, 0.38);
            background: rgba(244, 63, 94, 0.12) !important;
            color: rgba(254, 205, 211, 0.95) !important;
            transition: background 0.22s var(--ease-smooth), border-color 0.22s var(--ease-smooth), transform 0.2s var(--ease-smooth);
        }

        .composer-stop-btn:hover {
            background: rgba(244, 63, 94, 0.18) !important;
            border-color: rgba(251, 113, 133, 0.45);
            transform: translateY(-1px);
        }

        .composer-secondary-btn {
            border: 1px solid rgba(255, 255, 255, 0.14) !important;
            background: rgba(255, 255, 255, 0.03) !important;
            color: rgba(212, 212, 216, 0.92) !important;
            transition: border-color 0.22s var(--ease-smooth), background 0.22s var(--ease-smooth), transform 0.2s var(--ease-smooth);
        }

        .composer-secondary-btn:hover {
            border-color: rgba(255, 255, 255, 0.24) !important;
            background: rgba(255, 255, 255, 0.08) !important;
            transform: translateY(-1px);
        }

        .composer-recording-send-btn {
            border: 1px solid rgba(255, 255, 255, 0.2);
            background: linear-gradient(180deg, rgba(42, 49, 62, 0.96), rgba(31, 37, 48, 0.96)) !important;
            box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
            transition: transform 0.2s var(--ease-smooth), box-shadow 0.22s var(--ease-smooth), border-color 0.22s var(--ease-smooth);
        }

        .composer-recording-send-btn:hover {
            transform: translateY(-1px);
            border-color: rgba(255, 255, 255, 0.3);
            box-shadow: 0 10px 18px rgba(0, 0, 0, 0.32);
        }

        .chat-composer .rec-dot {
            background: rgba(251, 113, 133, 0.95);
            box-shadow: 0 0 8px rgba(251, 113, 133, 0.45);
        }

        /* Chat Send Button */
        .send-btn {
            border-radius: 14px;
            isolation: isolate;
            transition: transform 0.2s var(--ease-smooth);
        }

        .send-btn-glow {
            inset: -3px;
            border-radius: 16px;
            background: linear-gradient(120deg, rgba(129, 140, 248, 0.42), rgba(14, 165, 233, 0.28), rgba(99, 102, 241, 0.42));
            filter: blur(10px);
            opacity: 0.55;
            transition: opacity 0.24s var(--ease-smooth), filter 0.24s var(--ease-smooth);
            pointer-events: none;
            z-index: 0;
        }

        .send-btn-face {
            background:
                linear-gradient(135deg, #4f46e5 0%, #6366f1 45%, #3b82f6 100%);
            border: 1px solid rgba(165, 180, 252, 0.5);
            box-shadow:
                inset 0 1px 0 rgba(255, 255, 255, 0.28),
                0 10px 24px rgba(49, 46, 129, 0.45);
            transition: transform 0.22s var(--ease-smooth), box-shadow 0.22s var(--ease-smooth), border-color 0.22s var(--ease-smooth), background 0.22s var(--ease-smooth);
            position: relative;
            z-index: 1;
            overflow: hidden;
        }

        .send-btn-face::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(120deg, transparent 10%, rgba(255, 255, 255, 0.24) 42%, transparent 68%);
            transform: translateX(-120%);
            transition: transform 0.55s var(--ease-smooth);
            pointer-events: none;
        }

        .send-btn:hover .send-btn-glow {
            opacity: 0.82;
            filter: blur(12px);
        }

        .send-btn:hover .send-btn-face {
            transform: translateY(-1px);
            border-color: rgba(199, 210, 254, 0.78);
            box-shadow:
                inset 0 1px 0 rgba(255, 255, 255, 0.32),
                0 14px 28px rgba(55, 48, 163, 0.5);
        }

        .send-btn:hover .send-btn-face::after {
            transform: translateX(120%);
        }

        .send-btn:active .send-btn-face {
            transform: translateY(0) scale(0.98);
            transition-duration: 0.12s;
        }

        .send-btn:focus-visible .send-btn-face {
            outline: none;
            box-shadow: 0 0 0 2px rgba(228, 228, 231, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 18px rgba(0, 0, 0, 0.35);
        }

        @media (max-width: 640px) {
            .chat-composer-textarea {
                font-size: 14.5px;
                min-height: 56px;
                padding: 16px 18px !important;
            }

            .chat-composer-actions {
                padding-left: 0.65rem;
                padding-right: 0.65rem;
                padding-bottom: 0.8rem;
            }

            .chat-composer-tools {
                gap: 0.3rem;
            }

            .send-btn-face {
                padding: 0.65rem 0.9rem !important;
            }
        }

        /* Notification Badge */
        .notification-badge {
            animation: bounce-subtle 2s ease-in-out infinite;
            background: #dc2626 !important;
            border: 1px solid #ef4444 !important;
            color: #ffffff !important;
            box-shadow: 0 8px 16px rgba(127, 29, 29, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
        }

        /* Message Read Receipt */
        .read-receipt {
            position: relative;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 11px;
            letter-spacing: 0.01em;
            transition: all 0.3s ease;
        }

        .read-receipt.delivered {
            color: rgba(148, 163, 184, 0.9);
        }

        .read-receipt.read {
            color: #818cf8;
        }

        .read-receipt.sent {
            color: rgba(148, 163, 184, 0.7);
        }

        .read-receipt.sending {
            color: rgba(148, 163, 184, 0.6);
        }

        .read-receipt.failed {
            color: #fb7185;
        }

        .message-receipt-row {
            margin-top: 6px;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            min-height: 14px;
        }

        .chat-header button{
            height: min-content;
            align-self: center;
        }

        .receipt-icon {
            width: 14px;
            height: 14px;
            display: inline-flex;
        }

        .receipt-icon svg {
            width: 14px;
            height: 14px;
            display: block;
        }

        .receipt-spinner {
            width: 12px;
            height: 12px;
            border: 2px solid rgba(148, 163, 184, 0.3);
            border-top-color: rgba(148, 163, 184, 0.9);
            border-radius: 999px;
            animation: spin 0.9s linear infinite;
        }

        .receipt-label {
            font-weight: 600;
            text-transform: uppercase;
            font-size: 9px;
            letter-spacing: 0.22em;
        }

        .receipt-sep { 
            font-size: 25px;
            font-style: bold;
            margin: 0 4px;
        }

        .receipt-timestamp {
            font-size: 10px;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: rgba(148, 163, 184, 0.75);
        }

        .receipt-avatar {
            width: 14px;
            height: 14px;
            border-radius: 999px;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 2px 6px rgba(2, 6, 16, 0.3);
        }

        .receipt-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .read-receipt.has-readers {
            cursor: pointer;
        }

        .receipt-tooltip {
            position: absolute;
            right: 0;
            bottom: calc(100% + 10px);
            min-width: 220px;
            max-width: 320px;
            max-height: 240px;
            overflow-y: auto;
            background: rgba(10, 13, 20, 0.96);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 14px;
            padding: 10px;
            box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
            opacity: 0;
            pointer-events: none;
            transform: translateY(6px);
            transition: opacity 0.2s ease, transform 0.2s ease;
            z-index: 120;
        }

        .read-receipt.has-readers:hover .receipt-tooltip {
            opacity: 1;
            pointer-events: auto;
            transform: translateY(0);
        }

        .receipt-tooltip__title {
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.2em;
            color: rgba(148, 163, 184, 0.8);
            margin-bottom: 8px;
        }

        .receipt-tooltip__list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .receipt-user {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .receipt-user-avatar {
            width: 22px;
            height: 22px;
            border-radius: 999px;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.15);
            box-shadow: 0 2px 6px rgba(2, 6, 16, 0.35);
        }

        .receipt-user-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .receipt-user-name {
            font-size: 12px;
            color: rgba(226, 232, 240, 0.92);
            font-weight: 600;
        }

        .receipt-user-time {
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: rgba(148, 163, 184, 0.65);
        }

        .message-read-avatars {
            position: relative;
            margin-top: 6px;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            pointer-events: auto;
            overflow: visible;
        }

        .message-read-avatars.is-start {
            justify-content: flex-start;
        }

        .message-read-avatars.is-end {
            justify-content: flex-end;
        }

        .message-read-avatars.is-start .receipt-tooltip {
            left: 0;
            right: auto;
            transform-origin: left bottom;
        }

        .message-read-avatars.is-end .receipt-tooltip {
            right: 0;
            left: auto;
            transform-origin: right bottom;
        }

        .receipt-avatar-stack {
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .receipt-avatar-item {
            width: 20px;
            height: 20px;
            border-radius: 999px;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.15);
            box-shadow: 0 2px 6px rgba(2, 6, 16, 0.35);
        }

        .receipt-avatar-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .receipt-more {
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.14em;
            color: rgba(148, 163, 184, 0.7);
            background: rgba(15, 18, 26, 0.65);
            border: 1px solid rgba(148, 163, 184, 0.2);
            padding: 4px 8px;
            border-radius: 999px;
        }

        .message-read-avatars:hover .receipt-tooltip {
            opacity: 1;
            pointer-events: auto;
            transform: translateY(0);
        }

        .mention-highlight {
            background: rgba(99, 102, 241, 0.3);
            color: #c7d2fe;
            padding: 0 2px;
            border-radius: 4px;
            font-weight: 600;
        }

        .mention-autocomplete {
            max-height: 240px;
            overflow-y: auto;
            border-radius: 16px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(10, 12, 18, 0.92);
            backdrop-filter: blur(16px);
            box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
        }

        .mention-autocomplete button.is-selected {
            background: rgba(255, 255, 255, 0.08);
        }

        /* Image Preview */
        .image-preview {
            transition: all 0.3s ease;
        }

        .image-preview:hover {
            transform: scale(1.02);
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
        }

        /* Unread Indicator */
        .unread-dot {
            width: 8px;
            height: 8px;
            background: linear-gradient(135deg, #818cf8, #6366f1);
            border-radius: 50%;
            box-shadow: 0 0 10px rgba(99, 102, 241, 0.35);
            animation: breathe 2s ease-in-out infinite;
        }

        @media (prefers-reduced-motion: reduce) {

            *,
            *::before,
            *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
                scroll-behavior: auto !important;
            }
        }

        .main-surface {
            background: #09090b;
        }

        /* hierarchy + accessibility pass */
        :root {
            --accent-primary: #818cf8;
            --accent-status: #34d399;
            --accent-muted: #a1a1aa;
            --accent-border-crisp: rgba(255, 255, 255, 0.1);
            --focus-ring: rgba(99, 102, 241, 0.7);
            --focus-ring-shadow: rgba(99, 102, 241, 0.25);
            --message-stagger-step: 24ms;
        }

        /* clean subtle borders */
        .glass-card,
        .glass-subtle,
        .glass-ultra {
            border-color: rgba(255, 255, 255, 0.08);
        }

        #headerIconContainer > .absolute {
            opacity: 0.2 !important;
            filter: blur(10px) !important;
        }

        /* section headers with micro-label and divider rhythm */
        #rightSidebarTitle.section-kicker {
            position: relative;
            display: inline-flex;
            align-items: center;
            gap: 10px;
            color: #e8edf5 !important;
            letter-spacing: 0.19em !important;
        }

        #rightSidebarTitle.section-kicker::before {
            content: attr(data-kicker);
            font-size: 9px;
            line-height: 1;
            text-transform: uppercase;
            letter-spacing: 0.24em;
            color: var(--accent-muted);
            padding: 3px 6px;
            border: 1px solid rgba(255, 255, 255, 0.14);
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.03);
        }

        #rightSidebarTitle.section-kicker::after {
            content: '';
            width: 44px;
            height: 1px;
            background: linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent);
        }

        #leftSidebar #channelGroupsView h3,
        #leftSidebar #channelDmsView h3,
        #leftSidebar #channelAllUsersView h3,
        #rightSidebarTitle {
            color: #f0f4fb !important;
        }

        #rightSidebarContent h4 {
            padding-bottom: 8px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.11);
        }

        .message-meta-header {
            color: #a1a1aa;
        }

        .message-sender-name {
            font-weight: 700;
        }

        /* event-driven motion only */
        .cosmic-bg::before,
        .cosmic-bg::after,
        .mesh-orb,
        .holo-grid {
            animation: none !important;
        }

        .message-enter {
            animation: message-enter 160ms var(--ease-smooth) both;
            animation-delay: calc(var(--message-stagger, 0) * var(--message-stagger-step));
        }

        @keyframes message-enter {
            from {
                opacity: 0;
                transform: translateY(8px) scale(0.995);
            }

            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .presence-pulse-dot,
        .status-online {
            animation: status-glow 2.5s ease-in-out infinite !important;
        }

        /* status-pulse replaced by status-glow defined above */

        /* panel open/close motion */
        #leftSidebar,
        #rightSidebar {
            transition:
                transform 170ms var(--ease-smooth),
                opacity 170ms var(--ease-smooth),
                width 170ms var(--ease-smooth),
                max-width 170ms var(--ease-smooth),
                flex-basis 170ms var(--ease-smooth) !important;
        }

        @media (min-width: 768px) {
            #leftSidebar {
                flex: 0 0 auto;
                width: 310px;
                min-width: 310px;
                max-width: 310px;
                flex-basis: 310px;
                overflow: visible;
                transition:
                    width 240ms var(--ease-smooth),
                    min-width 240ms var(--ease-smooth),
                    max-width 240ms var(--ease-smooth),
                    flex-basis 240ms var(--ease-smooth),
                    transform 240ms var(--ease-smooth),
                    opacity 200ms var(--ease-smooth) !important;
            }

            #leftSidebar.is-collapsed {
                flex: 0 0 auto;
                width: 0;
                min-width: 0;
                max-width: 0;
                flex-basis: 0;
            }

            #leftSidebar > :not(.left-sidebar-handle) {
                opacity: 1;
                visibility: visible;
                transition: opacity 140ms ease, visibility 0s linear 0s;
            }

            #leftSidebar.is-collapsed > :not(.left-sidebar-handle) {
                opacity: 0;
                visibility: hidden;
                transition: opacity 120ms ease, visibility 0s linear 120ms;
            }
        }

        #adminSettingsBtn,
        #logoutbuttonxd {
            width: 20px;
            height: 20px;
            min-width: 20px;
            min-height: 20px;
            padding: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        #leftSidebar.panel-transitioning,
        #rightSidebar.panel-transitioning {
            will-change: transform, width, max-width, flex-basis;
        }

        #leftSidebar{
            overflow: visible;
        }

        /* clear keyboard focus on dark UI */
        button:focus-visible,
        [role="button"]:focus-visible,
        input:focus-visible,
        textarea:focus-visible,
        select:focus-visible {
            outline: 2px solid var(--focus-ring) !important;
            outline-offset: 2px !important;
            box-shadow: 0 0 0 4px var(--focus-ring-shadow) !important;
        }

        /* Improve first-tap/button activation reliability on touch + icon-heavy buttons */
        button,
        [role="button"],
        .channel-btn,
        .action-orbit-btn,
        .right-sidebar-mobile-open-btn,
        .left-sidebar-handle,
        .right-sidebar-handle {
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        button i,
        button svg,
        button img,
        button .lucide {
            pointer-events: none;
        }

        /* larger hit targets for icon controls */
        button[title],
        .composer-tool-btn,
        .action-orbit-btn,
        .left-sidebar-handle button,
        .right-sidebar-handle button,
        .right-sidebar-mobile-open-btn {
            min-width: 40px;
            min-height: 40px;
        }

        /* compact left-sidebar section controls on narrow widths */
        #channelDmsView .dm-sort-button {
            min-width: 104px;
        }

        #channelDmsView #dmSortButtonLabel {
            white-space: nowrap;
        }

        .channel-view-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin: 0 0 14px;
            padding: 0 8px 10px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        }

        #channelGroupsView.channel-view-header{
            flex-direction: row;
        }

        .channel-view-header > div:first-child {
            display: flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
        }

        .channel-view-header > div:last-child {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }

        @media (max-width: 430px) {
            .channel-view-header {
                gap: 8px;
                padding: 0 6px 8px;
                margin-bottom: 12px;
            }

            #channelDmsView .dm-sort-button {
                min-width: 92px;
                padding-left: 0.58rem;
                padding-right: 0.58rem;
            }

            #channelDmsView h3,
            #channelAllUsersView h3 {
                letter-spacing: 0.07em !important;
            }
        }

        
#leftSidebar .channel-btn:hover {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

#messagesContainer{
    overflow-x: hidden;
}
