:root {
    --primary-color: #fd7e14;
    --primary-light: #ffecd1;
    --primary-dark: #e8590c;
    --sidebar-width: 280px;
    --chat-input-height: 60px;
}

.btn-outline-dervish {
    border-color: var(--primary-color);
    color: #6c757d;
}
.btn-outline-dervish:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
}

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    overflow-x: hidden;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.auth-header {
    text-align: center;
    margin-bottom: 25px;
}

.auth-header h2 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 20px;
}

.auth-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    gap: 20px;
}

.auth-tab {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 16px;
    cursor: pointer;
    padding: 5px 0;
    position: relative;
}

.auth-tab.active {
    color: var(--primary-color);
    font-weight: 500;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.form-control {
    margin-bottom: 15px;
    border-radius: 5px;
    padding: 10px 15px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(253, 126, 20, 0.25);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    width: 100%;
    padding: 10px;
    font-weight: 500;
    border-radius: 5px;
    margin-top: 10px;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.form-check {
    margin: 15px 0;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: #6c757d;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}


.sidebar {
    width: var(--sidebar-width);
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    height: 100vh;
    overflow-y: auto;
    position: fixed;
    left: 0;
    top: 0;
    transition: all 0.3s;
    z-index: 1000;
}

.sidebar-header {
    padding: 0 20px 20px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    color: white;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.nav-link i {
    width: 24px;
    text-align: center;
    font-size: 18px;
}

.nav-text {
    margin-left: 10px;
}


.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 20px;
    background-color: #f8f9fa;
    min-height: 100vh;
    min-width: calc(100vw - var(--sidebar-width));
    transition: margin 0.3s;
}

.content-header {
    background-color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 10px;
}

.message-sender {
    margin-right: 3px;
}

.content-header h2 {
    color: var(--primary-color);
    margin: 0;
    font-weight: 600;
    font-size: 1.5rem;
}

.content-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
   
    height: 100%;
    display: flex;
    flex-direction: column;
}



.chat-container {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100vh;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: #f9f9f9;
    min-height: 0;
}


.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    flex-shrink: 0;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin-top: 0px!important;
}

.message {
    display: flex;
    align-items: flex-start;
    max-width: 85%;
    padding: 12px;
    border-radius: 12px;
    position: relative;
    word-break: break-word;
    overflow-wrap: anywhere;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    margin-bottom: 8px;
}

.message-content-wrapper {
    flex: 1;
}

.message-actions.hidden {
    display: none !important;
}


.message-footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
}

.message-outgoing .message-footer {
    border-top-color: rgba(255, 255, 255, 0.2);
}


.message-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.edit-btn, .delete-btn {
    background: none;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    gap: 4px;
}

