/* ========== PIGEON MAIL ULTIMATE - ПРЕМИАЛЬНЫЙ ДИЗАЙН ========== */
:root {
    --pm-background-primary: #070812;
    --pm-background-secondary: #0b0d19;
    --pm-background-elevated: #101322;
    --pm-background-deep: #05060c;
    --pm-surface-primary: rgba(255, 255, 255, 0.055);
    --pm-surface-secondary: rgba(255, 255, 255, 0.075);
    --pm-surface-elevated: rgba(255, 255, 255, 0.095);
    --pm-surface-pressed: rgba(255, 255, 255, 0.12);
    --pm-glass-background: rgba(16, 18, 36, 0.72);
    --pm-glass-background-strong: rgba(18, 20, 42, 0.88);
    --pm-glass-border: rgba(255, 255, 255, 0.10);
    --pm-glass-highlight: rgba(255, 255, 255, 0.16);
    --pm-text-primary: #f8f8fc;
    --pm-text-secondary: #b1b4c6;
    --pm-text-tertiary: #858aa2;
    --pm-text-muted: #666b82;
    --pm-text-inverse: #11121a;
    --pm-brand-primary: #7657ff;
    --pm-brand-primary-light: #9a82ff;
    --pm-brand-primary-dark: #5636e8;
    --pm-brand-violet: #8a5cff;
    --pm-brand-magenta: #c066ff;
    --pm-brand-cyan: #38c8ff;
    --pm-brand-blue: #5b9cff;
    --pm-status-success: #48d597;
    --pm-status-warning: #ffbe55;
    --pm-status-danger: #ff5d73;
    --pm-status-info: #58a6ff;
    --pm-divider: rgba(255, 255, 255, 0.065);
    --pm-overlay: rgba(0, 0, 0, 0.58);
    --pm-backdrop: rgba(2, 3, 8, 0.72);
    --pm-gradient-brand-primary: linear-gradient(135deg, #6b5cff, #8a5cff, #b06cff);
    --pm-gradient-brand-aurora: linear-gradient(135deg, #6b5cff, #7f63ff, #38c8ff);
    --pm-gradient-brand-warm: linear-gradient(135deg, #7657ff, #a45eff, #e06dff);
    --pm-gradient-story-unseen: linear-gradient(135deg, #7657ff, #b06cff, #38c8ff);
    --pm-gradient-moment-voice: linear-gradient(135deg, #7657ff, #8b6bff);
    --pm-gradient-moment-video: linear-gradient(135deg, #5b63ff, #c05eff);
    --pm-gradient-moment-post: linear-gradient(135deg, #7657ff, #b768ff);
    --pm-gradient-moment-poll: linear-gradient(135deg, #5d7cff, #38c8ff);
    --pm-space-2: 2px;
    --pm-space-4: 4px;
    --pm-space-8: 8px;
    --pm-space-12: 12px;
    --pm-space-16: 16px;
    --pm-space-20: 20px;
    --pm-space-24: 24px;
    --pm-space-32: 32px;
    --pm-space-40: 40px;
    --pm-radius-xs: 8px;
    --pm-radius-sm: 12px;
    --pm-radius-md: 16px;
    --pm-radius-lg: 20px;
    --pm-radius-xl: 24px;
    --pm-radius-xxl: 28px;
    --pm-radius-sheet: 30px;
    --pm-radius-pill: 999px;
    --pm-font-system: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    --pm-typography-display: 700 32px/38px var(--pm-font-system);
    --pm-typography-title-1: 700 28px/34px var(--pm-font-system);
    --pm-typography-title-2: 700 22px/28px var(--pm-font-system);
    --pm-typography-headline: 600 17px/22px var(--pm-font-system);
    --pm-typography-body: 400 16px/22px var(--pm-font-system);
    --pm-typography-body-medium: 500 16px/22px var(--pm-font-system);
    --pm-typography-caption: 400 13px/18px var(--pm-font-system);
    --pm-typography-caption-medium: 500 13px/18px var(--pm-font-system);
    --pm-typography-micro: 500 11px/14px var(--pm-font-system);
    --pm-glass-soft: var(--pm-surface-primary);
    --pm-glass-soft-border: rgba(255, 255, 255, 0.08);
    --pm-glass-soft-blur: 22px;
    --pm-glass-strong: rgba(16, 18, 36, 0.82);
    --pm-glass-strong-border: rgba(255, 255, 255, 0.12);
    --pm-glass-strong-blur: 32px;
    --pm-shadow-subtle: 0 12px 32px rgba(0, 0, 0, 0.22);
    --pm-shadow-glass: 0 22px 48px rgba(0, 0, 0, 0.36), inset 0 1px 0 var(--pm-glass-highlight);
    --pm-shadow-violet-glow: 0 0 24px rgba(118, 87, 255, 0.38);
    --pm-animation-fast: 160ms cubic-bezier(0.22, 1, 0.36, 1);
    --pm-animation-normal: 220ms cubic-bezier(0.22, 1, 0.36, 1);
    --pm-animation-slow: 320ms cubic-bezier(0.22, 1, 0.36, 1);
    --pm-layout-max-content-width: 620px;
    --pm-layout-chat-row-height: 78px;
    --pm-layout-bottom-bar-height: 62px;
    --pm-z-index-base: 0;
    --pm-z-index-dropdown: 20;
    --pm-z-index-sheet: 40;
    --pm-z-index-modal: 60;
    --pm-z-index-toast: 80;

    --premium-bg: var(--pm-background-primary);
    --premium-surface: var(--pm-glass-background);
    --premium-surface-light: var(--pm-surface-secondary);
    --premium-accent: var(--pm-brand-primary);
    --premium-accent-dark: var(--pm-brand-primary-dark);
    --premium-accent-gradient: var(--pm-gradient-brand-primary);
    --premium-accent-glow: rgba(118, 87, 255, 0.34);
    --premium-success: var(--pm-status-success);
    --premium-danger: var(--pm-status-danger);
    --premium-warning: var(--pm-status-warning);
    --premium-info: var(--pm-status-info);
    --premium-text-primary: var(--pm-text-primary);
    --premium-text-secondary: var(--pm-text-secondary);
    --premium-text-tertiary: var(--pm-text-tertiary);
    --premium-border: var(--pm-divider);
    --premium-border-light: var(--pm-glass-border);
    --premium-shadow: var(--pm-shadow-glass);
    --premium-shadow-sm: var(--pm-shadow-subtle);
    --premium-glow: var(--pm-shadow-violet-glow);
    --premium-card-radius: var(--pm-radius-xl);
    --premium-transition: all var(--pm-animation-normal);
    --premium-transition-bounce: all var(--pm-animation-slow);
}

[data-theme="light"] {
    --premium-bg: #f8fafc;
    --premium-surface: #ffffff;
    --premium-surface-light: #f1f5f9;
    --premium-accent: #7c3aed;
    --premium-accent-dark: #5b21b6;
    --premium-text-primary: #0f172a;
    --premium-text-secondary: #334155;
    --premium-text-tertiary: #64748b;
    --premium-border: #e2e8f0;
}

[data-theme="dark"] {
    --premium-bg: var(--pm-background-primary);
    --premium-surface: var(--pm-glass-background);
    --premium-surface-light: var(--pm-surface-secondary);
    --premium-accent: var(--pm-brand-primary);
    --premium-accent-dark: var(--pm-brand-primary-dark);
    --premium-text-primary: var(--pm-text-primary);
    --premium-text-secondary: var(--pm-text-secondary);
    --premium-border: var(--pm-divider);
}

[data-theme="forest"] {
    --premium-bg: #14532d;
    --premium-surface: #166534;
    --premium-surface-light: #15803d;
    --premium-accent: #fbbf24;
    --premium-accent-dark: #f59e0b;
    --premium-text-primary: #ffffff;
    --premium-text-secondary: #d1fae5;
    --premium-border: #047857;
}

[data-theme="ocean"] {
    --premium-bg: #0c4a6e;
    --premium-surface: #075985;
    --premium-surface-light: #0284c7;
    --premium-accent: #fcd34d;
    --premium-accent-dark: #fbbf24;
    --premium-text-primary: #ffffff;
    --premium-text-secondary: #e0f2fe;
    --premium-border: #0369a1;
}

[data-theme="sunset"] {
    --premium-bg: #7c2d12;
    --premium-surface: #9a3412;
    --premium-surface-light: #c2410c;
    --premium-accent: #fde047;
    --premium-accent-dark: #facc15;
    --premium-text-primary: #ffffff;
    --premium-text-secondary: #fed7aa;
    --premium-border: #b45309;
}

[data-theme="midnight"] {
    --premium-bg: #0c0a2a;
    --premium-surface: #1e1b4b;
    --premium-surface-light: #2e2a5e;
    --premium-accent: #c084fc;
    --premium-accent-dark: #a855f7;
    --premium-text-primary: #ffffff;
    --premium-text-secondary: #c4b5fd;
    --premium-border: #4c1d95;
}

[data-theme="candy"] {
    --premium-bg: #fce7f3;
    --premium-surface: #ffffff;
    --premium-surface-light: #fbcfe8;
    --premium-accent: #ec489a;
    --premium-accent-dark: #db2777;
    --premium-text-primary: #831843;
    --premium-text-secondary: #9d174d;
    --premium-border: #f9a8d4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--pm-font-system);
    background: var(--premium-bg);
    color: var(--premium-text-primary);
    height: 100vh;
    overflow: hidden;
    transition: var(--premium-transition);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--premium-accent);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--premium-accent-dark);
}

#app {
    display: flex;
    width: 100%;
    height: 100vh;
    background: var(--premium-bg);
}

/* ========== ЛЕВАЯ ПАНЕЛЬ ========== */
.chats-panel {
    width: 380px;
    background: var(--premium-surface);
    border-right: 1px solid var(--premium-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: var(--premium-transition);
}

.chats-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--premium-border);
    background: linear-gradient(135deg, var(--premium-surface), var(--premium-surface-light));
}

.profile-btn {
    width: 48px;
    height: 48px;
    border-radius: 20px;
    background: var(--premium-accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    cursor: pointer;
    transition: var(--premium-transition-bounce);
    overflow: hidden;
    color: white;
    position: relative;
}

.profile-btn:hover {
    transform: scale(1.05) rotate(5deg);
}

.profile-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-btn .online-dot {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    background: var(--premium-success);
    border-radius: 50%;
    border: 2px solid var(--premium-surface);
}

.chats-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    background: var(--premium-accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chats-title i {
    font-size: 26px;
    background: none;
    -webkit-text-fill-color: var(--premium-accent);
}

.header-icons {
    display: flex;
    gap: 16px;
}

.header-icons i {
    font-size: 20px;
    cursor: pointer;
    color: var(--premium-text-secondary);
    transition: var(--premium-transition);
}

.header-icons i:hover {
    color: var(--premium-accent);
    transform: scale(1.1);
}

/* Табы */
.tabs {
    display: flex;
    padding: 12px 20px;
    gap: 24px;
    border-bottom: 1px solid var(--premium-border);
}

.tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    cursor: pointer;
    color: var(--premium-text-secondary);
    font-weight: 600;
    font-size: 14px;
    position: relative;
    transition: var(--premium-transition);
}

.tab:hover {
    color: var(--premium-accent);
}

.tab.active {
    color: var(--premium-accent);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -13px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--premium-accent-gradient);
    border-radius: 3px;
}

/* Поиск */
.search-box {
    position: relative;
    padding: 16px 20px;
}

.search-box i {
    position: absolute;
    left: 34px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--premium-text-tertiary);
    font-size: 16px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    background: var(--premium-surface-light);
    border: none;
    border-radius: 30px;
    color: var(--premium-text-primary);
    font-size: 14px;
    outline: none;
    transition: var(--premium-transition);
}

.search-box input:focus {
    box-shadow: 0 0 0 2px var(--premium-accent);
}

/* Списки */
.chats-list, .contacts-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
}

.chat-item, .contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    cursor: pointer;
    border-radius: 20px;
    transition: var(--premium-transition);
    margin-bottom: 4px;
    position: relative;
}

.chat-item:hover, .contact-item:hover {
    background: var(--premium-surface-light);
    transform: translateX(5px);
}

.chat-item.active {
    background: var(--premium-accent-gradient);
}

.chat-item.active .chat-name,
.chat-item.active .chat-last-message {
    color: white;
}

.chat-avatar {
    width: 52px;
    height: 52px;
    border-radius: 20px;
    background: var(--premium-accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    color: white;
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: var(--premium-success);
    border-radius: 50%;
    border: 2px solid var(--premium-surface);
    animation: onlinePulse 2s infinite;
}

@keyframes onlinePulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.chat-info {
    flex: 1;
    min-width: 0;
}

.chat-name {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-last-message {
    font-size: 13px;
    color: var(--premium-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-meta {
    text-align: right;
    font-size: 11px;
    color: var(--premium-text-tertiary);
}

.unread-badge {
    background: var(--premium-accent);
    color: white;
    border-radius: 20px;
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    padding: 0 6px;
    margin-top: 4px;
    animation: badgeBounce 1s ease;
}

@keyframes badgeBounce {
    0% { transform: scale(0); }
    80% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.chat-badge {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--premium-accent-light);
    color: var(--premium-accent);
}

.chat-badge.verified {
    background: #3b82f6;
    color: white;
}

.chat-badge.premium {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
}

/* Футер */
.chats-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--premium-border);
    background: linear-gradient(135deg, var(--premium-surface), var(--premium-surface-light));
}

#userFullName {
    font-weight: 700;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: var(--premium-text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.user-status.online { background: var(--premium-success); }
.user-status.offline { background: var(--premium-text-tertiary); }
.user-status.away { background: var(--premium-warning); }
.user-status.busy { background: var(--premium-danger); }

/* Правая панель чата */
.chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--premium-bg);
    position: relative;
}

.chat-header {
    padding: 16px 24px;
    background: var(--premium-surface);
    border-bottom: 1px solid var(--premium-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(10px);
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
}

.chat-header-info h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-header-info p {
    font-size: 12px;
    color: var(--premium-text-secondary);
}

.chat-header-icons {
    display: flex;
    gap: 20px;
}

.chat-header-icons i {
    font-size: 20px;
    cursor: pointer;
    color: var(--premium-text-secondary);
    transition: var(--premium-transition);
    position: relative;
}

.chat-header-icons i:hover {
    color: var(--premium-accent);
    transform: scale(1.1);
}

/* Сообщения */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-image: var(--chat-bg-pattern, none);
    background-size: cover;
    background-position: center;
}

.message {
    max-width: 70%;
    margin-bottom: 4px;
    position: relative;
    animation: messageIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message.outgoing {
    align-self: flex-end;
}

.message-bubble {
    padding: 10px 16px;
    border-radius: 20px;
    position: relative;
    word-wrap: break-word;
    transition: var(--premium-transition);
}

.message.outgoing .message-bubble {
    background: var(--premium-accent-gradient);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.incoming .message-bubble {
    background: var(--premium-surface);
    border-bottom-left-radius: 4px;
}

.message-bubble:hover {
    transform: scale(1.01);
}

.message-header {
    font-size: 12px;
    margin-bottom: 4px;
    color: var(--premium-text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.message-text {
    font-size: 14px;
    line-height: 1.5;
}

.message-text .message-link {
    color: #93c5fd;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-word;
}

.message-text button.message-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.message-text .message-link:hover {
    color: #bfdbfe;
}

.message-footer {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 4px;
    font-size: 10px;
    color: var(--premium-text-tertiary);
}

/* Медиа */
.message-media {
    max-width: 280px;
    max-height: 280px;
    border-radius: 16px;
    cursor: pointer;
    margin: 6px 0;
    transition: var(--premium-transition);
    box-shadow: var(--premium-shadow-sm);
}

.message-media:hover {
    transform: scale(1.02);
    box-shadow: var(--premium-glow);
}

.message-file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--premium-surface-light);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: var(--premium-transition);
    font-size: 13px;
}

.message-file:hover {
    background: var(--premium-accent);
    color: white;
    transform: translateX(5px);
}

/* Стикеры */
.sticker-message {
    font-size: 48px;
    line-height: 1;
    cursor: pointer;
    transition: var(--premium-transition-bounce);
    display: inline-block;
}

.sticker-message:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Голосовые */
.voice-message {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 240px;
    background: var(--premium-surface-light);
    border-radius: 30px;
    padding: 8px 16px;
}

.voice-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--premium-accent-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    transition: var(--premium-transition);
}

.voice-play-btn:hover {
    transform: scale(1.1);
}

.voice-waveform-mini {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    height: 30px;
}

.voice-waveform-bar {
    flex: 1;
    background: var(--premium-accent);
    border-radius: 2px;
    transition: height 0.1s ease;
}

.voice-progress {
    flex: 1;
    height: 4px;
    background: var(--premium-surface);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.voice-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--premium-accent);
    border-radius: 2px;
}

.voice-time {
    font-size: 11px;
    color: var(--premium-text-tertiary);
    min-width: 50px;
    font-family: monospace;
}

/* Панель ввода */
.input-area {
    padding: 16px 24px;
    background: var(--premium-surface);
    border-top: 1px solid var(--premium-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.attach-btn, .emoji-btn, .send-btn {
    background: none;
    border: none;
    color: var(--premium-text-secondary);
    font-size: 22px;
    cursor: pointer;
    transition: var(--premium-transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.attach-btn:hover, .emoji-btn:hover, .send-btn:hover {
    color: var(--premium-accent);
    background: var(--premium-surface-light);
    transform: scale(1.1);
}

.input-area input {
    flex: 1;
    padding: 12px 16px;
    background: var(--premium-surface-light);
    border: none;
    border-radius: 30px;
    color: var(--premium-text-primary);
    font-size: 14px;
    outline: none;
    transition: var(--premium-transition);
}

.input-area input:focus {
    box-shadow: 0 0 0 2px var(--premium-accent);
}

.voice-record-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--premium-accent-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--premium-transition);
    border: none;
}

.voice-record-btn.recording {
    animation: recordingPulse 1.5s infinite;
    background: var(--premium-danger);
}

@keyframes recordingPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    50% { transform: scale(1.1); box-shadow: 0 0 0 15px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Панель записи голоса */
.voice-recording-panel {
    padding: 16px 24px;
    background: var(--premium-surface);
    border-top: 1px solid var(--premium-border);
}

.voice-recording-container {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.voice-waveform {
    flex: 1;
    height: 60px;
    background: var(--premium-surface-light);
    border-radius: 30px;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 15px;
}

.voice-waveform-bars {
    display: flex;
    align-items: center;
    gap: 3px;
    width: 100%;
    height: 100%;
}

.voice-waveform-bars .voice-waveform-bar {
    flex: 1;
    background: var(--premium-accent-gradient);
    border-radius: 3px;
    transition: height 0.05s linear;
    min-height: 3px;
}

.voice-timer {
    font-size: 20px;
    font-weight: 700;
    color: var(--premium-accent);
    min-width: 80px;
    text-align: center;
    font-family: monospace;
}

.voice-actions {
    display: flex;
    gap: 12px;
}

.voice-action-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--premium-transition-bounce);
    font-size: 20px;
    border: none;
    color: white;
}

.voice-action-btn.send {
    background: var(--premium-success);
}

.voice-action-btn.cancel {
    background: var(--premium-danger);
}

.voice-action-btn:hover {
    transform: scale(1.1);
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--premium-text-secondary);
}

.empty-state i {
    font-size: 60px;
    margin-bottom: 16px;
    color: var(--premium-accent);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.empty-state h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 20px;
}

.empty-state button {
    background: var(--premium-accent-gradient);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--premium-transition);
}

.empty-state button:hover {
    transform: translateY(-2px);
    box-shadow: var(--premium-glow);
}

/* Модальные окна */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; backdrop-filter: blur(0); }
    to { opacity: 1; backdrop-filter: blur(10px); }
}

