:root {
            --bg-dark: #121212;
            --bg-gradient: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
            --card-bg: #1e1e1e;
            --card-header-bg: #252525;
            --accent-primary: #0d6efd;
            --accent-hover: #0b5ed7;
            --text-main: #ffffff;
            --text-muted: #b0b0b0;
            --text-dim: #909090;
            --border-color: #404040;
            --input-bg: #3a3a3a;
        }

        body {
            background: var(--bg-gradient);
            color: var(--text-main);
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            min-height: 100vh;
            padding-top: 84px;
        }

        /* Ajuste para usar 90% da largura da tela em dispositivos desktop */
        @media (min-width: 1200px) {
            .container, .container-lg, .container-xl, .container-xxl {
                max-width: 90% !important;
                width: 90% !important;
            }
        }

        .navbar {
            background-color: rgba(30, 30, 30, 0.95) !important;
            backdrop-filter: blur(10px);
            border-bottom: 1px solid var(--border-color);
            margin-bottom: 0;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            width: 100%;
            z-index: 2000;
        }

        .messages-container {
            max-width: 900px;
            margin: 0 auto 40px;
            background: var(--card-bg);
            border-radius: 16px;
            border: 1px solid var(--border-color);
            overflow: hidden;
            min-height: 70vh;
            display: flex;
            flex-direction: column;
            box-shadow: 0 10px 30px rgba(0,0,0,0.4);
        }

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

        .chat-list {
            flex: 1;
            overflow-y: auto;
        }

        .chat-item {
            padding: 20px 30px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            gap: 20px;
            cursor: pointer;
            transition: all 0.2s;
            text-decoration: none;
            color: inherit;
        }

        .chat-item:hover {
            background-color: rgba(255, 255, 255, 0.03);
            padding-left: 35px;
        }

        .chat-item:hover .btn-delete-chat {
            opacity: 1;
        }

        .btn-delete-chat {
            background: transparent;
            border: 1px solid transparent;
            color: var(--text-dim);
            border-radius: 8px;
            padding: 6px 10px;
            font-size: 14px;
            cursor: pointer;
            flex-shrink: 0;
            opacity: 0;
            transition: opacity 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
        }

        .btn-delete-chat:hover {
            background: rgba(255, 107, 107, 0.15);
            border-color: #ff6b6b;
            color: #ff6b6b;
        }

        .avatar-container {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            overflow: hidden;
            background: var(--input-bg);
            flex-shrink: 0;
            border: 2px solid var(--border-color);
        }

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

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

        .chat-name {
            font-weight: 600;
            font-size: 1.1rem;
            margin-bottom: 4px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
            color: var(--text-main);
        }

        .chat-name-main {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
        }

        .chat-direction {
            color: var(--text-dim);
            font-weight: 500;
            line-height: 1;
            min-width: 10px;
        }

        .chat-last-msg {
            color: var(--text-muted);
            font-size: 0.9rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .chat-time {
            font-size: 0.75rem;
            color: var(--text-dim);
            font-weight: 400;
        }

        .empty-state {
            text-align: center;
            padding: 100px 20px;
            color: var(--text-dim);
        }

        .empty-state-icon {
            font-size: 4rem;
            margin-bottom: 20px;
            display: block;
            opacity: 0.3;
        }

        /* Modal de Chat (unificado com profile.html) */
        .chat-modal {
            display: none;
            position: fixed;
            bottom: 20px;
            right: 20px;
            width: 400px;
            height: 550px;
            background: var(--card-bg);
            border-radius: 16px;
            box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
            z-index: 10000;
            flex-direction: column;
            border: 1px solid var(--border-color);
            overflow: hidden;
        }
        .chat-modal.show { display: flex; }
        .chat-header { 
            background: var(--card-header-bg); 
            padding: 15px 20px; 
            display: flex; 
            justify-content: space-between; 
            align-items: center; 
            border-bottom: 1px solid var(--border-color); 
        }
        .chat-header h6 { margin: 0; font-weight: 600; color: var(--text-main); }
        .chat-header-actions {
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }
        .btn-block-profile {
            background: transparent;
            border: 1px solid #ff6b6b;
            color: #ff6b6b;
            border-radius: 8px;
            padding: 4px 10px;
            font-size: 12px;
            line-height: 1.2;
            transition: all 0.2s;
        }

        .btn-block-profile:hover {
            background: #ff6b6b;
            color: #fff;
        }

        .chat-messages {
            flex: 1; 
            padding: 20px; 
            overflow-y: auto; 
            display: flex; 
            flex-direction: column; 
            gap: 12px; 
            background: #151515; 
        }
        .message-bubble { max-width: 85%; padding: 10px 15px; border-radius: 18px; font-size: 14px; line-height: 1.5; position: relative; }
        .message-sent { align-self: flex-end; background-color: var(--accent-primary); color: white; border-bottom-right-radius: 4px; }
        .message-received { align-self: flex-start; background-color: var(--border-color); color: var(--text-main); border-bottom-left-radius: 4px; }
        .message-time { font-size: 10px; margin-top: 5px; display: block; text-align: right; opacity: 0.6; }

        /* Botão de deletar mensagem */
        .btn-delete-msg {
            display: none;
            position: absolute;
            top: 4px;
            left: -28px;
            background: transparent;
            border: none;
            color: rgba(255,255,255,0.35);
            font-size: 13px;
            cursor: pointer;
            padding: 2px 5px;
            border-radius: 6px;
            line-height: 1;
            transition: color 0.15s;
        }
        .message-sent:hover .btn-delete-msg {
            display: inline-block;
        }
        .btn-delete-msg:hover {
            color: #ff6b6b;
        }

        /* Indicador de status não deve herdar opacidade */
        .message-time .message-status {
            opacity: 1 !important;
        }
        .chat-input-area { padding: 15px; background: var(--card-header-bg); border-top: 1px solid var(--border-color); display: flex; gap: 10px; }
        .chat-input { flex: 1; background: var(--input-bg); border: 1px solid var(--border-color); color: white; border-radius: 25px; padding: 8px 18px; font-size: 14px; transition: border-color 0.2s; }
        .form-control::placeholder,
        .form-select::placeholder,
        .chat-input::placeholder {
            color: var(--text-main) !important;
            opacity: 0.7;
        }
        .chat-input:focus { outline: none; border-color: var(--accent-primary); }
        .btn-send-chat { background: var(--accent-primary); border: none; color: white; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.2s; }
        .btn-send-chat:hover { transform: scale(1.1); background: var(--accent-hover); }
        .chat-status { font-size: 11px; color: var(--text-dim); text-align: center; padding: 8px; background: rgba(0,0,0,0.2); }
        .btn-close-chat { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 20px; transition: color 0.2s; }
        .btn-close-chat:hover { color: white; }

        /* Indicadores de Status de Mensagem */
        .message-status {
            font-size: 11px;
            margin-left: 4px;
            font-weight: bold;
            display: inline-block;
            line-height: 1;
        }
        .message-status.sent {
            color: rgba(255, 255, 255, 0.4) !important; /* ·· - 40% cinza (enviada) */
        }
        .message-status.delivered {
            color: rgba(255, 255, 255, 0.6) !important; /* •• - 60% cinza (entregue) */
        }
        .message-status.read {
            color: rgba(255, 255, 255, 0.8) !important; /* ✓✓ - 80% cinza (lida) */
            filter: none !important;
        }

        /* Quick Menu */
        .quick-menu {
            position: relative;
            display: inline-block;
            z-index: 2147483646;
        }
        .quick-menu summary {
            list-style: none;
            cursor: pointer;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 0.35rem 0.6rem;
            color: var(--text-main);
            user-select: none;
            position: relative;
            z-index: 99999;
        }
        .quick-menu summary::-webkit-details-marker {
            display: none;
        }
        .quick-menu[open] {
            z-index: 2147483647;
        }
        .quick-menu[open] .quick-menu-items {
            display: block;
        }
        .quick-menu-items {
            display: none;
            position: absolute;
            right: 0;
            top: 45px;
            min-width: 220px;
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            z-index: 2147483647;
            padding: 0.5rem;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
        }

        @media (max-width: 1200px) {
            #currentUserDisplay {
                display: none !important;
            }
        }

        @media (max-width: 991px) {
            #myProfileBtn, 
            #ouroBtn,
            #ouroBadge,
            #adminMenuLink,
            #adminPanelBtnContainer {
                display: none !important;
            }
            .navbar-nav {
                padding-top: 1rem;
            }
        }

        @media (max-width: 576px) {
            .quick-menu-items {
                right: -10px;
                top: 45px;
                min-width: 200px;
            }
            .messages-header {
                padding: 15px 20px;
            }
            .chat-item {
                padding: 15px 20px;
                gap: 12px;
            }
            .avatar-container {
                width: 50px;
                height: 50px;
            }
            .chat-name {
                font-size: 1rem;
            }
            .chat-last-message {
                font-size: 0.8rem;
            }
        }
        .quick-menu-items a,
        .quick-menu-items button {
            width: 100%;
            text-align: left;
            display: block;
            background: transparent;
            border: none;
            color: var(--text-main);
            text-decoration: none;
            padding: 0.5rem 0.65rem;
            border-radius: 8px;
        }
        .badge-ouro, .badge.bg-warning {
            background: linear-gradient(90deg, #ffd700 0%, #fffbe6 50%, #ffd700 100%) !important;
            background-size: 200% auto !important;
            color: #7a5a00 !important;
            border: 1px solid #ffe066;
            font-weight: bold;
            letter-spacing: 0.5px;
            box-shadow: 0 1px 4px rgba(255, 215, 0, 0.3);
            animation: shine 3s linear infinite;
        }
        @keyframes shine {
            to { background-position: 200% center; }
        }