.edit-btn {
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

.delete-btn {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.edit-btn:hover {
    background: rgba(0, 123, 255, 0.2);
}

.delete-btn:hover {
    background: rgba(220, 53, 69, 0.2);
}

.message-outgoing .edit-btn {
    color: #a3d0ff;
    background: rgba(163, 208, 255, 0.2);
}

.message-outgoing .delete-btn {
    color: #ff9e9e;
    background: rgba(255, 158, 158, 0.2);
}


.edit-message-input {
    width: 100%;
    min-height: 100px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    margin-bottom: 8px;
}

.edit-message-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.save-edit-btn, .cancel-edit-btn {
    padding: 4px 12px;
    font-size: 12px;
}


.edited-badge {
    font-size: 0.8em;
    color: #6c757d;
    margin-top: 4px;
    font-style: italic;
}

.message-outgoing {
    align-self: flex-end;
    background-color: #fff;
    color: #333;
    border-bottom-right-radius: 4px;
    margin-left: 15%;
}

.message-incoming {
    align-self: flex-start;
    background-color: #fff;
    color: #333;
    border-bottom-left-radius: 4px;
    border: 1px solid #eaeaea;
    margin-right: 15%;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.75em;
    opacity: 0.8;
}

.font-w-500 {
    font-weight: 500;
}

.message-incoming .message-header {
    color: #666;                
}

.message-outgoing .message-header {
    color:  #666;
}

.message-content {
    font-size: 1rem;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.5;
}


.chat-input-area {
    padding: 15px;
    background: #fff;
    border-top: 1px solid #eee;
    position: relative;
}

.message-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f5f5;
    border-radius: 24px;
    padding: 8px 15px;
}

.message-input-container textarea {
    flex: 1;
    min-height: 40px;
    max-height: 120px;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 0;
    resize: none;
    outline: none;
    overflow-y: auto;
    font-family: inherit;
    line-height: 1.4;
    font-size: 0.95rem;
}

.message-input-container textarea:focus {
    box-shadow: none;
}

.send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.send-btn:hover {
    background-color: var(--primary-dark);
}


.chat-tools {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    padding: 0 5px;
}

.chat-tool-btn {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 1.1em;
    padding: 5px;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.chat-tool-btn:hover {
    color: var(--primary-color);
    background: rgba(253, 126, 20, 0.1);
}


.recording-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #dc3545;
    font-size: 0.85em;
    padding: 5px 10px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 20px;
    margin-left: auto;
}

.recording-dot {
    width: 8px;
    height: 8px;
    background-color: #dc3545;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}


.message-file, .message-audio {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    font-size: 0.9em;
}

.message-outgoing .message-file, 
.message-outgoing .message-audio {
    background: rgba(255, 255, 255, 0.2);
}

.message-file i {
    margin-right: 8px;
}

.audio-player {
    width: 100%;
    max-width: 250px;
    height: 32px;
}

.message img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    margin-top: 10px;
    display: block;
}


.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}


@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message {
    animation: messageAppear 0.2s ease-out;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        position: fixed;
        z-index: 1000;
        height: 100%;
    }

    .sidebar.mobile-visible {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100vw;
    }

    #mobile-menu-toggle {
        display: block;
    }

    .message {
        max-width: 90%;
    }
}


#mobile-menu-toggle {
    position: fixed;
    left: 10px;
    top: 1px;
    z-index: 1001;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
}


#reply-preview {
    display: none;
    background: #f5f5f5;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 3px solid var(--primary-color);
}

.reply-preview {
    position: relative;
}

.reply-header {
    font-size: 0.8em;
    color: #666;
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.reply-text {
    font-size: 0.9em;
    color: #444;
    word-break: break-word;
    overflow-wrap: anywhere;
}

#cancel-reply {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
}


.message-reply {
    background: rgba(0, 0, 0, 0.05);
    border-left: 2px solid var(--primary-color);
    padding: 8px;
    margin-bottom: 8px;
    border-radius: 0 4px 4px 0;
    font-size: 0.85em;
}

.message-outgoing .message-reply {
    background: rgba(253, 126, 20, 0.08);
    border-left: 3px solid var(--primary-color);
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: 6px 6px 6px 0;
    font-size: 0.9em;
    position: relative;
    overflow: hidden;
}

.message-outgoing .message-reply::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
}