.modal-content {
    background: var(--premium-surface);
    border-radius: 32px;
    width: 550px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    padding: 28px;
    animation: modalSlideUp 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid var(--premium-border);
}

@keyframes modalSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--premium-border);
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 700;
    background: var(--premium-accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: var(--premium-text-secondary);
    transition: var(--premium-transition);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: white;
    background: var(--premium-danger);
    transform: rotate(90deg);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-body input,
.modal-body textarea,
.modal-body select {
    padding: 14px 18px;
    background: var(--premium-surface-light);
    border: 2px solid transparent;
    border-radius: 20px;
    color: var(--premium-text-primary);
    font-size: 14px;
    outline: none;
    transition: var(--premium-transition);
    width: 100%;
}

.modal-body input:focus,
.modal-body textarea:focus,
.modal-body select:focus {
    border-color: var(--premium-accent);
    background: var(--premium-surface);
    box-shadow: var(--premium-glow);
}

.modal-body textarea {
    resize: vertical;
    min-height: 100px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.pm-long-text-message {
    max-width: min(720px, 100%);
    min-width: 0;
}

.pm-long-text-content {
    max-height: 240px;
    margin: 0;
    overflow: hidden;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    font: inherit;
}

.pm-long-text-message.is-code-like .pm-long-text-content {
    padding: 10px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.45;
}

.pm-long-text-message[data-expanded="true"] .pm-long-text-content {
    max-height: 60vh;
    overflow: auto;
}

.pm-long-text-footer,
.pm-long-text-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pm-long-text-footer {
    justify-content: space-between;
    margin-top: 8px;
    color: var(--premium-text-secondary);
    font-size: 11px;
}

.pm-long-text-actions button {
    border: 0;
    background: transparent;
    color: var(--premium-accent-light, #a78bfa);
    cursor: pointer;
}

.pm-large-paste-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100050;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(2, 6, 23, 0.72);
}

.pm-large-paste-card {
    width: min(480px, 100%);
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 22px;
    background: var(--premium-surface, #1e293b);
    color: var(--premium-text-primary, white);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.pm-large-paste-card h3 { margin: 0 0 10px; }
.pm-large-paste-card p { margin: 0 0 14px; line-height: 1.5; }
.pm-large-paste-warning { color: #fbbf24; }
.pm-large-paste-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.pm-large-paste-actions button { padding: 10px 14px; border: 0; border-radius: 14px; cursor: pointer; }
.pm-large-paste-actions .primary { background: var(--premium-accent, #8b5cf6); color: white; }

.btn-primary {
    background: var(--premium-accent-gradient);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--premium-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--premium-glow);
}

.btn-danger {
    background: var(--premium-danger);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--premium-transition);
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--premium-surface-light);
    color: var(--premium-text-primary);
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--premium-transition);
}

.btn-secondary:hover {
    background: var(--premium-border);
    transform: translateY(-2px);
}

/* Аватар загрузка */
.avatar-upload {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 30px;
    background: var(--premium-accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    cursor: pointer;
    overflow: hidden;
    color: white;
    transition: var(--premium-transition);
    border: 3px solid var(--premium-border);
}

.avatar-preview:hover {
    transform: scale(1.05);
    border-color: var(--premium-accent);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-input {
    display: none;
}

/* QR код */
.qr-container {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 20px;
    margin: 10px 0;
}

.qr-container canvas {
    width: 200px;
    height: 200px;
}

/* Контекстное меню */
.context-menu {
    position: fixed;
    background: var(--premium-surface);
    border-radius: 20px;
    padding: 8px 0;
    min-width: 220px;
    z-index: 3000;
    box-shadow: var(--premium-shadow);
    border: 1px solid var(--premium-border);
    backdrop-filter: blur(10px);
    animation: menuFadeIn 0.2s ease;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.context-menu-item {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    transition: var(--premium-transition);
}

.context-menu-item:hover {
    background: var(--premium-surface-light);
    padding-left: 28px;
}

.context-menu-item.danger {
    color: var(--premium-danger);
}

.context-menu-item.danger:hover {
    background: var(--premium-danger);
    color: white;
}

/* Эмодзи пикер */
.emoji-picker {
    position: fixed;
    background: var(--premium-surface);
    border-radius: 24px;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    z-index: 1500;
    width: 380px;
    max-width: 90vw;
    max-height: 320px;
    overflow-y: auto;
    box-shadow: var(--premium-shadow);
    border: 1px solid var(--premium-border);
    animation: emojiFadeIn 0.2s ease;
}

@keyframes emojiFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.emoji {
    background: var(--premium-surface-light);
    border: none;
    font-size: 28px;
    cursor: pointer;
    padding: 10px;
    border-radius: 12px;
    transition: var(--premium-transition);
}

.emoji:hover {
    background: var(--premium-accent-gradient);
    transform: scale(1.15);
}

/* Выбор темы чата */
.chat-theme-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.chat-theme-item {
    cursor: pointer;
    text-align: center;
    padding: 12px;
    border-radius: 16px;
    transition: var(--premium-transition);
    border: 2px solid transparent;
}

.chat-theme-item:hover {
    transform: translateY(-4px);
    background: var(--premium-surface-light);
}

.chat-theme-item.active {
    border-color: var(--premium-accent);
    background: var(--premium-accent-gradient);
}

.chat-theme-preview {
    width: 100%;
    height: 80px;
    border-radius: 12px;
    margin-bottom: 8px;
}

.theme-chat-default { background: var(--premium-surface); }
.theme-chat-waves { background: repeating-linear-gradient(45deg, var(--premium-accent) 0px, var(--premium-accent) 4px, transparent 4px, transparent 12px); }
.theme-chat-dots { background: radial-gradient(circle at 30% 40%, var(--premium-accent) 2px, transparent 2px); background-size: 20px 20px; }
.theme-chat-lines { background: repeating-linear-gradient(90deg, var(--premium-accent) 0px, var(--premium-accent) 2px, transparent 2px, transparent 20px); }
.theme-chat-nature { background: linear-gradient(135deg, #10b981, #34d399); }
.theme-chat-abstract { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.theme-chat-ocean { background: linear-gradient(135deg, #0ea5e9, #38bdf8); }
.theme-chat-sunset { background: linear-gradient(135deg, #f97316, #fbbf24); }
.theme-chat-midnight { background: linear-gradient(135deg, #4c1d95, #6d28d9); }
.theme-chat-candy { background: linear-gradient(135deg, #f472b6, #ec489a); }

/* Стикерпаки */
.sticker-pack-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.sticker-pack-item {
    background: var(--premium-surface-light);
    border-radius: 16px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--premium-transition);
}

.sticker-pack-item:hover {
    background: var(--premium-accent-gradient);
    transform: translateY(-4px);
}

.sticker-pack-emoji {
    font-size: 48px;
    margin-bottom: 8px;
}

.sticker-pack-name {
    font-size: 12px;
    font-weight: 600;
}

.sticker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.sticker-grid-item {
    background: var(--premium-surface-light);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--premium-transition);
    font-size: 48px;
}

.sticker-grid-item:hover {
    background: var(--premium-accent-gradient);
    transform: scale(1.05);
}

/* Реакции */
.reactions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.reaction {
    background: var(--premium-surface-light);
    border-radius: 30px;
    padding: 4px 10px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--premium-transition-bounce);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.reaction:hover {
    background: var(--premium-accent);
    transform: scale(1.1);
}

/* Голосования */
.poll-container {
    background: var(--premium-surface-light);
    border-radius: 20px;
    padding: 16px;
    margin: 8px 0;
}

.poll-question {
    font-weight: 700;
    margin-bottom: 12px;
    font-size: 14px;
}

.poll-option {
    margin-bottom: 10px;
    cursor: pointer;
}

.poll-option-bar {
    height: 40px;
    background: var(--premium-surface);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.poll-option-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: var(--premium-accent-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: white;
    font-size: 13px;
    font-weight: 600;
}

.poll-option-text {
    font-size: 13px;
    margin-bottom: 4px;
}

.poll-vote-count {
    font-size: 11px;
    color: var(--premium-text-tertiary);
    margin-top: 12px;
    text-align: center;
}

/* Локация */
.location-message {
    cursor: pointer;
}

.location-map {
    width: 250px;
    height: 150px;
    border-radius: 16px;
    background: var(--premium-surface-light);
    position: relative;
    overflow: hidden;
    margin-top: 6px;
}

.location-map img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.location-name {
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
}

/* Звонки */
.call-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1a1a2e, #0f172a);
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.call-window {
    background: var(--premium-surface);
    border-radius: 48px;
    padding: 40px;
    text-align: center;
    min-width: 350px;
    animation: callSlideUp 0.4s ease;
}

@keyframes callSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.call-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 40px;
    background: var(--premium-accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 20px;
    color: white;
}

.call-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.call-status {
    color: var(--premium-text-secondary);
    margin-bottom: 30px;
}

.call-timer {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 30px;
    font-family: monospace;
}

.call-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.call-button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    border: none;
    transition: var(--premium-transition-bounce);
}

.call-button.accept {
    background: var(--premium-success);
    color: white;
}

.call-button.reject, .call-button.end {
    background: var(--premium-danger);
    color: white;
}

.call-button:hover {
    transform: scale(1.1);
}

.video-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
}

.remote-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.local-video {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 200px;
    height: 150px;
    border-radius: 16px;
    object-fit: cover;
    border: 3px solid var(--premium-accent);
    cursor: pointer;
    z-index: 10;
}

.call-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    background: rgba(0, 0, 0, 0.6);
    padding: 12px 24px;
    border-radius: 60px;
    backdrop-filter: blur(10px);
    z-index: 20;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: var(--premium-transition);
}

.control-btn:hover {
    background: var(--premium-accent);
    transform: scale(1.1);
}

.control-btn.end-call {
    background: var(--premium-danger);
}

.control-btn.muted {
    background: var(--premium-danger);
}

/* Уведомления */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 14px 20px;
    background: var(--premium-surface);
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 5000;
    animation: toastSlideIn 0.3s ease;
    border-left: 4px solid;
    box-shadow: var(--premium-shadow);
    max-width: 350px;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-success { border-left-color: var(--premium-success); }
.toast-error { border-left-color: var(--premium-danger); }
.toast-warning { border-left-color: var(--premium-warning); }
.toast-info { border-left-color: var(--premium-info); }

/* Адаптивность */
@media (max-width: 768px) {
    .chats-panel {
        width: 100%;
        position: absolute;
        z-index: 100;
        height: 100%;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .chats-panel.open {
        transform: translateX(0);
    }
    
    .chat-panel {
        width: 100%;
    }
    
    .message {
        max-width: 85%;
    }
    
    .emoji-picker {
        grid-template-columns: repeat(6, 1fr);
        width: 300px;
    }
    
    .chat-theme-selector {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .call-window {
        padding: 30px;
        min-width: 280px;
    }
    
    .call-timer {
        font-size: 32px;
    }
    
    .call-button {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .local-video {
        width: 120px;
        height: 90px;
        bottom: 80px;
    }
}

@media (max-width: 480px) {
    .chat-header-icons {
        gap: 12px;
    }
    
    .chat-header-icons i {
        font-size: 18px;
    }
    
    .voice-message {
        min-width: 180px;
    }
    
    .sticker-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
/* ========== PIGEON MAIL ULTIMATE - ПРЕМИАЛЬНЫЙ ДИЗАЙН ========== */
:root {
    --premium-bg: #0f172a;
    --premium-surface: #1e293b;
    --premium-surface-light: #334155;
    --premium-accent: #8b5cf6;
    --premium-accent-dark: #6d28d9;
    --premium-accent-gradient: linear-gradient(135deg, #8b5cf6, #6366f1);
    --premium-accent-glow: rgba(139, 92, 246, 0.3);
    --premium-success: #10b981;
    --premium-danger: #ef4444;
    --premium-warning: #f59e0b;
    --premium-info: #3b82f6;
    --premium-text-primary: #f8fafc;
    --premium-text-secondary: #94a3b8;
    --premium-text-tertiary: #64748b;
    --premium-border: #334155;
    --premium-border-light: #475569;
    --premium-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --premium-shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.2);
    --premium-glow: 0 0 20px var(--premium-accent-glow);
    --premium-card-radius: 24px;
    --premium-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --premium-transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
/* OAI cleanup removed exact duplicate CSS block: [data-theme="light"] */

/* OAI cleanup removed exact duplicate CSS block: [data-theme="dark"] */

/* OAI cleanup removed exact duplicate CSS block: [data-theme="forest"] */

/* OAI cleanup removed exact duplicate CSS block: [data-theme="ocean"] */

/* OAI cleanup removed exact duplicate CSS block: [data-theme="sunset"] */

/* OAI cleanup removed exact duplicate CSS block: [data-theme="midnight"] */

/* OAI cleanup removed exact duplicate CSS block: [data-theme="candy"] */

/* OAI cleanup removed exact duplicate CSS block: * */

/* OAI cleanup removed exact duplicate CSS block: body */


/* ========== ПРЕМИУМ СКРОЛЛБАР ========== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}
/* OAI cleanup removed exact duplicate CSS block: ::-webkit-scrollbar-thumb */

/* OAI cleanup removed exact duplicate CSS block: ::-webkit-scrollbar-thumb:hover */


/* ========== ОСНОВНОЕ ПРИЛОЖЕНИЕ ========== */
#app {
    display: flex;
    width: 100%;
    height: 100vh;
    background: var(--premium-bg);
    position: relative;
}
/* OAI cleanup removed exact duplicate CSS block: /* ========== ЛЕВАЯ ПАНЕЛЬ ========== */
.chats-panel */

/* OAI cleanup removed exact duplicate CSS block: .chats-header */

/* OAI cleanup removed exact duplicate CSS block: .profile-btn */

/* OAI cleanup removed exact duplicate CSS block: .profile-btn:hover */

/* OAI cleanup removed exact duplicate CSS block: .profile-btn img */

/* OAI cleanup removed exact duplicate CSS block: .profile-btn .online-dot */

/* OAI cleanup removed exact duplicate CSS block: .chats-title */

/* OAI cleanup removed exact duplicate CSS block: .chats-title i */

/* OAI cleanup removed exact duplicate CSS block: .header-icons */

/* OAI cleanup removed exact duplicate CSS block: .header-icons i */

/* OAI cleanup removed exact duplicate CSS block: .header-icons i:hover */


/* ========== ТАБЫ ========== */
.tabs {
    display: flex;
    padding: 12px 20px;
    gap: 24px;
    border-bottom: 1px solid var(--premium-border);
}
/* OAI cleanup removed exact duplicate CSS block: .tab */

/* OAI cleanup removed exact duplicate CSS block: .tab:hover */

/* OAI cleanup removed exact duplicate CSS block: .tab.active */

/* OAI cleanup removed exact duplicate CSS block: .tab.active::after */


/* ========== ПОИСК ========== */
.search-box {
    position: relative;
    padding: 16px 20px;
}
/* OAI cleanup removed exact duplicate CSS block: .search-box i */

/* OAI cleanup removed exact duplicate CSS block: .search-box input */

/* OAI cleanup removed exact duplicate CSS block: .search-box input:focus */


/* ========== СПИСКИ ========== */
.chats-list, .contacts-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
}
/* OAI cleanup removed exact duplicate CSS block: .chat-item, .contact-item */

/* OAI cleanup removed exact duplicate CSS block: .chat-item:hover, .contact-item:hover */

/* OAI cleanup removed exact duplicate CSS block: .chat-item.active */

/* OAI cleanup removed exact duplicate CSS block: .chat-item.active .chat-name,
.chat-item.active .chat-last-message */

/* OAI cleanup removed exact duplicate CSS block: .chat-avatar */

/* OAI cleanup removed exact duplicate CSS block: .chat-avatar img */

/* OAI cleanup removed exact duplicate CSS block: .online-indicator */

/* OAI cleanup removed exact duplicate CSS block: @keyframes onlinePulse */

/* OAI cleanup removed exact duplicate CSS block: .chat-info */

/* OAI cleanup removed exact duplicate CSS block: .chat-name */

/* OAI cleanup removed exact duplicate CSS block: .chat-last-message */

/* OAI cleanup removed exact duplicate CSS block: .chat-meta */

/* OAI cleanup removed exact duplicate CSS block: .unread-badge */

/* OAI cleanup removed exact duplicate CSS block: @keyframes badgeBounce */

/* OAI cleanup removed exact duplicate CSS block: .chat-badge */

/* OAI cleanup removed exact duplicate CSS block: .chat-badge.verified */

/* OAI cleanup removed exact duplicate CSS block: .chat-badge.premium */


/* ========== ФУТЕР ========== */
.chats-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--premium-border);
    background: linear-gradient(135deg, var(--premium-surface), var(--premium-surface-light));
}
/* OAI cleanup removed exact duplicate CSS block: #userFullName */

/* OAI cleanup removed exact duplicate CSS block: .user-role */

/* OAI cleanup removed exact duplicate CSS block: .user-status */

/* OAI cleanup removed exact duplicate CSS block: .user-status.online */

/* OAI cleanup removed exact duplicate CSS block: .user-status.offline */

/* OAI cleanup removed exact duplicate CSS block: .user-status.away */

/* OAI cleanup removed exact duplicate CSS block: .user-status.busy */


/* ========== ПРАВАЯ ПАНЕЛЬ ЧАТА ========== */
.chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--premium-bg);
    position: relative;
}
/* OAI cleanup removed exact duplicate CSS block: .chat-header */

/* OAI cleanup removed exact duplicate CSS block: .chat-header-left */

/* OAI cleanup removed exact duplicate CSS block: .chat-header-info h3 */

/* OAI cleanup removed exact duplicate CSS block: .chat-header-info p */

/* OAI cleanup removed exact duplicate CSS block: .chat-header-icons */

/* OAI cleanup removed exact duplicate CSS block: .chat-header-icons i */

/* OAI cleanup removed exact duplicate CSS block: .chat-header-icons i:hover */


/* ========== СООБЩЕНИЯ ========== */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-image: var(--chat-bg-pattern, none);
    background-size: cover;
    background-position: center;
}
/* OAI cleanup removed exact duplicate CSS block: .message */

/* OAI cleanup removed exact duplicate CSS block: @keyframes messageIn */

/* OAI cleanup removed exact duplicate CSS block: .message.outgoing */

/* OAI cleanup removed exact duplicate CSS block: .message-bubble */

/* OAI cleanup removed exact duplicate CSS block: .message.outgoing .message-bubble */

/* OAI cleanup removed exact duplicate CSS block: .message.incoming .message-bubble */

/* OAI cleanup removed exact duplicate CSS block: .message-bubble:hover */

/* OAI cleanup removed exact duplicate CSS block: .message-header */

/* OAI cleanup removed exact duplicate CSS block: .message-text */

/* OAI cleanup removed exact duplicate CSS block: .message-footer */


/* ========== МЕДИА ========== */
.message-media {
    max-width: 280px;
    max-height: 280px;
    border-radius: 16px;
    cursor: pointer;
    margin: 6px 0;
    transition: var(--premium-transition);
    box-shadow: var(--premium-shadow-sm);
}
/* OAI cleanup removed exact duplicate CSS block: .message-media:hover */

/* OAI cleanup removed exact duplicate CSS block: .message-file */

/* OAI cleanup removed exact duplicate CSS block: .message-file:hover */


/* ========== СТИКЕРЫ ========== */
.sticker-message {
    font-size: 48px;
    line-height: 1;
    cursor: pointer;
    transition: var(--premium-transition-bounce);
    display: inline-block;
}
/* OAI cleanup removed exact duplicate CSS block: .sticker-message:hover */


/* ========== ГОЛОСОВЫЕ СООБЩЕНИЯ ========== */
.voice-message {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 240px;
    background: var(--premium-surface-light);
    border-radius: 30px;
    padding: 8px 16px;
}
/* OAI cleanup removed exact duplicate CSS block: .voice-play-btn */

/* OAI cleanup removed exact duplicate CSS block: .voice-play-btn:hover */

/* OAI cleanup removed exact duplicate CSS block: .voice-waveform-mini */

/* OAI cleanup removed exact duplicate CSS block: .voice-waveform-bar */

/* OAI cleanup removed exact duplicate CSS block: .voice-progress */

/* OAI cleanup removed exact duplicate CSS block: .voice-progress-fill */

/* OAI cleanup removed exact duplicate CSS block: .voice-time */


/* ========== ПАНЕЛЬ ЗАПИСИ ГОЛОСА ========== */
.voice-recording-panel {
    padding: 16px 24px;
    background: var(--premium-surface);
    border-top: 1px solid var(--premium-border);
}
/* OAI cleanup removed exact duplicate CSS block: .voice-recording-container */

/* OAI cleanup removed exact duplicate CSS block: .voice-waveform */

/* OAI cleanup removed exact duplicate CSS block: .voice-waveform-bars */

/* OAI cleanup removed exact duplicate CSS block: .voice-waveform-bars .voice-waveform-bar */

/* OAI cleanup removed exact duplicate CSS block: .voice-timer */

/* OAI cleanup removed exact duplicate CSS block: .voice-actions */

/* OAI cleanup removed exact duplicate CSS block: .voice-action-btn */

/* OAI cleanup removed exact duplicate CSS block: .voice-action-btn.send */

/* OAI cleanup removed exact duplicate CSS block: .voice-action-btn.cancel */

/* OAI cleanup removed exact duplicate CSS block: .voice-action-btn:hover */


/* ========== ПАНЕЛЬ ВВОДА ========== */
.input-area {
    padding: 16px 24px;
    background: var(--premium-surface);
    border-top: 1px solid var(--premium-border);
    display: flex;
    align-items: center;
    gap: 12px;
}
/* OAI cleanup removed exact duplicate CSS block: .attach-btn, .emoji-btn, .send-btn */

/* OAI cleanup removed exact duplicate CSS block: .attach-btn:hover, .emoji-btn:hover, .send-btn:hover */

/* OAI cleanup removed exact duplicate CSS block: .input-area input */

/* OAI cleanup removed exact duplicate CSS block: .input-area input:focus */

/* OAI cleanup removed exact duplicate CSS block: .voice-record-btn */

/* OAI cleanup removed exact duplicate CSS block: .voice-record-btn.recording */

/* OAI cleanup removed exact duplicate CSS block: @keyframes recordingPulse */


/* ========== ПУСТОЕ СОСТОЯНИЕ ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--premium-text-secondary);
}
/* OAI cleanup removed exact duplicate CSS block: .empty-state i */

/* OAI cleanup removed exact duplicate CSS block: @keyframes float */

/* OAI cleanup removed exact duplicate CSS block: .empty-state h2 */

/* OAI cleanup removed exact duplicate CSS block: .empty-state p */

/* OAI cleanup removed exact duplicate CSS block: .empty-state button */

/* OAI cleanup removed exact duplicate CSS block: .empty-state button:hover */


/* ========== МОДАЛЬНЫЕ ОКНА ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: modalFadeIn 0.3s ease;
}
/* OAI cleanup removed exact duplicate CSS block: @keyframes modalFadeIn */

/* OAI cleanup removed exact duplicate CSS block: .modal-content */

/* OAI cleanup removed exact duplicate CSS block: @keyframes modalSlideUp */

/* OAI cleanup removed exact duplicate CSS block: .modal-header */

/* OAI cleanup removed exact duplicate CSS block: .modal-header h3 */

/* OAI cleanup removed exact duplicate CSS block: .modal-close */

/* OAI cleanup removed exact duplicate CSS block: .modal-close:hover */

/* OAI cleanup removed exact duplicate CSS block: .modal-body */

/* OAI cleanup removed exact duplicate CSS block: .modal-body input,
.modal-body textarea,
.modal-body select */

/* OAI cleanup removed exact duplicate CSS block: .modal-body input:focus,
.modal-body textarea:focus,
.modal-body select:focus */

/* OAI cleanup removed exact duplicate CSS block: .modal-body textarea */

/* OAI cleanup removed exact duplicate CSS block: .modal-actions */


/* ========== КНОПКИ ========== */
.btn-primary {
    background: var(--premium-accent-gradient);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--premium-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
/* OAI cleanup removed exact duplicate CSS block: .btn-primary:hover */

/* OAI cleanup removed exact duplicate CSS block: .btn-danger */

/* OAI cleanup removed exact duplicate CSS block: .btn-danger:hover */

/* OAI cleanup removed exact duplicate CSS block: .btn-secondary */

/* OAI cleanup removed exact duplicate CSS block: .btn-secondary:hover */


/* ========== АВАТАР ========== */
.avatar-upload {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}
/* OAI cleanup removed exact duplicate CSS block: .avatar-preview */

/* OAI cleanup removed exact duplicate CSS block: .avatar-preview:hover */

/* OAI cleanup removed exact duplicate CSS block: .avatar-preview img */

/* OAI cleanup removed exact duplicate CSS block: .file-input */


/* ========== QR КОД ========== */
.qr-container {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 20px;
    margin: 10px 0;
}
/* OAI cleanup removed exact duplicate CSS block: .qr-container canvas */


/* ========== КОНТЕКСТНОЕ МЕНЮ ========== */
.context-menu {
    position: fixed;
    background: var(--premium-surface);
    border-radius: 20px;
    padding: 8px 0;
    min-width: 220px;
    z-index: 3000;
    box-shadow: var(--premium-shadow);
    border: 1px solid var(--premium-border);
    backdrop-filter: blur(10px);
    animation: menuFadeIn 0.2s ease;
}
/* OAI cleanup removed exact duplicate CSS block: @keyframes menuFadeIn */

/* OAI cleanup removed exact duplicate CSS block: .context-menu-item */

/* OAI cleanup removed exact duplicate CSS block: .context-menu-item:hover */

/* OAI cleanup removed exact duplicate CSS block: .context-menu-item.danger */

/* OAI cleanup removed exact duplicate CSS block: .context-menu-item.danger:hover */


/* ========== ЭМОДЗИ ПИКЕР ========== */
.emoji-picker {
    position: fixed;
    background: var(--premium-surface);
    border-radius: 24px;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    z-index: 1500;
    width: 380px;
    max-width: 90vw;
    max-height: 320px;
    overflow-y: auto;
    box-shadow: var(--premium-shadow);
    border: 1px solid var(--premium-border);
    animation: emojiFadeIn 0.2s ease;
}
/* OAI cleanup removed exact duplicate CSS block: @keyframes emojiFadeIn */

/* OAI cleanup removed exact duplicate CSS block: .emoji */

/* OAI cleanup removed exact duplicate CSS block: .emoji:hover */


/* ========== ВЫБОР ТЕМЫ ЧАТА ========== */
.chat-theme-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
/* OAI cleanup removed exact duplicate CSS block: .chat-theme-item */

/* OAI cleanup removed exact duplicate CSS block: .chat-theme-item:hover */

/* OAI cleanup removed exact duplicate CSS block: .chat-theme-item.active */

/* OAI cleanup removed exact duplicate CSS block: .chat-theme-preview */

/* OAI cleanup removed exact duplicate CSS block: .theme-chat-default */

/* OAI cleanup removed exact duplicate CSS block: .theme-chat-waves */

/* OAI cleanup removed exact duplicate CSS block: .theme-chat-dots */

/* OAI cleanup removed exact duplicate CSS block: .theme-chat-lines */

/* OAI cleanup removed exact duplicate CSS block: .theme-chat-nature */

/* OAI cleanup removed exact duplicate CSS block: .theme-chat-abstract */

/* OAI cleanup removed exact duplicate CSS block: .theme-chat-ocean */

/* OAI cleanup removed exact duplicate CSS block: .theme-chat-sunset */

/* OAI cleanup removed exact duplicate CSS block: .theme-chat-midnight */

/* OAI cleanup removed exact duplicate CSS block: .theme-chat-candy */


/* ========== СТИКЕРПАКИ ========== */
.sticker-pack-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}
/* OAI cleanup removed exact duplicate CSS block: .sticker-pack-item */

/* OAI cleanup removed exact duplicate CSS block: .sticker-pack-item:hover */

/* OAI cleanup removed exact duplicate CSS block: .sticker-pack-emoji */

/* OAI cleanup removed exact duplicate CSS block: .sticker-pack-name */

/* OAI cleanup removed exact duplicate CSS block: .sticker-grid */

/* OAI cleanup removed exact duplicate CSS block: .sticker-grid-item */

/* OAI cleanup removed exact duplicate CSS block: .sticker-grid-item:hover */


/* ========== РЕАКЦИИ ========== */
.reactions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}
/* OAI cleanup removed exact duplicate CSS block: .reaction */

/* OAI cleanup removed exact duplicate CSS block: .reaction:hover */


/* ========== ГОЛОСОВАНИЯ ========== */
.poll-container {
    background: var(--premium-surface-light);
    border-radius: 20px;
    padding: 16px;
    margin: 8px 0;
}
/* OAI cleanup removed exact duplicate CSS block: .poll-question */

/* OAI cleanup removed exact duplicate CSS block: .poll-option */

/* OAI cleanup removed exact duplicate CSS block: .poll-option-bar */

/* OAI cleanup removed exact duplicate CSS block: .poll-option-fill */

/* OAI cleanup removed exact duplicate CSS block: .poll-option-text */

/* OAI cleanup removed exact duplicate CSS block: .poll-vote-count */


/* ========== ЛОКАЦИЯ ========== */
.location-message {
    cursor: pointer;
}
/* OAI cleanup removed exact duplicate CSS block: .location-map */

/* OAI cleanup removed exact duplicate CSS block: .location-map img */

/* OAI cleanup removed exact duplicate CSS block: .location-name */


/* ========== ЗВОНКИ ========== */
.call-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1a1a2e, #0f172a);
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* OAI cleanup removed exact duplicate CSS block: .call-window */

/* OAI cleanup removed exact duplicate CSS block: @keyframes callSlideUp */

/* OAI cleanup removed exact duplicate CSS block: .call-avatar-large */

/* OAI cleanup removed exact duplicate CSS block: .call-name */

/* OAI cleanup removed exact duplicate CSS block: .call-status */

/* OAI cleanup removed exact duplicate CSS block: .call-timer */

/* OAI cleanup removed exact duplicate CSS block: .call-buttons */

/* OAI cleanup removed exact duplicate CSS block: .call-button */

/* OAI cleanup removed exact duplicate CSS block: .call-button.accept */

/* OAI cleanup removed exact duplicate CSS block: .call-button.reject, .call-button.end */

/* OAI cleanup removed exact duplicate CSS block: .call-button:hover */

/* OAI cleanup removed exact duplicate CSS block: .video-container */

/* OAI cleanup removed exact duplicate CSS block: .remote-video */

/* OAI cleanup removed exact duplicate CSS block: .local-video */

/* OAI cleanup removed exact duplicate CSS block: .call-controls */

/* OAI cleanup removed exact duplicate CSS block: .control-btn */

/* OAI cleanup removed exact duplicate CSS block: .control-btn:hover */

/* OAI cleanup removed exact duplicate CSS block: .control-btn.end-call */

/* OAI cleanup removed exact duplicate CSS block: .control-btn.muted */


/* ========== УВЕДОМЛЕНИЯ ========== */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 14px 20px;
    background: var(--premium-surface);
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 5000;
    animation: toastSlideIn 0.3s ease;
    border-left: 4px solid;
    box-shadow: var(--premium-shadow);
    max-width: 350px;
}
/* OAI cleanup removed exact duplicate CSS block: @keyframes toastSlideIn */

/* OAI cleanup removed exact duplicate CSS block: .toast-success */

/* OAI cleanup removed exact duplicate CSS block: .toast-error */

/* OAI cleanup removed exact duplicate CSS block: .toast-warning */

/* OAI cleanup removed exact duplicate CSS block: .toast-info */


/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 768px) {
    .chats-panel {
        width: 100%;
        position: absolute;
        z-index: 100;
        height: 100%;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .chats-panel.open {
        transform: translateX(0);
    }
    
    .chat-panel {
        width: 100%;
    }
    
    .message {
        max-width: 85%;
    }
    
    .emoji-picker {
        grid-template-columns: repeat(6, 1fr);
        width: 300px;
    }
    
    .chat-theme-selector {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .call-window {
        padding: 30px;
        min-width: 280px;
    }
    
    .call-timer {
        font-size: 32px;
    }
    
    .call-button {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .local-video {
        width: 120px;
        height: 90px;
        bottom: 80px;
    }
}
/* OAI cleanup removed exact duplicate CSS block: @media (max-width: 480px) */

/* ========== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ НОВЫХ ФУНКЦИЙ ========== */

/* Панель поиска в чате */
.chat-search-container {
    padding: 12px 20px;
    background: var(--premium-surface);
    border-bottom: 1px solid var(--premium-border);
}
.chat-search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--premium-surface-light);
    border-radius: 30px;
    padding: 8px 16px;
}
.chat-search-box input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--premium-text-primary);
    font-size: 14px;
}
.chat-search-box i {
    cursor: pointer;
    color: var(--premium-text-secondary);
}
.chat-search-results {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 12px;
    background: var(--premium-surface);
    border-radius: 16px;
}
.search-result-item {
    padding: 12px;
    border-bottom: 1px solid var(--premium-border);
    cursor: pointer;
    transition: var(--premium-transition);
}
.search-result-item:hover {
    background: var(--premium-surface-light);
}
.search-result-sender {
    font-size: 12px;
    font-weight: 700;
    color: var(--premium-accent);
}
.search-result-text {
    font-size: 13px;
    margin-top: 4px;
}

/* Закреплённые сообщения */
.pinned-messages-container {
    border-bottom: 1px solid var(--premium-border);
    background: var(--premium-surface);
}
.pinned-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    color: var(--premium-warning);
    font-size: 13px;
    font-weight: 600;
}
.pinned-list {
    padding: 0 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pinned-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--premium-surface-light);
    border-radius: 14px;
    cursor: pointer;
    transition: var(--premium-transition);
    border-left: 3px solid var(--premium-warning);
}
.pinned-item:hover {
    transform: translateX(4px);
    background: var(--premium-accent);
}
.pinned-sender {
    font-size: 11px;
    font-weight: 700;
    color: var(--premium-warning);
    min-width: 70px;
}
.pinned-text {
    flex: 1;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pinned-actions {
    opacity: 0;
    transition: var(--premium-transition);
}
.pinned-item:hover .pinned-actions {
    opacity: 1;
}
.pinned-actions i {
    color: var(--premium-danger);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
}
.pinned-actions i:hover {
    background: var(--premium-danger);
    color: white;
}
/* OAI cleanup removed exact duplicate CSS block: /* Голосования */
.poll-container */

.poll-question {
    font-weight: 700;
    margin-bottom: 12px;
}
.poll-option {
    margin-bottom: 10px;
    cursor: pointer;
}
.poll-option-bar {
    height: 40px;
    background: var(--premium-surface);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}
.poll-option-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: var(--premium-accent-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: white;
    font-size: 13px;
    font-weight: 600;
}
.poll-option-text {
    font-size: 13px;
    margin-bottom: 4px;
}
.poll-vote-count {
    font-size: 11px;
    color: var(--premium-text-tertiary);
    margin-top: 12px;
    text-align: center;
}
.poll-option-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--premium-surface-light);
    border: 1px solid var(--premium-border);
    border-radius: 12px;
    color: var(--premium-text-primary);
    margin-bottom: 8px;
    outline: none;
}
.poll-option-input:focus {
    border-color: var(--premium-accent);
}
/* OAI cleanup removed exact duplicate CSS block: /* Реакции */
.reactions */

.reaction {
    background: var(--premium-surface-light);
    border-radius: 30px;
    padding: 4px 10px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--premium-transition-bounce);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.reaction:hover {
    background: var(--premium-accent);
    transform: scale(1.1);
}

/* Ответ на сообщение */
.reply-indicator {
    background: var(--premium-surface);
    padding: 12px 16px;
    margin: 8px 20px 0;
    border-radius: 16px;
    border-left: 4px solid var(--premium-accent);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}
.reply-sender {
    font-weight: 700;
    color: var(--premium-accent);
}
.reply-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--premium-text-secondary);
}
.cancel-reply {
    cursor: pointer;
    color: var(--premium-text-tertiary);
    transition: var(--premium-transition);
}
.cancel-reply:hover {
    color: var(--premium-danger);
    transform: rotate(90deg);
}

/* История звонков */
.calls-list {
    max-height: 400px;
    overflow-y: auto;
}
.call-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-bottom: 1px solid var(--premium-border);
    transition: var(--premium-transition);
}
.call-item:hover {
    background: var(--premium-surface-light);
}
.call-item-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: var(--premium-accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    overflow: hidden;
}
.call-item-info {
    flex: 1;
}
.call-item-name {
    font-weight: 700;
}
.call-item-details {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--premium-text-secondary);
    margin-top: 4px;
}
.call-item-status.missed { color: var(--premium-danger); }
.call-item-status.answered { color: var(--premium-success); }
.call-item-actions i {
    font-size: 20px;
    cursor: pointer;
    color: var(--premium-text-secondary);
    transition: var(--premium-transition);
}
.call-item-actions i:hover {
    color: var(--premium-accent);
    transform: scale(1.1);
}

