      :root {
            --primary: #ee151e;
            --primary-light: rgba(238, 21, 30, 0.1);
            --primary-dark: #c91119;
            --dark: #000000;
            --darker: #111827;
            --light: #ffffff;
            --gray: #f3f4f6;
            --light-gray: #f9fafc;
            --medium-gray: #e5e7eb;
            --dark-gray: #6b7280;
            --transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
        }

        body {
            font-family: 'Plus Jakarta Sans', sans-serif;
            background-color: var(--light-gray);
            color: var(--dark);
            overflow-x: hidden;
            overflow-y: hidden;
            min-height: 100vh;
            margin-top: 73px;
        }

        .topbar {
            background: var(--light);
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
            padding: 1rem 0;
            position: fixed;
            width: 100%;
            top: 0;
            z-index: 1000;
            transition: var(--transition);
        }

        .topbar.scrolled {
            padding: 0.7rem 0;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        }

        .topbar-brand img {
            height: 35px;
            transition: var(--transition);
        }

        .topbar-brand:hover img {
            transform: scale(1.05);
        }

        .avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--primary-light);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--primary);
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            position: relative;
            overflow: hidden;
        }

        .avatar:hover {
            background: var(--primary);
            color: var(--light);
            transform: translateY(-2px);
        }

        .notification-badge {
            position: absolute;
            top: -5px;
            right: -5px;
            background: var(--primary);
            color: white;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.7rem;
            font-weight: 700;
            border: 2px solid white;
        }

        .main-content {
            margin-left: 0;
            padding: 30px;
            transition: var(--transition);
            flex: 1;
        }

        .section-title {
            position: relative;
            display: inline-block;
            font-weight: 800;
            font-size: 2rem;
            margin-bottom: 25px;
            color: var(--dark);
        }

        .section-title::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 0;
            width: 40px;
            height: 3px;
            background: var(--primary);
            border-radius: 2px;
        }

        .chat-container {
            display: flex;
            height: calc(100vh - 133px);
            background: var(--light);
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
            border: 1px solid rgba(0, 0, 0, 0.03);
        }

        .conversations-list {
            width: 350px;
            border-right: 1px solid var(--medium-gray);
            display: flex;
            flex-direction: column;
            background: var(--light-gray);
            flex-shrink: 0;
        }

        .chat-search {
            padding: 20px;
            border-bottom: 1px solid var(--medium-gray);
            background: var(--light);
        }

        .chat-search-container {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .chat-search-container .input-group {
            flex-grow: 1;
            margin-bottom: 0;
            background: var(--light-gray);
            border-radius: 20px;
            padding: 5px 15px;
            transition: var(--transition);
            border: 1px solid var(--medium-gray);
        }

        .new-chat-btn {
            white-space: nowrap;
            padding: 8px 15px;
            border-radius: 20px;
        }

        .chat-search-container .input-group:focus-within {
            background: var(--light);
            box-shadow: 0 0 0 3px var(--primary-light);
            border-color: var(--primary);
        }

        .chat-search input {
            background: transparent;
            border: none;
            box-shadow: none;
        }

        .chat-search input:focus {
            box-shadow: none;
        }

        .chat-tabs {
            padding: 15px 20px;
            border-bottom: 1px solid var(--medium-gray);
            background: var(--light);
        }

        .chat-tabs .nav-link {
            padding: 8px 15px;
            border-radius: 20px;
            font-weight: 600;
            color: var(--dark-gray);
            transition: var(--transition);
        }

        .chat-tabs .nav-link.active {
            background: var(--primary-light);
            color: var(--primary);
        }

        .conversations {
            flex: 1;
            overflow-y: auto;
            background: var(--light);
        }

        .conversation-item {
            padding: 15px 20px;
            border-bottom: 1px solid var(--medium-gray);
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            position: relative;
        }

        .conversation-item::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 0;
            height: 100%;
            background: var(--primary-light);
            transition: var(--transition);
            z-index: 0;
        }

        .conversation-item:hover::before,
        .conversation-item.active::before {
            width: 100%;
        }

        .conversation-item:hover,
        .conversation-item.active {
            z-index: 1;
        }

        .conversation-avatar {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            overflow: hidden;
            margin-right: 15px;
            flex-shrink: 0;
            position: relative;
            z-index: 1;
            background-color: var(--primary);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            color: var(--light);
        }

        .conversation-info {
            flex: 1;
            min-width: 0;
            position: relative;
            z-index: 1;
        }

        .conversation-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 5px;
        }

        .conversation-name {
            font-weight: 700;
            font-size: 0.95rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .conversation-time {
            font-size: 0.8rem;
            color: var(--dark-gray);
        }

        .conversation-seller-type {
            font-size: 0.75rem;
            color: var(--primary);
            font-weight: 600;
            margin-bottom: 3px;
        }

        .conversation-preview {
            font-size: 0.85rem;
            color: var(--dark-gray);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .chat-window {
            flex: 1;
            display: flex;
            flex-direction: column;
            background: var(--light);
        }

        .chat-header {
            padding: 15px 20px;
            border-bottom: 1px solid var(--medium-gray);
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: var(--light);
            flex-shrink: 0;
        }

        .chat-partner {
            display: flex;
            align-items: center;
        }

        .chat-partner-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            overflow: hidden;
            margin-right: 15px;
            background-color: var(--primary);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            color: var(--light);
        }

        .chat-partner-info h5 {
            font-weight: 700;
            margin-bottom: 2px;
            font-size: 1rem;
        }

        .chat-partner-info .status {
            font-size: 0.8rem;
            color: var(--dark-gray);
        }

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

        .chat-header-actions .btn {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
        }

        .messages-container {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
            background: var(--light-gray);
            display: flex;
            flex-direction: column;
        }

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

        .date-separator span {
            background: var(--light-gray);
            padding: 5px 15px;
            border-radius: 15px;
            font-size: 0.8rem;
            color: var(--dark-gray);
            position: relative;
            z-index: 1;
        }

        .date-separator:before {
            content: '';
            position: absolute;
            top: 50%;
            left: 0;
            right: 0;
            height: 1px;
            background: var(--medium-gray);
            z-index: 0;
        }

        .message {
            max-width: 70%;
            margin-bottom: 15px;
            display: flex;
            flex-direction: column;
        }

        .message.received {
            align-self: flex-start;
        }

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

        .message-bubble {
            padding: 12px 15px;
            border-radius: 18px;
            position: relative;
            overflow-wrap: break-word;
        }

        .message.received .message-bubble {
            background: var(--light);
            border-top-left-radius: 4px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        }

        .message.sent .message-bubble {
            background: var(--primary);
            color: white;
            border-top-right-radius: 4px;
            box-shadow: 0 2px 5px rgba(238, 21, 30, 0.2);
        }

        .message-time {
            font-size: 0.7rem;
            color: var(--dark-gray);
            margin-top: 5px;
            align-self: flex-end;
        }

        .message-status {
            font-size: 0.7rem;
            margin-left: 5px;
        }

        .message-input {
            padding: 15px 20px;
            border-top: 1px solid var(--medium-gray);
            flex-shrink: 0;
        }

        #platform-users-list .list-group-item {
            cursor: pointer;
            transition: var(--transition);
        }

        #platform-users-list .list-group-item:hover {
            background-color: var(--primary-light);
            color: var(--primary);
        }

        #platform-users-list .user-avatar {
            width: 35px;
            height: 35px;
            border-radius: 50%;
            background: var(--medium-gray);
            color: var(--dark-gray);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 0.8rem;
            margin-right: 10px;
            flex-shrink: 0;
        }


        .empty-state {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            height: 100%;
            color: var(--dark-gray);
            padding: 20px;
        }

        .empty-state i {
            font-size: 3rem;
            margin-bottom: 15px;
            color: var(--medium-gray);
        }

        .empty-state h4 {
            font-weight: 700;
            color: var(--darker);
        }

        
        @media (max-width: 768px) {

            
            .main-content {
                padding: 10px 0 0;
            }

            .section-title {
                padding: 0 15px;
                font-size: 1.5rem;
                margin-bottom: 20px;
            }

            .chat-container {
             
                height: calc(100vh - 83px);
                border-radius: 0;
                box-shadow: none;
                flex-direction: row;
               
            }

           
            .conversations-list {
                width: 100%;
                border-right: none;
                flex-shrink: 1;
                
            }

            
            .chat-window {
                position: absolute;

                width: 100%;
                height: 100%;
                flex-shrink: 0;

                transform: translateX(100%);
                transition: transform 0.3s ease-in-out;
                z-index: 10;
            }


            .chat-container.show-chat-window .chat-window {
                transform: translateX(0);
            }


            .chat-search-container {
                flex-wrap: wrap;
            }

            .chat-search-container .input-group,
            .new-chat-btn {
                width: 100%;
            }
        }

        

        .btn-profile {
            width: 45px;
            height: 45px;
            border-radius: 50%;
            background-color: var(--primary);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            font-weight: 700;
            border: 2px solid var(--primary-light);
        }

        .btn-profile:focus {
            border-color: var(--primary);
        }

        .dropdown-menu {
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            border: none;
            padding: 10px;
        }

        .dropdown-item {
            font-weight: 600;
            padding: 10px 20px;
            border-radius: 8px;
            transition: all 0.2s ease-in-out;
        }

        .dropdown-item:active,
        .dropdown-item:hover {
            background-color: var(--primary-light);
            color: var(--primary);
        }

        .dropdown-item i {
            color: var(--primary);
        }

        @media (max-width: 768px) {
            .main-content {
                padding: 10px 0 0;
            }

            .section-title {
                padding: 0 15px;
                font-size: 1.5rem;
                margin-bottom: 20px;
            }

            .chat-container {
                height: calc(100vh - 83px);
                border-radius: 0;
                box-shadow: none;
                flex-direction: row;
            }

            .conversations-list {
                width: 100%;
                border-right: none;
                flex-shrink: 1;
            }

            .chat-window {
                position: absolute;
                width: 100%;
                height: 100%;
                flex-shrink: 0;
                transform: translateX(100%);
                transition: transform 0.3s ease-in-out;
                z-index: 10;
            }

            .chat-container.show-chat-window .chat-window {
                transform: translateX(0);
            }
        }

        .btn-primary {
            background-color: var(--primary);
            color: #ffffff;
            border-color: var(--primary);
        }

        .btn-primary:hover {
            background-color: #b80b11;
            color: #ffffff;
            border-color: var(--primary);
        }

        .btn-primary:focus {
            background-color: var(--primary) !important;
            color: #ffffff;
            border-color: var(--primary) !important;
        }

        body.chat-page-active {
            overflow-y: hidden;
            height: 100vh;
            min-height: 100vh;
            position: fixed;

            width: 100%;
        }

        @media (max-width: 768px) {


            .chat-container {
                height: calc(100vh - 73px);

                border-radius: 0;
            }

            .chat-header #back-to-conversations {
                z-index: 20;
                font-size: 1.2rem;
            }

         
            .chat-window {
                transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
                will-change: transform;
                
            }

        }


        body.chat-page-active {
            height: 100vh;
            overflow: hidden;

        }


        #chat-main-container {
            height: calc(100% - 73px);

        }

        @media (max-width: 768px) {

            .chat-container {
                position: fixed;
 
                top: 73px;

                left: 0;
                right: 0;
                bottom: 0;

                height: auto;

                z-index: 998;

            }


            .chat-window {
                height: 100%;
  
            }


            .messages-container {
                flex: 1 1 auto;
  
                overflow-y: auto;

            }

            .message-input {
                flex: 0 0 auto;

            }
        }


        .chat-header-left {
            display: flex;
            align-items: center;
            flex-grow: 1;

        }

        #back-to-dashboard-btn {
            border-color: var(--primary);
            color: var(--primary);
            display: inline-flex;
            align-items: center;
        }

        #back-to-dashboard-btn:hover {
            background-color: #ff000831;
            color: var(--primary);
        }

        @media (max-width: 768px) {
            #back-to-dashboard-btn {
                display: none !important;
            }
        }