.message-outgoing .message-reply-header {
    color: var(--primary-dark);
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.message-outgoing .message-reply-header::before {
    content: "↩";
    color: var(--primary-color);
    font-size: 1.1em;
}

.message-outgoing .message-reply-text {
    color: #555;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Для длинных ответов добавляем градиент внизу */
.message-outgoing .message-reply-text.long {
    position: relative;
    max-height: 4.2em; /* 3 строки */
}

.message-outgoing .message-reply-text.long::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1.2em;
    background: linear-gradient(to bottom, rgba(253, 126, 20, 0), rgba(253, 126, 20, 0.08));
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .message-outgoing .message-reply {
        padding: 8px 10px;
        font-size: 0.85em;
    }
    
    .message-outgoing .message-reply-header {
        font-size: 0.8em;
    }
}

.message-reply-header {
    color: #666;
    margin-bottom: 4px;
    font-weight: 500;
}

.message-reply-text {
    color: #444;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    overflow-wrap: anywhere;
}


@media (max-width: 768px) {
   
    .chat-container {
        height: calc(100vh - 120px);
    }
    
    .message {
        max-width: 90%;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .message-outgoing, .message-incoming {
        margin-left: 5% !important;
        margin-right: 5% !important;
    }
    
    .message-content {
        font-size: 1.05rem;
    }
    
    .message-actions {
        flex-wrap: wrap;
    }
    
    .message-actions button {
        font-size: 0.8rem;
        padding: 3px 6px;
    }
    
   
    .message-reply, .reply-preview {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        word-break: break-word;
    }
    
   
    .user-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .user-table thead, .user-table tbody, .user-table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
    
    .user-avatar {
        width: 40px;
        height: 40px;
    }
    
    .user-action-btn {
        margin-bottom: 5px;
        font-size: 0.8rem;
        padding: 3px 6px;
    }
    
   
    .message-input-container textarea {
        font-size: 0.9rem;
        padding: 8px;
    }
    
   
    .main-content {
        padding: 10px;
    }
    
    .content-card {
        padding: 15px;
        height: 100%;
    }
}


.sidebar {
    transition: transform 0.3s ease;
}



.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.user-action-btn {
    margin-right: 5px;
    margin-bottom: 5px;
    white-space: nowrap;
}


.audience-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    min-width: 600px;
}

.user-table th {
    text-align: left;
    padding: 12px 15px;
    background-color: #f8f9fa;
    font-weight: 600;
    white-space: nowrap;
}

.user-table td {
    padding: 12px 15px;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.actions-cell {
    white-space: nowrap;
}

.actions-cell .btn-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.actions-cell .btn {
    text-align: left;
    padding: 5px 10px;
}

.badge {
    font-weight: 500;
    padding: 5px 8px;
}


@media (max-width: 992px) {
    .user-table th[data-priority="4"],
    .user-table td:nth-child(5) {
        display: none;
    }
}

@media (max-width: 768px) {
    .user-table {
        min-width: 100%;
    }
    
    .user-table thead {
        display: none;
    }
    
    .user-table tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 8px;
    }
    
    .user-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px;
        border-top: none;
        border-bottom: 1px solid #eee;
    }
    
    .user-table td:before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 15px;
        color: #6c757d;
    }
    
    .user-table td:last-child {
        border-bottom: none;
    }
    
    .actions-cell .btn-group-vertical {
        width: 100%;
    }
    
    .actions-cell .btn {
        width: 100%;
    }
    
    .action-text {
        display: inline;
    }
}

@media (max-width: 576px) {
    .user-table th[data-priority="3"],
    .user-table td:nth-child(4) {
        display: none;
    }
    
    .action-text {
        display: none;
    }
    
    .actions-cell .btn {
        min-width: auto;
        padding: 5px;
        justify-content: center;
    }
    
    .actions-cell .btn i {
        margin-right: 0;
    }
}


#audience-table_wrapper {
    padding: 10px;
}

#audience-table {
    margin-top: 10px !important;
    border-collapse: collapse !important;
}

#audience-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    padding: 12px 15px;
}

#audience-table td {
    padding: 10px 15px;
    vertical-align: middle;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}


.user-action-btn {
    margin: 2px;
    white-space: nowrap;
}


.badge {
    font-weight: 500;
    padding: 5px 8px;
}





@media (max-width: 991px) {
    .main-content {
        margin-left: 0;
        width: 100vw;
        padding: 15px;
    }
    
    .dt-header {
        margin: 0 -15px;
        width: calc(100% + 30px);
    }
}

.bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 20px;
    padding: 10px 0;
    font-size: 0.9rem;
    color: #6c757d;
}