/* Список участников группы */
.members-list {
    max-height: 300px;
    overflow-y: auto;
    background: var(--premium-surface-light);
    border-radius: 16px;
    padding: 8px;
}
.member-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    cursor: pointer;
    border-radius: 12px;
    transition: var(--premium-transition);
}
.member-item:hover {
    background: var(--premium-surface);
}
.member-item.selected {
    background: var(--premium-accent-gradient);
    color: white;
}
.member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--premium-accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    overflow: hidden;
}
.check-icon {
    color: var(--premium-success);
    font-size: 18px;
}

/* Настройки */
.settings-section {
    margin-bottom: 24px;
    background: var(--premium-surface-light);
    padding: 16px;
    border-radius: 20px;
}
.settings-section h4 {
    font-size: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--premium-border);
}
.settings-item:last-child {
    border-bottom: none;
}
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--premium-surface);
    transition: 0.3s;
    border-radius: 30px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: var(--premium-text-secondary);
    transition: 0.3s;
    border-radius: 50%;
}
input:checked + .slider {
    background: var(--premium-accent-gradient);
}
input:checked + .slider:before {
    transform: translateX(26px);
    background: white;
}

/* Анимации */
.pulse {
    animation: messagePulse 0.5s ease-in-out;
}
@keyframes messagePulse {
    0% { transform: scale(1); background: rgba(139, 92, 246, 0.3); }
    50% { transform: scale(1.02); background: rgba(139, 92, 246, 0.5); }
    100% { transform: scale(1); background: transparent; }
}
.highlight {
    animation: highlightMessage 1s ease;
}
@keyframes highlightMessage {
    0% { background: rgba(139, 92, 246, 0.3); }
    100% { background: transparent; }
}
.edited-badge {
    font-size: 10px;
    color: var(--premium-text-tertiary);
    margin-left: 6px;
}
.forwarded-badge {
    font-size: 11px;
    color: var(--premium-text-secondary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}
 
/* Адаптация для мобильных */
@media (max-width: 768px) {
    .pinned-sender { min-width: 60px; font-size: 10px; }
    .reply-indicator { margin: 8px 12px 0; padding: 10px 12px; }
    .reply-text { max-width: 150px; }
    .call-item { padding: 10px; }
    .call-item-avatar { width: 40px; height: 40px; font-size: 16px; }
    .settings-section { padding: 12px; }
}

/* ========== ПАТЧ: ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ========== */

/* Страница входа */
#auth {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--premium-bg);
    padding: 20px;
}

