    :root {
        --whatsapp-green: #25D366;
        --whatsapp-dark: #075E54;
        --whatsapp-light: #128C7E;
        --message-sent: #DCF8C6;
        --message-received: #FFFFFF;
        --border-color: #e0e0e0;
        --sidebar-bg: #f0f2f5;
        --chat-bg: #efeae2;
        --input-bg: #f0f0f0;
        --text-dark: #303030;
        --text-light: #667781;
        --online: #4ad504;
        --typing: #919191;
    }
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Helvetica, Arial, sans-serif;
}
    #chat-widget {
        z-index: 9998;
        width: 100%;
        max-width: 1400px;
        height: 90vh;

        border-radius: 20px;
        box-shadow: rgba(0, 0, 0, 0.2) 0px 15px 50px;
        display: none;
        overflow: hidden;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    .chat-container {
        width: 100%;
        max-width: 1400px;
        height: 90vh;

        border-radius: 20px;
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
        display: flex;
        overflow: hidden;
        position: relative;
    }


    .chat-sidebar {
        width: 30%;
        min-width: 350px;
        background: var(--sidebar-bg);
        border-right: 1px solid var(--border-color);
        display: flex;
        flex-direction: column;
        transition: all 0.3s ease;
    }

    .chat-sidebar-header {
        padding: 20px;
        background: var(--sidebar-bg);
        border-bottom: 1px solid var(--border-color);
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .user-profile {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .avatar-chat {
        min-width: 50px;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-weight: bold;
        font-size: 20px;
        position: relative;
        flex-shrink: 0;
    }

    .avatar-chat.online::after {
        content: '';
        position: absolute;
        bottom: 2px;
        right: 2px;
        width: 12px;
        height: 12px;
        background: #32c787;
        border-radius: 50%;
        border: 2px solid white;
    }

    .user-chat-info h3 {
        color: var(--text-dark);
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 3px;
    }

    .user-chat-info p {
        color: var(--text-light);
        font-size: 13px;
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .user-chat-info .status {
        font-size: 11px;
        padding: 2px 8px;
        border-radius: 10px;
        background: var(--whatsapp-green);
        color: white;
    }
    .edited-badge {
        font-size: 11px;
        color: #999;
        margin-left: 5px;
        font-style: italic;
    }
    .message-deleted-text {
        font-style: italic;
        color: #999;
        font-size: 13px;
    }

    .message-deleted {
        opacity: 0.8;
    }
    .status-btn {
        background: #ff9500;
        border-radius: 20px;
        width: 100px;
    }
    .chat-sidebar-actions {
        display: flex;
        gap: 15px;
    }

    .icon-chat-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: white;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-light);
        cursor: pointer;
        transition: all 0.2s;
        font-size: 18px;
    }

    .icon-chat-btn:hover {
        background: var(--border-color);
        color: var(--text-dark);
    }

    .chat-search-container {
        padding: 15px 20px;
        border-bottom: 1px solid var(--border-color);
    }

    .chat-search-box {
        position: relative;
    }

    div.chat-search-box input[type="text"] {
        width: 100%;
        padding: 12px 20px 12px 45px;
        border: none;
        border-radius: 25px !important;
        background: white;
        font-size: 14px;
        color: var(--text-dark);
        outline: none;
        transition: all 0.3s;
    }

    .chat-search-box > input:focus {
        box-shadow: 0 0 0 2px var(--whatsapp-green);
    }

    .chat-search-box i {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-light);
    }

    .rooms-list {
        flex: 1;
        overflow-y: auto;
        padding: 10px 0;
    }

    .room-item {
        padding: 15px 20px;
        display: flex;
        align-items: center;
        gap: 15px;
        cursor: pointer;
        transition: background 0.2s;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .room-item:hover {
        background: rgba(0,0,0,0.03);
    }

    .room-item.active {
        background: rgba(37, 211, 102, 0.1);
        border-left: 4px solid #3498db;
    }

    .room-avatar {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: linear-gradient(135deg, #667eea, #764ba2);
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 20px;
        flex-shrink: 0;
    }

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

    div.chat-container div.room-info h4 {
        color: var(--text-dark);
        font-size: 15px;
        margin-bottom: 5px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-weight: 600;
    }

    div.chat-container div.room-info p {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin: 0;
    }

    .last-message {
        font-size: 13px;
        color: var(--text-light);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: calc(100% - 60px);
    }

    .message-time {
        font-size: 11px;
        color: var(--text-light);
        flex-shrink: 0;
        margin-left: 10px;
        white-space: nowrap;
    }

    .unread-count {
        background: var(--whatsapp-green);
        color: white;
        font-size: 12px;
        padding: 2px 8px;
        border-radius: 10px;
        min-width: 20px;
        text-align: center;
    }

    .typing-indicator {
        color: var(--typing);
        font-style: italic;
        font-size: 12px;
    }

    .chat-area {
        flex: 1;
        display: flex;
        flex-direction: column;
        background: var(--chat-bg);
        background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%239C92AC' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    }

    .chat-header {
        padding: 20px;
        background: var(--sidebar-bg);
        border-bottom: 1px solid var(--border-color);
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .chat-partner-info {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .chat-header-actions {
        display: flex;
        gap: 15px;
    }

    .messages-container {
        flex: 1;
        padding: 20px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 10px;
        position: relative;
    }

    .date-separator {
        text-align: center;
        margin: 20px 0;
        position: relative;
    }

    .date-separator span {
        background: rgba(0,0,0,0.1);
        color: var(--text-light);
        padding: 5px 15px;
        border-radius: 15px;
        font-size: 12px;
    }

    .loading-older {
        text-align: center;
        padding: 10px;
        color: var(--text-light);
        font-size: 13px;
    }

    .message {
        max-width: 65%;
        padding: 8px 12px;
        margin-top: 10px;
        border-radius: 18px;
        position: relative;
        word-wrap: break-word;
        animation: messageAppear 0.3s ease;
    }

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

    .message.sent {
        background: var(--message-sent);
        align-self: flex-end;
        border-bottom-right-radius: 5px;
    }

    .message.received {
        background: var(--message-received);
        align-self: flex-start;
        border-bottom-left-radius: 5px;
        box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }

    .message-content {
        font-size: 14px;
        line-height: 1.4;
        color: var(--text-dark);
    }

    .message-time i {
        font-size: 14px;
    }

    .message-reply {
        background: rgba(0,0,0,0.05);
        border-left: 3px solid var(--whatsapp-green);
        padding: 8px 12px;
        margin-bottom: 8px;
        border-radius: 8px;
        cursor: pointer;
    }

    .reply-info {
        font-size: 12px;
        color: var(--whatsapp-dark);
        font-weight: bold;
        margin-bottom: 4px;
    }

    .reply-content {
        font-size: 13px;
        color: var(--text-light);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .message-file {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px;
        background: white;
        border-radius: 10px;
        margin-top: 8px;
    }

    .file-icon {
        font-size: 24px;
        color: var(--whatsapp-green);
    }

    .file-info {
        flex: 1;
    }

    .file-name {
        font-size: 13px;
        color: var(--text-dark);
        font-weight: bold;
    }

    .file-size {
        font-size: 11px;
        color: var(--text-light);
    }

    .download-btn {
        background: var(--whatsapp-green);
        color: white;
        border: none;
        padding: 5px 10px;
        border-radius: 5px;
        font-size: 12px;
        cursor: pointer;
    }

    .input-area {
        padding: 20px;
        background: var(--input-bg);
        border-top: 1px solid var(--border-color);
        display: flex;
        gap: 15px;
    }

    .input-wrapper {
        flex: 1;
        background: white;
        border-radius: 10px;
        padding: 10px 20px;
        display: flex;
        align-items: center;
        gap: 10px;
        max-height: 150px;
        overflow-y: auto;
    }

    .input-wrapper textarea {
        flex: 1;
        border: none;
        outline: none;
        resize: none;
        font-size: 15px;
        color: var(--text-dark);
        background: transparent;
        max-height: 120px;
        font-family: inherit;
    }

    .input-wrapper textarea::placeholder {
        color: var(--text-light);
    }

    .input-actions {
        display: flex;
        gap: 10px;
        align-items: center;
    }

    .emoji-btn, .attach-btn, .send-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s;
        font-size: 18px;
    }

    .emoji-btn, .attach-btn {
        background: transparent;
        color: var(--text-light);
    }

    .emoji-btn:hover, .attach-btn:hover {
        background: rgba(0,0,0,0.1);
    }

    .send-btn {
        background: var(--whatsapp-green);
        color: white;
    }

    .send-btn:hover {
        background: var(--whatsapp-dark);
        transform: scale(1.05);
    }

    .send-btn:disabled {
        background: var(--text-light);
        cursor: not-allowed;
    }

    .emoji-picker-container {
        position: absolute;
        bottom: 90px;
        right: 20px;
        z-index: 1000;
        box-shadow: 0 5px 30px rgba(0,0,0,0.2);
        border-radius: 15px;
        overflow: hidden;
        display: none;
    }

    .typing-bubble {
        background: white;
        padding: 10px 15px;
        border-radius: 18px;
        align-self: flex-start;
        box-shadow: 0 1px 2px rgba(0,0,0,0.1);
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
        color: var(--typing);
    }

    .typing-dots {
        display: flex;
        gap: 3px;
    }

    .typing-dots span {
        width: 6px;
        height: 6px;
        background: var(--typing);
        border-radius: 50%;
        animation: typing 1.4s infinite;
    }

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

    @keyframes typing {
        0%, 100% { opacity: 0.3; transform: translateY(0); }
        50% { opacity: 1; transform: translateY(-3px); }
    }

    .message-reactions {
        display: flex;
        gap: 5px;
        margin-top: 5px;
        flex-wrap: wrap;
    }

    .reaction {
        background: white;
        border: 1px solid var(--border-color);
        border-radius: 15px;
        padding: 3px 8px;
        font-size: 12px;
        display: flex;
        align-items: center;
        gap: 3px;
        cursor: pointer;
        transition: all 0.2s;
    }

    .reaction:hover {
        background: var(--sidebar-bg);
        transform: scale(1.05);
    }

    .reaction-count {
        font-size: 10px;
        color: var(--text-light);
    }

    .message-dropdown-chat {
        position: relative;
        display: inline-block;
    }

    .dropdown-chat-btn {
        position: absolute;
        right: 35px;
        top: 5px;
        width: 25px;
        height: 25px;
        font-size: 12px;
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid #ddd;
        border-radius: 50%;
        cursor: pointer;
        opacity: 0;
        transition: opacity 0.2s, transform 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
    }

    .dropdown-chat-btn:hover {
        background: #f0f0f0;
        transform: scale(1.1);
    }

    .dropdown-chat-content {
        display: none;
        position: absolute;
        right: 0;
        top: 30px;
        background: white;
        min-width: 160px;
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        border-radius: 8px;
        border: 1px solid #ddd;
        z-index: 1000;
        padding: 5px 0;
    }

    .dropdown-chat-content.show {
        display: block;
        animation: fadeIn 0.2s;
    }

    .dropdown-chat-item {
        padding: 10px 15px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 10px;
        color: #333;
        text-decoration: none;
        transition: background 0.2s;
        font-size: 14px;
    }

    .dropdown-chat-item:hover {
        background: #f5f5f5;
    }

    .dropdown-chat-item i {
        width: 16px;
        text-align: center;
        color: #666;
    }

    .dropdown-chat-item.delete:hover {
        color: #d32f2f;
    }

    .dropdown-chat-item.delete:hover i {
        color: #d32f2f;
    }

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

    .message.received .dropdown-chat-btn {
        right: 35px;
        background: rgba(240, 240, 240, 0.9);
    }

    .message.received .reaction-btn {
        right: 5px;
    }

    .message.sent .dropdown-chat-btn {
        right: 35px;
    }

    .message.sent .reaction-btn {
        right: 5px;
    }

    .message-reactions {
        display: flex;
        gap: 2px;
        margin-top: 5px;
        flex-wrap: wrap;
    }

    .reaction-item {
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid #ddd;
        border-radius: 10px;
        padding: 2px 6px;
        font-size: 12px;
        display: inline-flex;
        align-items: center;
        gap: 2px;
        cursor: pointer;
    }

    .reaction-item:hover {
        background: #f0f0f0;
    }
    .message-sender {
        font-size: 12px;
        font-weight: 600;
        color: var(--text-light);
        margin-bottom: 4px;
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .message.received .message-sender {
        color: #3498db;
    }

    .message.sent .message-sender {
        color: var(--text-light);
        justify-content: flex-end;
    }

    .message-reactions {
        display: flex;
        gap: 5px;
        margin-top: 5px;
        flex-wrap: wrap;
    }

    .reaction-item {
        background: white;
        border: 1px solid var(--border-color);
        border-radius: 15px;
        padding: 3px 8px;
        font-size: 12px;
        display: flex;
        align-items: center;
        gap: 3px;
        cursor: pointer;
        transition: all 0.2s;
    }

    .reaction-item:hover {
        background: var(--sidebar-bg);
        transform: scale(1.05);
    }

    .reaction-count {
        font-size: 10px;
        color: var(--text-light);
        font-weight: 500;
    }

    .message-content-wrapper {
        position: relative;
    }

    .message.sent .dropdown-chat-btn {
        top: 20px;
    }

    .message.sent .reaction-btn {
        top: 20px;
    }

    .message.received .dropdown-chat-btn {
        top: 20px;
    }

    .message.received .reaction-btn {
        top: 20px;
    }
    @media (max-width: 768px) {
        .chat-container {
            height: 100vh;
            border-radius: 0;
            max-width: 100%;
        }

        .chat-sidebar {
            min-width: 100%;
            position: absolute;
            z-index: 100;
            height: 100%;
        }

        .chat-sidebar.hidden {
            transform: translateX(-100%);
        }

        .chat-area {
            width: 100%;
        }

        .message {
            max-width: 85%;
        }

        .mobile-only {
            display: block;
        }

        .desktop-only {
            display: none;
        }
    }

    @media (min-width: 869px) {
        .mobile-only {
            display: none;
        }
    }

    ::-webkit-scrollbar {
        width: 8px;
    }

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

    ::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,0.2);
        border-radius: 4px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: rgba(0,0,0,0.3);
    }

    #createRoomModal {
        display: none;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 99999;
        
        width: 90%;
        max-width: 500px;
        min-width: 300px;
    }

    .online-users-panel {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: white;
        border-radius: 15px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.2);
        padding: 0;
        width: 400px;
        max-height: 80vh;
        z-index: 99999;
        display: none;
        overflow: hidden;
    }

    .online-users-panel span {
        color: #333;
        margin: 0;
        padding: 20px;
        font-size: 18px;
        font-weight: 600;
        border-bottom: 1px solid #f0f0f0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }

    .online-users-panel span i {
        font-size: 20px;
        color: #333;
    }

    .notification {
        position: fixed !important;
        top: 20px !important;
        right: 20px !important;
        background: var(--whatsapp-green) !important;
        color: white !important;
        padding: 15px 20px !important;
        border-radius: 10px !important;
        box-shadow: 0 5px 15px rgba(0,0,0,0.2) !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        z-index: 9999 !important;
        transform: translateX(150%) !important;
        transition: transform 0.3s ease !important;
    }

    .notification.show {
        transform: translateX(0) !important;
    }

    .loading {
        display: inline-block;
        width: 20px;
        height: 20px;
        border: 3px solid rgba(0,0,0,0.1);
        border-radius: 50%;
        border-top-color: var(--whatsapp-green);
        animation: spin 1s linear infinite;
    }

    @keyframes spin {
        to { transform: rotate(360deg); }
    }
    .message-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 5px;
        min-height: 24px;
    }

    .message-reactions {
        display: flex;
        gap: 5px;
        flex-wrap: wrap;
        flex: 1;
        margin-right: 10px;
    }


    .message-time i {
        font-size: 10px;
        color: #888;
    }

    .message.sent .message-time i {
        color: #4a9eff;
    }

    .reaction-item {
        background: white;
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 2px 6px;
        font-size: 12px;
        display: inline-flex;
        align-items: center;
        gap: 3px;
        cursor: pointer;
        transition: all 0.2s;
        height: 20px;
    }

    .reaction-item:hover {
        background: var(--sidebar-bg);
        transform: scale(1.05);
    }

    .reaction-count {
        font-size: 10px;
        color: var(--text-light);
        font-weight: 500;
    }

    .message.sent .dropdown-chat-btn {
        top: 5px;
        right: 35px;
    }

    .message.sent .reaction-btn {
        top: 5px;
        right: 5px;
    }

    .message.received .dropdown-chat-btn {
        top: 5px;
        right: 35px;
    }

    .message.received .reaction-btn {
        top: 5px;
        right: 5px;
    }

    .message.received:has(.message-sender) .dropdown-chat-btn,
    .message.received:has(.message-sender) .reaction-btn {
        top: 25px;
    }

    .message.sent:has(.message-sender) .dropdown-chat-btn,
    .message.sent:has(.message-sender) .reaction-btn {
        top: 25px;
    }

    .modal-chat {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        z-index: 5000;
        align-items: center;
        justify-content: center;
        animation: fadeIn 0.3s ease;
    }

    .modal-chat.show {
        display: flex;
    }

    .modal-chat-content {
        background: white;
        border-radius: 20px;
        width: 90%;
        max-width: 500px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        animation: slideUp 0.3s ease;
        overflow: hidden;
        max-height: 90vh;
        display: flex;
        flex-direction: column;
    }

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

    .modal-chat-header {
        padding: 25px 30px;
        background: linear-gradient(135deg, var(--whatsapp-light), var(--whatsapp-dark));
        color: white;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .modal-chat-header span {
        font-size: 20px;
        font-weight: 600;
        display: flex;
        color: white;
        align-items: center;
        gap: 10px;
        margin: 0;
    }

    .modal-close {
        background: transparent;
        border: none;
        color: white;
        font-size: 28px;
        cursor: pointer;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s;
    }

    .modal-close:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    .modal-chat-body {
        padding: 30px;
        flex: 1;
        overflow-y: auto;
    }

    .form-chat-group {
        margin-bottom: 25px;
    }

    .form-chat-group label {
        display: flex;
        align-items: center;
        gap: 10px;
        color: var(--text-dark);
        font-weight: 600;
        margin-bottom: 10px;
        font-size: 15px;
    }

    .form-chat-group label i {
        color: var(--whatsapp-light);
        width: 20px;
    }

    div.form-chat-group input[type="text"],
    div.form-chat-group input[type="number"],
    div.form-chat-group select {
        width: 100%;
        padding: 15px 20px;
        border: 2px solid var(--border-color);
        border-radius: 12px !important;
        font-size: 16px;
        color: var(--text-dark);
        background: white;
        transition: all 0.3s;
        outline: none;
    }

    div.form-chat-group input[type="text"]:focus,
    div.form-chat-group input[type="number"]:focus,
    div.form-chat-group select:focus {
        border-color: var(--whatsapp-green);
        box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
    }

    .form-chat-group input::placeholder {
        color: var(--text-light);
    }

    .input-hint {
        font-size: 13px;
        color: var(--text-light);
        margin-top: 8px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .input-hint i {
        font-size: 14px;
    }

    .modal-preview {
        background: var(--sidebar-bg);
        border-radius: 15px;
        padding: 20px;
        margin-top: 25px;
        border: 2px solid var(--border-color);
    }

    .preview-title {
        font-size: 14px;
        color: var(--text-light);
        font-weight: 600;
        margin-bottom: 15px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .preview-title::before {
        content: '👁️';
        font-size: 16px;
    }

    .preview-room {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 15px;
        background: white;
        border-radius: 12px;
        border: 1px solid var(--border-color);
    }

    .room-avatar.preview {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: linear-gradient(135deg, #667eea, #764ba2);
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 20px;
    }

    .room-info.preview h4 {
        color: var(--text-dark);
        font-size: 16px;
        margin: 0 0 5px 0;
        transition: color 0.3s;
    }

    .room-info.preview p {
        color: var(--text-light);
        font-size: 13px;
        margin: 0;
    }

    .modal-chat-footer {
        padding: 20px 30px;
        background: var(--sidebar-bg);
        border-top: 1px solid var(--border-color);
        display: flex;
        justify-content: flex-end;
        gap: 15px;
    }

    .btn-chat {
        padding: 12px 25px;
        border: none;
        border-radius: 10px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        min-width: 120px;
    }

    .btn-chat-primary {
        background: var(--whatsapp-green);
        color: white;
    }

    .btn-chat-primary:hover:not(:disabled) {
        background: var(--whatsapp-dark);
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
    }

    .btn-chat-primary:disabled {
        background: var(--text-light);
        cursor: not-allowed;
        opacity: 0.7;
    }

    .btn-chat-secondary {
        background: white;
        color: var(--text-dark);
        border: 2px solid var(--border-color);
    }

    .btn-chat-secondary:hover {
        background: var(--sidebar-bg);
        border-color: var(--text-light);
    }


    .char-counter {
        text-align: right;
        font-size: 12px;
        color: var(--text-light);
        margin-top: 5px;
    }

    .char-counter.warning {
        color: #ff9500;
    }

    .char-counter.error {
        color: #ff3b30;
    }

    .room-item.private-room {
        border-left: 4px solid #3498db;
    }

    .room-avatar.private {
        background: linear-gradient(135deg, #3498db, #2980b9) !important;
    }

    .private-badge {
        background: #3498db;
        color: white;
        font-size: 10px;
        padding: 2px 6px;
        border-radius: 10px;
        margin-left: 8px;
        font-weight: normal;
    }

    .online-user-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 15px;
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.2s;
        margin-bottom: 5px;
    }

    .online-user-item:hover {
        background: var(--sidebar-bg);
    }

    .online-user-info {
        display: flex;
        align-items: center;
        gap: 12px;
        flex: 1;
    }

    .online-user-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: linear-gradient(135deg, #667eea, #764ba2);
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-weight: bold;
        position: relative;
    }

    .online-user-avatar.online::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 10px;
        height: 10px;
        background: var(--online);
        border-radius: 50%;
        border: 2px solid white;
    }

    .online-user-name {
        font-weight: 600;
        color: var(--text-dark);
        font-size: 14px;
    }

    .online-user-company {
        font-size: 12px;
        color: var(--text-light);
        margin-top: 2px;
    }

    #onlineUsersList {
        max-height: calc(80vh - 70px);
        overflow-y: auto;
        padding: 0;
    }

    .private-chat-btn {
        background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
        color: white;
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        flex-shrink: 0;
    }

    .private-chat-btn:hover:not(:disabled) {
        transform: scale(1.1);
        box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
    }

    .private-chat-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    .private-chat-btn i {
        font-size: 16px;
    }

    .call-modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.9);
        z-index: 3000;
        align-items: center;
        justify-content: center;
        animation: fadeIn 0.3s ease;
    }

    .call-container {
        background: white;
        border-radius: 20px;
        padding: 40px;
        text-align: center;
        width: 90%;
        max-width: 400px;
        animation: slideUp 0.3s ease;
    }

    .call-container.active {
        max-width: 800px;
        width: 95%;
        height: 90vh;
        display: flex;
        flex-direction: column;
    }

    .caller-avatar {
        width: 100px;
        height: 100px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--whatsapp-light), var(--whatsapp-dark));
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 40px;
        margin: 0 auto 20px;
        animation: pulse 2s infinite;
    }

    @keyframes pulse {
        0% { transform: scale(1); }
        50% { transform: scale(1.05); }
        100% { transform: scale(1); }
    }

    .caller-info h3 {
        color: var(--text-dark);
        font-size: 24px;
        font-weight: 600;
        margin-bottom: 10px;
    }

    .caller-info p {
        color: var(--text-light);
        font-size: 16px;
        margin-bottom: 10px;
    }

    .call-timer {
        font-size: 24px;
        font-weight: bold;
        color: var(--whatsapp-green);
        margin: 10px 0;
    }

    .call-controls {
        display: flex;
        justify-content: center;
        gap: 30px;
        margin-top: 30px;
    }

    .call-btn {
        width: 70px;
        height: 70px;
        border-radius: 50%;
        border: none;
        font-size: 28px;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .call-btn.accept {
        background: var(--whatsapp-green);
        color: white;
    }

    .call-btn.reject {
        background: #ff3b30;
        color: white;
    }

    .call-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    }

    .call-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 1px solid var(--border-color);
    }

    .call-info h3 {
        margin: 0;
        font-size: 22px;
        font-weight: 600;
        color: var(--text-dark);
        margin-bottom: 0;
    }

    .chat-partner-info h3 {
        font-weight: bold;
        font-size: 20px;
        color: var(--text-dark);
        margin-bottom: 0;
    }
    .chat-partner-info p {
        font-size: 14px;
        color: var(--text-dark);
        margin-bottom: 0;
    }
    .call-info p {
        margin: 5px 0 0;
        color: var(--text-light);
    }

    .call-minimize {
        background: transparent;
        border: none;
        color: var(--text-light);
        font-size: 20px;
        cursor: pointer;
    }

    .call-participants {
        flex: 1;
        display: flex;
        gap: 20px;
        margin-bottom: 20px;
    }

    .participant {
        flex: 1;
        border-radius: 15px;
        overflow: hidden;
        background: #000;
        position: relative;
        min-height: 300px;
    }

    .participant.local {
        border: 3px solid var(--whatsapp-green);
    }

    .participant video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        background: #000;
    }

    .participant-info {
        position: absolute;
        bottom: 10px;
        left: 10px;
        right: 10px;
        background: rgba(0,0,0,0.7);
        color: white;
        padding: 8px 15px;
        border-radius: 10px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .audio-indicator {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background: rgba(255,255,255,0.2);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .call-actions {
        display: flex;
        justify-content: center;
        gap: 20px;
        padding: 20px;
        background: var(--sidebar-bg);
        border-radius: 15px;
    }

    .call-action-btn {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        border: none;
        background: white;
        color: var(--text-dark);
        font-size: 22px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
        box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    }

    .call-action-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }

    .call-action-btn.end-call {
        background: #ff3b30;
        color: white;
    }

    .call-action-btn.active {
        background: var(--whatsapp-green);
        color: white;
    }

    .minimized-call {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background: white;
        border-radius: 15px;
        padding: 15px 20px;
        display: flex;
        align-items: center;
        gap: 15px;
        box-shadow: 0 5px 30px rgba(0,0,0,0.3);
        z-index: 9999;
        animation: slideInRight 0.3s ease;
    }

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

    .minimized-info {
        display: flex;
        align-items: center;
        gap: 10px;
        flex: 1;
    }

    .minimized-info i {
        color: var(--whatsapp-green);
        font-size: 18px;
    }

    .minimized-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: none;
        background: var(--sidebar-bg);
        color: var(--text-dark);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .minimized-btn.end {
        background: #ff3b30;
        color: white;
    }

    .minimized-btn:hover {
        transform: scale(1.1);
    }
    .group-invitation-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 3000;
        backdrop-filter: blur(5px);
        animation: fadeIn 0.3s ease;
    }

    .group-invitation-content {
        background: white;
        border-radius: 20px;
        width: 90%;
        max-width: 400px;
        overflow: hidden;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        animation: slideUp 0.4s ease;
    }

    .group-invitation-header {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        padding: 30px;
        text-align: center;
        color: white;
    }

    .group-invitation-icon {
        font-size: 50px;
        margin-bottom: 15px;
        opacity: 0.9;
    }

    .group-invitation-title {
        font-size: 22px;
        font-weight: 600;
        margin-bottom: 5px;
    }

    .group-invitation-subtitle {
        font-size: 14px;
        opacity: 0.9;
    }

    .group-invitation-body {
        padding: 30px;
    }

    .group-invitation-info {
        background: #f8f9fa;
        border-radius: 12px;
        padding: 20px;
        margin-bottom: 25px;
    }

    .group-info-item {
        display: flex;
        align-items: center;
        margin-bottom: 15px;
        padding-bottom: 15px;
        border-bottom: 1px solid #eee;
    }

    .group-info-item:last-child {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

    .group-info-icon {
        width: 40px;
        height: 40px;
        background: #e3f2fd;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 15px;
        color: #1976d2;
        font-size: 18px;
    }

    .group-info-text {
        flex: 1;
    }

    .group-info-label {
        font-size: 12px;
        color: #666;
        margin-bottom: 3px;
    }

    .group-info-value {
        font-size: 15px;
        font-weight: 500;
        color: #333;
    }

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

    .group-invitation-btn {
        flex: 1;
        padding: 15px;
        border: none;
        border-radius: 12px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        transition: all 0.3s ease;
    }

    .group-invitation-btn-accept {
        background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
        color: white;
    }

    .group-invitation-btn-accept:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(76, 175, 80, 0.3);
    }

    .group-invitation-btn-decline {
        background: #f5f5f5;
        color: #666;
    }

    .group-invitation-btn-decline:hover {
        background: #e0e0e0;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    @keyframes slideUp {
        from { 
            opacity: 0; 
            transform: translateY(50px) scale(0.95); 
        }
        to { 
            opacity: 1; 
            transform: translateY(0) scale(1); 
        }
    }
    @keyframes roomPulse {
        0% {
            background-color: rgba(37, 211, 102, 0.08);
        }
        50% {
            background-color: rgba(37, 211, 102, 0.18);
        }
        100% {
            background-color: rgba(37, 211, 102, 0.08);
        }
    }

    .room-item.has-unread:not(.active) {
        animation: roomPulse 1.5s infinite;
    }
    #emoji-container {
        display: none;
        position: absolute;
        bottom: 83px;
        right: 73px;
        z-index: 1000;
        background-color: white;
        border: 1px solid #ccc;
        border-radius: 10px;
        padding: 10px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        width: 300px;
        max-height: 250px;
        overflow-y: scroll;
    }

    #emoji-container.show {
        display: block;;
        transform: translateY(0);
    }

    #emoji-container .emoji {
        cursor: pointer;
        font-size: 20px;
        margin: 3px;
        transition: transform 0.1s ease;
    }

    #emoji-container .emoji:hover {
        transform: scale(1.2);
    }