.dt-length label {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dt-input {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 3px 5px;
    background-color: white;
    color: #495057;
}


.dt-info {
    padding: 5px 0;
}


.dt-paging {
    display: flex;
    gap: 5px;
}

.dt-paging-button {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.dt-paging-button:hover:not(.disabled) {
    background-color: #f8f9fa;
    border-color: #ccc;
}

.dt-paging-button.current {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.dt-paging-button.disabled {
    color: #adb5bd;
    background-color: white;
    border-color: #eee;
    cursor: default;
}


@media (max-width: 768px) {
    .bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .dt-length, 
    .dt-info, 
    .dt-paging {
        width: 100%;
    }
    
    .dt-paging {
        justify-content: center;
    }
    
    .dt-paging-button {
        padding: 3px 6px;
        font-size: 0.8rem;
    }
}


.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-container {
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.logo-container {
    height: 40px;
}

.logo {
    height: 100%;
    width: auto;
}


.sidebar {
    width: 280px;
    background-color: #ffffff;
    color: #333;
    padding: 0;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 30px 20px;
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px;
    border: 3px solid var(--primary-light);
}

.sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-user-info {
    text-align: center;
}

.sidebar-user-info h4 {
    margin: 0 0 5px;
    font-size: 1.1rem;
    font-weight: 600;
}

.nav-menu {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-link {
    padding: 12px 25px;
    color: #555;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background-color: rgba(253, 126, 20, 0.05);
    color: var(--primary-color);
}

.nav-link.active {
    background-color: rgba(253, 126, 20, 0.1);
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
}

.nav-link i {
    color: inherit;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-footer .btn {
    width: 100%;
}


.main-content {
    margin-top: 60px;
    margin-left: 280px;
    min-height: calc(100vh - 60px);
}


.editor-content-container {
    max-width: 800px;
    margin: 80px auto;
    padding: 0 20px;
}

.editor-js-container {
    border: var(--bs-border-width) solid var(--bs-border-color);;
    border-radius: 6px;
}

.content-title {
    text-align: center;
    margin-bottom: 30px;
    font-weight: 600;
    color: #333;
}

.editor-content-card {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}


@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-visible {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header-container {
        justify-content: center;
    }
    
    #mobile-menu-toggle {
        display: block;
        position: absolute;
        left: 20px;
    }
}

@media (min-width: 993px) {
    #mobile-menu-toggle {
        display: none;
    }
}


.content-card .d-flex {
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.content-card .d-flex h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.content-card .btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
    border-radius: 4px;
}


@media (max-width: 768px) {
    .content-card .d-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .content-card .d-flex h4 {
        font-size: 1rem;
    }
    
    .content-card .btn-sm {
        align-self: flex-end;
    }
}


.profile-container {
    padding: 20px;
}

.profile-avatar-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-light);
}

.avatar-upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}


.invite-container {
    padding: 20px;
}

.invite-history {
    margin-top: 30px;
}


.table-responsive {
    margin-top: 20px;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}


@media (max-width: 768px) {
    .profile-container {
        padding: 10px;
    }
    
    .profile-avatar-container {
        width: 100px;
        height: 100px;
    }
    
    .table-responsive {
        overflow-x: auto;
    }
}


.video-tool, .video-container, .video-upload-form {
    margin: 15px 0;
}

.video-container {
    border: 1px solid #e0e0e0;
    padding: 15px;
    border-radius: 4px;
    background: #f9f9f9;
}

.video-url, .image-url {
    margin: 10px 0;
    padding: 5px;
    background: #f0f0f0;
    border-radius: 3px;
    font-size: 13px;
    word-break: break-all;
}

.video-upload-form, .image-upload-form {
    padding: 15px;
    border: 1px dashed #ccc;
    border-radius: 4px;
    text-align: center;
}

.video-file-input, .image-file-input {
    margin: 10px 0;
}


.image-container {
    border: 1px solid #e0e0e0;
    padding: 15px;
    border-radius: 4px;
    background: #f9f9f9;
    text-align: center;
}

.read-status {
    position: absolute;
    right: 0px;
    bottom: 0px;
    font-size: 11px;
    color: #999;
}

.read-status .read {
    color: var(--primary-color);
}

.message-content {
    position: relative;
    padding-right: 20px;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.message-incoming .read-status {
    display: none;
}

.nav-link.disabled {
    opacity: 0.6;
    pointer-events: none;
    cursor: default;
}


.voice-message-container {
    width: 100%;
    max-width: 280px;
    margin-top: 8px;
}

.custom-audio-player {
    display: none;
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f5f5;
    border-radius: 20px;
    padding: 8px 12px;
    width: 100%;
}

.audio-play-btn {
    background: #ffb06f;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.audio-progress-container {
    flex-grow: 1;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    min-width: 70px;
}

@media (max-width: 768px) {
    .audio-progress-container {
        min-width: 20px;
    }
    .chat-messages {
        padding: 0px!important;
    }
}

.audio-progress-bar {
    height: 100%;
    background: #4a76a8;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.audio-time {
    font-size: 12px;
    color: #666;
    min-width: 60px;
    text-align: center;
    font-family: monospace;
}
.d-none {
    display: none!important;
}


.pinned-message-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e9ecef;
    padding: 8px 15px;
    position: sticky;
    top: 0px;
    z-index: 99;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.pinned-message-header:hover {
    background-color: #f8f9fa;
}

.pinned-message-content {
    flex: 1;
    display: flex;
    align-items: center;
    overflow: hidden;
    min-height: 36px;
    gap: 10px;
}

.pinned-label {
    background-color: var(--primary-light);
    color: var(--primary-color);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
    line-height: 1;
}

.pinned-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    color: #495057;
    flex: 1;
}

.pinned-jump-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pinned-jump-btn:hover {
    background-color: var(--primary-light);
    text-decoration: none;
}

.pinned-jump-btn:active {
    background-color: rgba(253, 126, 20, 0.2);
}


.pinned-jump-btn i {
    font-size: 12px;
}


.message.pinned {
    border-left: 3px solid var(--primary-color);
    background-color: rgba(253, 126, 20, 0.03);
}

.message.pinned .message-content {
    position: relative;
}

.message.pinned .pin-indicator {
    position: absolute;
    right: 10px;
    top: 10px;
    color: var(--primary-color);
    font-size: 12px;
}


@keyframes pinnedHeaderSlideIn {
    from { 
        opacity: 0;
        transform: translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pinnedHeaderSlideOut {
    from { 
        opacity: 1;
        transform: translateY(0);
    }
    to { 
        opacity: 0;
        transform: translateY(-20px);
    }
}

.pinned-message-header.show {
    animation: pinnedHeaderSlideIn 0.3s ease forwards;
}

.pinned-message-header.hide {
    animation: pinnedHeaderSlideOut 0.3s ease forwards;
}


@media (max-width: 768px) {
    .pinned-message-header {
        top: 0px;
        padding: 6px 12px;
    }
    
    .pinned-label {
        font-size: 11px;
        padding: 2px 6px;
    }
    
    .pinned-text {
        font-size: 13px;
    }
    
    .pinned-jump-btn {
        font-size: 12px;
        padding: 3px 6px;
    }
}


.main-content.with-pinned-header {
    margin-top: 100px;
}


.chat-container.with-pinned-header {
    padding-top: 40px;
}


.chat-messages.with-pinned-header {
    padding-top: 0;
}

.pin-btn {
    background: rgba(253, 126, 20, 0.1);
    border: none;
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--primary-color);
    transition: all 0.2s;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pin-btn:hover {
    color: var(--primary-color);
    background: rgba(253, 126, 20, 0.1);
}

.pin-btn.pinned, 
.pin-btn.pinned:hover {
    color: var(--primary-color);
}

.pin-btn i {
    font-size: 14px;
    transition: transform 0.2s;
}

.pin-btn:hover i {
    transform: scale(1.1);
}


.pin-btn.active {
    color: var(--primary-color);
}


.message-actions .pin-btn {
    margin-right: 4px;
}



@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        height: 100vh;
        overflow-y: auto;
        padding-bottom: 80px;
    }
    
    .sidebar.mobile-visible {
        transform: translateX(0);
    }
    
    .sidebar-footer {
        position: sticky;
        bottom: 0;
        background-color: #ffffff;
        padding: 15px 20px;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        z-index: 100;
        margin-bottom: env(safe-area-inset-bottom, 20px);
    }
    
        .nav-menu {
        padding-bottom: 20px;
    }
    
    @supports (padding-bottom: env(safe-area-inset-bottom)) {
        .sidebar {
            padding-bottom: calc(80px + env(safe-area-inset-bottom));
        }
    }
}

.sidebar-footer .js_logout {
    width: 100%;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}


.custom-attaches {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px;
  margin: 10px 0;
  background: #f8f9fa;
}

.custom-attaches__button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #4285f4;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.custom-attaches__button:hover {
  background: #3367d6;
}