.auth-box {
    background: var(--premium-surface);
    border-radius: 32px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--premium-shadow);
    border: 1px solid var(--premium-border);
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo i {
    font-size: 48px;
    color: var(--premium-accent);
    margin-bottom: 12px;
}

.auth-logo h2 {
    font-size: 24px;
    font-weight: 800;
    background: var(--premium-accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--premium-text-secondary);
    font-size: 14px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon i {
    position: absolute;
    left: 16px;
    color: var(--premium-text-tertiary);
    font-size: 16px;
}

.input-icon input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: var(--premium-surface-light);
    border: 2px solid transparent;
    border-radius: 30px;
    color: var(--premium-text-primary);
    font-size: 14px;
    outline: none;
}

.input-icon input:focus {
    border-color: var(--premium-accent);
    box-shadow: var(--premium-glow);
}

.auth-info {
    text-align: center;
    font-size: 12px;
    color: var(--premium-text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--premium-border);
}

.auth-info i {
    font-size: 14px;
    color: var(--premium-accent);
}

/* Подсветка сообщений */
.message.highlight {
    animation: highlightMessage 1s ease;
}

@keyframes highlightMessage {
    0% { background: rgba(139, 92, 246, 0.3); }
    100% { background: transparent; }
}

.edited-badge {
    font-size: 10px;
    color: var(--premium-text-tertiary);
    margin-left: 6px;
}