.custom-attaches__uploading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #5f6368;
}

.custom-attaches__file {
  display: flex;
  gap: 12px;
  align-items: center;
}

.custom-attaches__file-icon {
  font-size: 24px;
  color: #5f6368;
  min-width: 30px;
  text-align: center;
}

.custom-attaches__file-icon i {
    font-style: normal!important;
}

.custom-attaches__file-delete i {
    font-style: normal!important;
}

.custom-attaches__file-info {
  flex-grow: 1;
  min-width: 0;
}

.custom-attaches__file-name {
  display: block;
  color: #1a73e8;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-attaches__file-name:hover {
  text-decoration: underline;
}

.custom-attaches__file-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  color: #5f6368;
}

.custom-attaches__file-delete {
  background: none;
  border: none;
  color: #5f6368;
  cursor: pointer;
  padding: 0;
  font-size: 12px;
}

.custom-attaches__file-delete:hover {
  color: #d93025;
}

.custom-attaches__error {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d93025;
  font-size: 14px;
}

.custom-attaches__retry {
  margin-left: auto;
  padding: 4px 8px;
  background: #f1f3f4;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}


@media (max-width: 768px) {
  .custom-attaches {
    padding: 10px;
  }
  
  .custom-attaches__file {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .custom-attaches__file-icon {
    align-self: flex-start;
  }
  
  .custom-attaches__file-name {
    white-space: normal;
  }
  
  .custom-attaches__file-meta {
    width: 100%;
    justify-content: space-between;
  }
}

.custom-attaches.read-only {
  background: transparent;
  border: 1px dashed #e0e0e0;
}

.custom-attaches.read-only .custom-attaches__file {
  padding: 8px;
}

.custom-attaches.read-only .custom-attaches__file-name {
  color: #333;
  text-decoration: none;
}

.custom-attaches.read-only .custom-attaches__file-name:hover {
  text-decoration: none;
}


@media (max-width: 768px) {
  .custom-attaches.read-only .custom-attaches__file {
    flex-direction: row;
    align-items: center;
  }
  
  .custom-attaches.read-only .custom-attaches__file-icon {
    font-size: 20px;
  }
  
  .custom-attaches.read-only .custom-attaches__file-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}


.chat-tabs {
    display: flex;
    gap: 10px;
    margin-left: 20px;
    align-items: center;
}

.chat-tab {
    background: none;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #6c757d;
    transition: all 0.2s;
}

.chat-tab:hover {
    background-color: rgba(253, 126, 20, 0.1);
    color: var(--primary-color);
}

.chat-tab.active {
    background-color: rgba(253, 126, 20, 0.2);
    color: var(--primary-color);
}

.chat-tab i {
    font-size: 14px;
}


@media (max-width: 768px) {
    .chat-tabs {
        flex-direction: row;
        gap: 5px;
        margin-left: 10px;
        align-items: flex-start;
    }
    
    .chat-tab {
        padding: 3px 6px;
        font-size: 13px;
    }
    
    #content-title {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}

/* Стили для заголовка чата с вкладками */
.chat-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 20px;
    width: 100%;
}

.chat-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: auto;
}

.chat-tabs {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.chat-tab {
    background: none;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #6c757d;
    transition: all 0.2s;
    border: 1px solid #dee2e6;
    white-space: nowrap;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .chat-header {
        flex-direction: row;
        align-items: flex-start;
        gap: 10px;
    }
    
    .chat-title {
        font-size: 1.3rem;
        margin-right: 0;
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .chat-tabs {
        width: 100%;
        justify-content: flex-start;
        gap: 6px;
        margin-top: 5px;
    }
    
    .chat-tab {
        padding: 5px 10px;
        font-size: 13px;
        flex: 1 0 auto;
        justify-content: center;
        min-width: calc(33% - 10px);
    }
}

@media (max-width: 480px) {
    .chat-tab {
        min-width: calc(50% - 8px);
    }
}

.unread-badge-current {
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    margin-left: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    position: relative;
}

.recording-time {
    margin-left: 10px;
    font-size: 14px;
    color: #dc3545;
    font-weight: 500;
    font-family: monospace;
}

.recording-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #dc3545;
    font-size: 0.85em;
    padding: 5px 15px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 20px;
    margin-left: auto;
}

@media (max-width: 768px) {
    .recording-indicator {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 8px;
    }
    
    .recording-time {
        margin-left: 0;
    }
}

.message.highlighted {
    background-color: rgba(243, 243, 8, 0.2);
}

@keyframes highlight {
    0% { background-color: rgba(255, 255, 0, 0.5); }
    100% { background-color: rgba(255, 255, 0, 0); }
}

.message-reply {
    cursor: pointer;
    transition: background-color 0.2s;
}

.message-reply:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-action-btn {
    position: relative;
    margin-right: 10px;
}

.avatar-sm {
    width: 64px;
    height: 64px;
}

.recording-time.paused {
    opacity: 0.6;
}

.date-separator {
    text-align: center;
    margin: 15px 0;
    color: #666;
    font-size: 14px;
    position: relative;
}

.date-separator:before,
.date-separator:after {
    content: "";
    display: inline-block;
    width: 30%;
    height: 1px;
    background-color: #ddd;
    position: relative;
    vertical-align: middle;
}

.date-separator:before {
    right: 15px;
    margin-left: -50%;
}

.date-separator:after {
    left: 15px;
    margin-right: -50%;
}

.profile-container .btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
    transition: all 0.3s;
}

.profile-container .btn-outline-danger:hover {
    background-color: #dc3545;
    color: white;
}

.profile-container .border-top {
    border-top: 1px solid #e9ecef !important;
    padding-top: 1.5rem;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@media (max-width: 992px) {
    .sidebar.mobile-visible + .sidebar-overlay {
        display: block;
        opacity: 1;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }
    
    .sidebar.mobile-visible {
        transform: translateX(0);
    }
}

.emoji-picker {
    z-index: 9999!important;
}

#audience-table tr.has-unread {
    background-color: rgba(253, 126, 20, 0.1);
}

/* Стили для окна обрезки аватара */
.img-container {
    max-height: 70vh;
    overflow: hidden;
}

#avatar-to-crop {
    max-width: 100%;
}

.cropper-view-box,
.cropper-face {
    border-radius: 50%;
}

.cropper-modal {
    background: rgba(255, 255, 255, 0.8);
}

.cropper-line,
.cropper-point {
    background-color: var(--primary-color);
}

.cropper-point.point-se {
    right: 5px;
    bottom: 5px;
}

.message-mentor {
    border-left: 3px solid #4a76a8;
    background-color: rgba(74, 118, 168, 0.05);
}

.message-admin {
    border-left: 3px solid #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

@media (max-width: 768px) {
    .content-card { 
                border-top-left-radius: 0px!important;
        border-top-right-radius: 0px!important;
    }

    .main-content {
        padding: 3px!important;
    }

    .content-header {
        margin-bottom: 0 !important;
        padding: 10px !important;
        border-radius: 0 !important;
    }

    .chat-container {
                border-top-left-radius: 0px!important;
        border-top-right-radius: 0px!important;
        height: calc(100vh - 160px) !important;
        margin: 0 -10px !important;
        width: calc(100% + 20px) !important;
    }

    .chat-messages {
        padding: 5px 0 !important;
        max-height: calc(100vh - 230px) !important;
    }

    .message {
        padding: 8px !important;
        margin-left: 2px !important;
        margin-right: 2px !important;
        max-width: calc(100% - 10px) !important;
    }

    .date-separator {
        margin: 8px 0 !important;
    }

    .chat-input-area {
        padding: 10px !important;
    }
}

@media screen and (max-width: 767px) {
    textarea, input {
        font-size: 16px !important;
    }
    
    @supports (-webkit-touch-callout: none) {
        body {
            touch-action: manipulation;
            -webkit-text-size-adjust: 100%;
            -ms-text-size-adjust: 100%;
            text-size-adjust: 100%;
        }
        
        #message-input {
            font-size: 16px !important;
            transform: scale(1) !important;
        }
    }
}