.forwarded-badge {
    font-size: 11px;
    color: var(--premium-text-secondary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Стикеры в сообщениях */
.message-media[src*="sticker"] {
    max-width: 150px;
    max-height: 150px;
    object-fit: contain;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .auth-box {
        padding: 30px 20px;
    }
    .auth-logo h2 {
        font-size: 20px;
    }
    .local-video {
        width: 120px;
        height: 90px;
        bottom: 80px;
    }
    .call-button {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}
/* ========== FINAL HOTFIX CSS ========== */
#app {
    width: 100%;
}
#authRoot {
    width: 100% !important;
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.message.message-sticker .message-bubble,
.message-bubble:has(.sticker-message),
.message-bubble:has(.sticker-image) {
    padding: 8px 10px !important;
    border-radius: 22px !important;
    min-width: 92px;
    box-shadow: none !important;
}
.message.outgoing.message-sticker .message-bubble,
.message.outgoing .message-bubble:has(.sticker-message),
.message.outgoing .message-bubble:has(.sticker-image) {
    background: linear-gradient(180deg, rgba(109, 79, 246, 0.34), rgba(109, 79, 246, 0.18)) !important;
    border: 1px solid rgba(167, 139, 250, 0.18) !important;
}
.message.incoming.message-sticker .message-bubble,
.message.incoming .message-bubble:has(.sticker-message),
.message.incoming .message-bubble:has(.sticker-image) {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.03)) !important;
    border: 1px solid rgba(148, 163, 184, 0.12) !important;
}
.sticker-message,
.sticker-emoji-only {
    font-size: 46px !important;
    line-height: 1 !important;
    display: block !important;
    padding: 2px !important;
    margin: 0 auto !important;
    text-align: center !important;
    background: transparent !important;
}
.sticker-image {
    max-width: 84px !important;
    max-height: 84px !important;
    display: block !important;
}
.reactions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.reaction {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.16);
    border: 1px solid rgba(139, 92, 246, 0.35);
    cursor: pointer;
    font-size: 12px;
}