@supports (-webkit-touch-callout: none) and (not (translate: none)) {
    textarea, input {
        font-size: 16px !important;
        min-height: 44px !important;
    }
}

#audience-table_wrapper {
    padding: 0;
    margin-top: 20px;
}

#audience-table {
    width: 100% !important;
    margin: 0 !important;
}

#audience-content {
    overflow-x: auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

@media (max-width: 992px) {
    #audience-content {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    #audience-content {
        padding: 10px;
    }
    
    #audience-table_wrapper .dt-length,
    #audience-table_wrapper .dt-search {
        margin-bottom: 10px;
    }
}

#audience-table tr.has-unread {
    background-color: rgba(253, 126, 20, 0.1) !important;
}
@media (max-width: 768px) {
    
    #audience-table tr.has-unread td {
        background-color: rgba(253, 126, 20, 0.15) !important;
    }
}

#imageModal .modal-content {
    background-color: rgba(0, 0, 0, 0.8) !important;
}

#imageModal .btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

#imageModal img {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.message-text strong {
    font-weight: 600;
}

.message-text em {
    font-style: italic;
}

.message-text code {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.message-text del {
    text-decoration: line-through;
    opacity: 0.7;
}

.message-text u {
    text-decoration: underline;
}

.message-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
    min-height: 24px;
}