/* ========== V3 CALL/STICKER HOTFIX ========== */
#auth {
  width: 100%;
  min-height: 100vh;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.call-window audio { display:none; }
.video-call-container video { outline: none; }
.message.message-sticker .message-bubble,
.message-bubble:has(.sticker-message),
.message-bubble:has(.sticker-image) {
  padding: 8px 10px !important;
  border-radius: 22px !important;
  min-width: 92px;
  box-shadow: none !important;
}
.message.outgoing.message-sticker .message-bubble,
.message.outgoing .message-bubble:has(.sticker-message),
.message.outgoing .message-bubble:has(.sticker-image) {
  background: linear-gradient(180deg, rgba(109, 79, 246, 0.34), rgba(109, 79, 246, 0.18)) !important;
  border: 1px solid rgba(167, 139, 250, 0.18) !important;
}
.message.incoming.message-sticker .message-bubble,
.message.incoming .message-bubble:has(.sticker-message),
.message.incoming .message-bubble:has(.sticker-image) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.03)) !important;
  border: 1px solid rgba(148, 163, 184, 0.12) !important;
}
.sticker-emoji-only { font-size: 46px !important; }

/* ========== FINAL PATCH CSS ========== */
.context-menu {
    z-index: 12000;
}
.reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
.reaction {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.18);
    border: 1px solid rgba(139, 92, 246, 0.35);
    cursor: pointer;
    font-size: 12px;
}
.manage-group-modal {
    width: min(760px, 94vw);
}
.group-members-wrap,
.group-candidates-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.group-member-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--premium-surface-light);
    border-radius: 16px;
}
.group-member-meta {
    flex: 1;
    min-width: 0;
}
.group-member-name {
    font-weight: 700;
}
.group-member-role {
    font-size: 12px;
    color: var(--premium-text-secondary);
}
.group-member-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.mini-btn {
    background: var(--premium-accent-gradient);
    color: white;
    border: none;
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
}
.mini-btn.danger {
    background: var(--premium-danger);
}
.empty-mini {
    color: var(--premium-text-secondary);
    padding: 6px 2px;
}


/* ===== PRO TELEGRAM-LIKE PROFILE PANEL ===== */
.profile-side-panel {
    position: fixed;
    inset: 0;
    z-index: 6000;
    pointer-events: none;
}
.profile-side-panel.active {
    pointer-events: auto;
}
.profile-side-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.35);
    opacity: 0;
    transition: opacity .22s ease;
}
.profile-side-panel.active .profile-side-backdrop {
    opacity: 1;
}
.profile-side-sheet {
    position: absolute;
    top: 0;
    right: 0;
    width: min(420px, 92vw);
    height: 100vh;
    background: var(--premium-surface);
    border-left: 1px solid var(--premium-border);
    box-shadow: -18px 0 40px rgba(0,0,0,.28);
    transform: translateX(100%);
    transition: transform .28s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.profile-side-panel.active .profile-side-sheet {
    transform: translateX(0);
}
.profile-side-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--premium-border);
    background: linear-gradient(135deg, var(--premium-surface), var(--premium-surface-light));
    flex-shrink: 0;
}
.profile-side-close {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--premium-text-primary);
    background: transparent;
    transition: var(--premium-transition);
}
.profile-side-close:hover {
    background: var(--premium-surface-light);
}
.profile-side-title { font-size: 18px; font-weight: 700; }
.profile-side-subtitle { font-size: 12px; color: var(--premium-text-secondary); }
.profile-side-content {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.profile-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 8px 0 2px;
}
.profile-hero-avatar {
    width: 104px;
    height: 104px;
    border-radius: 30px;
    overflow: hidden;
    background: var(--premium-accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 38px;
    font-weight: 800;
    flex-shrink: 0;
}
.profile-hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-hero-name {
    font-size: 22px;
    font-weight: 800;
    text-align: center;
    line-height: 1.2;
}
.profile-hero-meta {
    color: var(--premium-text-secondary);
    font-size: 13px;
    text-align: center;
}
.profile-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
.profile-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: var(--premium-surface-light);
    color: var(--premium-text-primary);
}
.profile-pill.verified { background: rgba(59,130,246,.16); color: #93c5fd; }
.profile-pill.premium { background: rgba(245,158,11,.14); color: #fcd34d; }
.profile-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 10px;
}
.profile-action-btn {
    border: none;
    cursor: pointer;
    border-radius: 18px;
    background: var(--premium-surface-light);
    color: var(--premium-text-primary);
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    transition: var(--premium-transition);
}
.profile-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--premium-shadow-sm);
}
.profile-action-btn i { font-size: 18px; }
.profile-card {
    background: var(--premium-surface-light);
    border-radius: 22px;
    padding: 14px 16px;
}
.profile-card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--premium-text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.profile-info-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(148,163,184,.12);
}
.profile-info-row:last-child { border-bottom: none; }
.profile-info-label { color: var(--premium-text-secondary); font-size: 13px; }
.profile-info-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--premium-text-primary);
    text-align: right;
    word-break: break-word;
}
.profile-about {
    color: var(--premium-text-primary);
    line-height: 1.45;
    font-size: 14px;
    white-space: pre-wrap;
    word-break: break-word;
}
.profile-members-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 2px;
}
.profile-member {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 18px;
    background: rgba(15, 23, 42, .14);
    cursor: pointer;
    transition: var(--premium-transition);
}
.profile-member:hover { background: rgba(139,92,246,.14); }
.profile-member-avatar {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--premium-accent-gradient);
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.profile-member-avatar img { width:100%; height:100%; object-fit:cover; }
.profile-member-name { font-size: 14px; font-weight: 700; }
.profile-member-sub { font-size: 12px; color: var(--premium-text-secondary); }
.profile-side-content img {
    max-width: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: 14px;
}
@media (max-width: 900px) {
    .profile-side-sheet { width: min(100vw, 420px); }
}