.reaction {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    max-width: 60px;
}

.reaction:hover {
    background-color: #f0f0f0;
    transform: scale(1.05);
}

.reaction.own-reaction {
    background-color: rgba(253, 126, 20, 0.15);
    border-color: var(--primary-color);
}

.reaction-count {
    font-size: 11px;
    color: #666;
    font-weight: 500;
}

.reaction-picker {
    position: absolute;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 8px;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.reaction-picker-content {
    display: flex;
    gap: 4px;
}

.reaction-option {
    background: none;
    border: none;
    font-size: 20px;
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.reaction-option:hover {
    background-color: #f0f0f0;
    transform: scale(1.2);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.message.has-reactions {
    margin-bottom: 12px;
}

.message-actions {
    margin-top: 4px;
}

.last-read-message {
    border-left: 4px solid #ff6b35;
    background-color: rgba(255, 107, 53, 0.1) !important;
    transition: all 0.3s ease;
}
    
.last-read-message .message-content {
    padding-left: 8px;
}

.upload-indicator {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    margin: 10px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.upload-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.upload-progress-bar-container {
    flex-grow: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #fddd85, #ff9011);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.upload-text {
    font-size: 13px;
    color: #495057;
    min-width: 80px;
    font-weight: 500;
}

.upload-percentage {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    min-width: 40px;
    text-align: right;
}

.cancel-upload-btn {
    font-size: 12px;
    padding: 4px 12px;
    background: #dc3545;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
}

.cancel-upload-btn:hover {
    background: #c82333;
}

.upload-progress i {
    color: var(--primary-color);
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.scroll-buttons-container {
    position: absolute;
    right: 20px;
    top: 0px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scroll-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    opacity: 0.9;
}

.scroll-btn:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
    opacity: 1;
}

.scroll-btn:active {
    transform: scale(0.95);
}

.scroll-btn i {
    font-size: 16px;
}

@media (max-width: 768px) {
    .scroll-buttons-container {
        right: 10px;
        top: 0px;
    }
    
    .scroll-btn {
        width: 36px;
        height: 36px;
    }
    
    .scroll-btn i {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .scroll-buttons-container {
        right: 5px;
        top: 0px;
    }
}

.message.read-below {
    opacity: 0.7;
    background-color: #f8f9fa !important;
}

.message.read-below .message-content {
    color: #6c757d !important;
}

.message.read-below .message-sender {
    color: #6c757d !important;
}

.message.read-below .message-time {
    color: #adb5bd !important;
}

.content-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 768px) {
    .content-header {
        position: sticky;
        top: 60px;
        z-index: 100;
        margin-bottom: 0 !important;
        padding: 10px !important;
        border-radius: 0 !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .chat-container {
        margin-top: 10px;
    }
}