/* Pigeon web theme lock: the web build supports only Pigeon Dark and Pigeon Light. */
:root,
[data-theme="dark"],
[data-theme="forest"],
[data-theme="ocean"],
[data-theme="sunset"],
[data-theme="midnight"],
[data-theme="candy"],
[data-theme="aurora"],
[data-theme="graphite"],
[data-theme="rose"],
[data-theme="ember"] {
    --premium-bg: var(--pm-background-primary);
    --premium-surface: var(--pm-glass-background);
    --premium-surface-light: var(--pm-surface-secondary);
    --premium-accent: var(--pm-brand-primary);
    --premium-accent-dark: var(--pm-brand-primary-dark);
    --premium-accent-gradient: var(--pm-gradient-brand-primary);
    --premium-accent-glow: rgba(118, 87, 255, 0.34);
    --premium-success: var(--pm-status-success);
    --premium-danger: var(--pm-status-danger);
    --premium-warning: var(--pm-status-warning);
    --premium-info: var(--pm-status-info);
    --premium-text-primary: var(--pm-text-primary);
    --premium-text-secondary: var(--pm-text-secondary);
    --premium-text-tertiary: var(--pm-text-tertiary);
    --premium-border: var(--pm-divider);
    --premium-border-light: var(--pm-glass-border);
    --premium-shadow: var(--pm-shadow-glass);
    --premium-shadow-sm: var(--pm-shadow-subtle);
    --premium-glow: var(--pm-shadow-violet-glow);
}

[data-theme="light"] {
    --premium-bg: #f6f7fb;
    --premium-surface: rgba(255, 255, 255, 0.78);
    --premium-surface-light: rgba(17, 18, 26, 0.055);
    --premium-accent: var(--pm-brand-primary);
    --premium-accent-dark: var(--pm-brand-primary-dark);
    --premium-accent-gradient: var(--pm-gradient-brand-primary);
    --premium-accent-glow: rgba(118, 87, 255, 0.24);
    --premium-text-primary: #11121a;
    --premium-text-secondary: #555a70;
    --premium-text-tertiary: #7a8096;
    --premium-border: rgba(17, 18, 26, 0.10);
    --premium-border-light: rgba(17, 18, 26, 0.14);
    --premium-shadow: 0 22px 48px rgba(42, 44, 64, 0.16), inset 0 1px 0 rgba(255,255,255,0.82);
    --premium-shadow-sm: 0 10px 24px rgba(42, 44, 64, 0.10);
    --premium-glow: 0 0 22px rgba(118, 87, 255, 0.22);
}

body,
#app,
.chat-panel {
    background:
        radial-gradient(circle at 78% 12%, rgba(118, 87, 255, 0.14), transparent 28%),
        linear-gradient(180deg, var(--premium-bg), var(--pm-background-deep)) !important;
}

[data-theme="light"] body,
[data-theme="light"] #app,
[data-theme="light"] .chat-panel {
    background:
        radial-gradient(circle at 78% 12%, rgba(118, 87, 255, 0.13), transparent 28%),
        linear-gradient(180deg, #f8f8fc, #eef0f7) !important;
}

.chats-panel,
.chat-header,
.message-input-container,
.modal-content,
.profile-side-sheet,
.chats-footer,
.call-window,
.admin-panel,
#adminPanelModal .pm-admin-modal-card {
    background: var(--premium-surface) !important;
    border-color: var(--premium-border) !important;
    box-shadow: var(--premium-shadow-sm);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.chats-header,
.chats-footer {
    background: linear-gradient(135deg, rgba(18, 20, 42, 0.88), rgba(16, 18, 36, 0.72)) !important;
}

[data-theme="light"] .chats-header,
[data-theme="light"] .chats-footer {
    background: linear-gradient(135deg, rgba(255,255,255,0.86), rgba(246,247,251,0.72)) !important;
}

.search-box input,
.message-input,
.chat-item:hover,
.contact-item:hover,
.btn-secondary,
.profile-card,
.profile-member,
.chat-theme-item,
.modal input,
.modal textarea,
.modal select {
    background: var(--premium-surface-light) !important;
    border-color: var(--premium-border) !important;
}

.chat-item.active,
.profile-btn,
.chat-avatar,
.unread-badge,
.btn-primary,
.send-btn,
.voice-record-btn.recording {
    background: var(--premium-accent-gradient) !important;
    box-shadow: var(--premium-glow);
}

.call-container {
    background:
        radial-gradient(circle at 50% 32%, rgba(118, 87, 255, 0.22), transparent 30%),
        var(--pm-background-deep) !important;
}

#adminPanelModal .pm-admin-nav,
#adminPanelModal .pm-admin-status-box,
#adminPanelModal #adminsPanelContainer,
#adminPanelModal #adminsContainer,
#adminPanelModal #allowedPhonesContainer,
#adminPanelModal #usersContainer,
#adminPanelModal #blockedUsersContainer,
#adminPanelModal #adminReportsContainer,
#adminPanelModal #adminAuditContainer,
#adminPanelModal .pm-admin-section {
    background: rgba(16, 18, 36, 0.72) !important;
    border-color: var(--premium-border) !important;
}

#adminPanelModal .pm-admin-nav-button i,
#adminPanelModal .pm-admin-section a,
#adminPanelModal .pm-admin-section .fas {
    color: var(--premium-accent) !important;
}

#adminPanelModal .pm-admin-nav-button.active,
#adminPanelModal .pm-admin-section button:not(.btn-secondary),
#adminPanelModal .btn-primary {
    background: var(--premium-accent-gradient) !important;
    border-color: rgba(255,255,255,0.14) !important;
    color: var(--pm-text-primary) !important;
    box-shadow: var(--premium-glow) !important;
}

#adminPanelModal .pm-admin-section input,
#adminPanelModal .pm-admin-section textarea,
#adminPanelModal .pm-admin-section select {
    background: rgba(255,255,255,0.055) !important;
    border-color: var(--premium-border-light) !important;
    color: var(--premium-text-primary) !important;
}

/* Final visual polish: compact, two-theme Pigeon geometry. */
.chat-item,
.contact-item {
    min-height: 68px !important;
    padding: 10px 12px !important;
    margin-bottom: 3px !important;
    border-radius: 18px !important;
    box-shadow: none !important;
}

.chat-avatar,
.contact-avatar,
.call-item-avatar {
    width: 46px !important;
    height: 46px !important;
    border-radius: 16px !important;
    box-shadow: none !important;
}

.chat-name,
.contact-name,
.call-item-name {
    font-weight: 650 !important;
}

.chat-last-message,
.contact-phone,
.call-item-details {
    color: var(--premium-text-secondary) !important;
}

.search-box input,
.message-input {
    min-height: 44px !important;
    border-radius: 22px !important;
    background: var(--premium-surface-light) !important;
}

.modal-content {
    border-radius: 26px !important;
}

.modal-header {
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
}

.modal-body input,
.modal-body textarea,
.modal-body select {
    min-height: 44px !important;
    border-radius: 16px !important;
}

.calls-list {
    max-height: 420px !important;
}

.call-item {
    min-height: 76px !important;
    padding: 10px 12px !important;
    gap: 12px !important;
}

.call-button,
.control-btn {
    width: 52px !important;
    height: 52px !important;
}

[data-theme="light"] .chat-item,
[data-theme="light"] .contact-item,
[data-theme="light"] .modal-content,
[data-theme="light"] .profile-card,
[data-theme="light"] .chat-theme-item {
    background: rgba(255,255,255,0.82) !important;
    color: var(--premium-text-primary) !important;
    border-color: rgba(17,18,26,0.10) !important;
}
