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

/*body, html {
    font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;
    line-height: 1.5;
    background: #222;
    color: #ffffff;
    height: 100%
}*/

button {
    font-family: inherit
}

.logout-btn {
    margin-top: 20px;
    padding: 10px 0;
    width: 100%;
    background: #fe0000;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    -webkit-box-shadow: 0 2px 8px rgba(45,136,255,0.08);
    box-shadow: 0 2px 8px rgba(45,136,255,0.08);
    -webkit-transition: background 0.2s,color 0.2s,-webkit-box-shadow 0.2s;
    transition: background 0.2s,color 0.2s,-webkit-box-shadow 0.2s;
    transition: background 0.2s,color 0.2s,box-shadow 0.2s;
    transition: background 0.2s,color 0.2s,box-shadow 0.2s,-webkit-box-shadow 0.2s;
    letter-spacing: 0.5px
}

    .logout-btn:focus, .logout-btn:hover {
        background: #1a5fb4;
        color: #fff;
        -webkit-box-shadow: 0 4px 16px rgba(45,136,255,0.15);
        box-shadow: 0 4px 16px rgba(45,136,255,0.15);
        outline: none
    }

input, textarea {
    font-family: inherit
}

    input:focus, textarea:focus {
        outline: none
    }

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

.custom-scrollbar::-webkit-scrollbar-track {
    background: #222
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 3px
}

    .custom-scrollbar::-webkit-scrollbar-thumb:hover {
        background: #404040
    }

.flex-center {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center
}

.text-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.user-sidebar .media-icon {
    display: none
}

@media screen and (max-width: 768px) {
    .chat-app__sidebar {
        width: 100%;
        position: absolute;
        top: 0;
        right: 0;
        height: 100%;
        z-index: 1000;
/*        transform: translateX(100%);*/
        transition: transform 0.3s ease;
    }

    .chat-app__sidebar.active-sidebar {
       /* transform: translate(0);*/
    }

    .user-sidebar .media-icon {
        width: 24px;
        display: flex;
        align-self: flex-start;
    }
}

@media screen and (max-width: 768px) {
    .chat-app__sidebar {
        position: fixed !important;
        top: 0;
        right: 0;
        left: auto;
        height: 100vh;
        width: 85vw;
        max-width: 350px;
        z-index: 1002;
        background: #1f1f1f;
        box-shadow: -2px 0 16px rgba(0,0,0,0.18);
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(.4,0,.2,1);
        border-left: none;
        border-right: none;
        display: block;
    }

        .chat-app__sidebar.active-sidebar {
            transform: translateX(0);
            display: block !important;
        }

        .chat-app__sidebar:not(.active-sidebar) {
            display: none !important;
        }
}

@media (max-width: 768px) {
    .chat-app__sidebar--open {
        -webkit-transform: translateX(0);
        transform: translateX(0)
    }

    .chat-list {
        width: 100%
    }

    .user-sidebar {
        width: 100%;
        position: absolute;
        top: 0;
        right: 0;
        height: 100%;
        z-index: 1000;
        transition: transform 0.3s ease;
    }

    .user-sidebar--open {
        -webkit-transform: translateX(0);
        transform: translateX(0)
    }
}

.selected-file {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    background: #2f2f2f;
    border-radius: 6px;
    padding: 6px 10px;
    margin-right: 10px;
    font-size: 0.9em;
    color: #ffffff;
    border: 1px solid #333333
}

.clear-file-btn {
    background: none;
    border: none;
    color: #999999;
    cursor: pointer;
    margin-left: 8px;
    font-size: 1.2em;
    padding: 0;
    width: 20px;
    height: 20px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    border-radius: 50%;
    -webkit-transition: background 0.15s,color 0.15s;
    transition: background 0.15s,color 0.15s
}

    .clear-file-btn:hover {
        background: #ff3333;
        color: #fff
    }

.file-validation-error {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    color: #ff3333;
    font-size: 0.9em;
    padding: 5px 15px;
    background-color: rgba(255,51,51,0.1);
    border-top: 1px solid #333333
}

.close-error-btn {
    background: none;
    border: none;
    color: #ff3333;
    cursor: pointer;
    font-size: 1.5em;
    line-height: 1;
    padding: 0 0 0 10px;
    font-weight: bold;
    opacity: 0.7;
    -webkit-transition: opacity 0.2s;
    transition: opacity 0.2s
}

    .close-error-btn:hover {
        opacity: 1
    }

/*a {
    color: #ffffff
}*/

/*.btn {
    background: #25482e;
    display: block;
    padding: 10px;
    color: #fff;
    border: 0;
    margin: 10px 0;
    cursor: pointer;
    border-radius: 6px
}
*/
    .btn.btn-lg {
        width: 100%
    }

.chat-app {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    height: 100vh;
    background: #222;
    color: #ffffff;
    overflow: hidden;
    position: relative
}

    .chat-app .chat-header__info .media-icon {
        width: 24px;
        display: none
    }

@media screen and (max-width: 768px) {
    .chat-app .chat-header__info .media-icon {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex
    }
}

.chat-app .media-file-icon {
    width: 24px;
    display: none
}

@media screen and (max-width: 991px) {
    .chat-app .media-file-icon {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex
    }
}

.chat-app__main {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    overflow: hidden
}

.chat-app__content {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column
}

    .chat-app__content .chat-header {
        padding: 20px;
        border-bottom: 1px solid #333333;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        -webkit-box-pack: justify;
        -ms-flex-pack: justify;
        justify-content: space-between
    }

    .chat-app__content .chat-header__info {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        gap: 12px
    }

        .chat-app__content .chat-header__info .avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            overflow: hidden
        }

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

        .chat-app__content .chat-header__info .user-info__name {
            font-weight: 500;
            margin-bottom: 4px
        }

        .chat-app__content .chat-header__info .user-info__status {
            color: #999999;
            font-size: 0.9em
        }

    .chat-app__content .chat-header__actions {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        gap: 15px
    }

        .chat-app__content .chat-header__actions button {
            background: none;
            border: none;
            color: #999999;
            cursor: pointer;
            padding: 5px
        }

            .chat-app__content .chat-header__actions button:hover {
                color: #ffffff
            }

.chat-app__sidebar {
    width: 300px;
    min-width: 300px;
    max-width: 300px;
    border-left: 1px solid #333333;
    background: #1f1f1f;
    overflow-y: auto;
    display: block;
    position: relative;
  
}

    .chat-app__sidebar::-webkit-scrollbar {
        width: 6px;
        height: 6px
    }

    .chat-app__sidebar::-webkit-scrollbar-track {
        background: #222
    }

    .chat-app__sidebar::-webkit-scrollbar-thumb {
        background: #333333;
        border-radius: 3px
    }

        .chat-app__sidebar::-webkit-scrollbar-thumb:hover {
            background: #4d4d4d
        }

.chat-app {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    height: 100vh;
    background: #181818;
    color: #ffffff
}

.chat-app__main {
    -webkit-box-flex: 1;
    -ms-flex: auto;
    flex: auto;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    overflow: hidden;
    width: calc(100% - 400px);
    height: 90vh;
}

@media screen and (max-width: 768px) {
    .chat-app__main {
        position: absolute;
        right: 0;
        -webkit-transform: translate(100%);
        transform: translate(100%);
        width: 100%;
        height: 80vh;
        -webkit-transition: all 0.4s ease;
        transition: all 0.4s ease
    }

        .chat-app__main.active-chat {
            -webkit-transform: translate(0);
            transform: translate(0)
        }
}

.chat-app__content {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid #333333;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between
}

.chat-header__info {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 12px
}

    .chat-header__info .avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        overflow: hidden
    }

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

    .chat-header__info .user-info__name {
        font-weight: 500;
        margin-bottom: 4px
    }

    .chat-header__info .user-info__status {
        color: #999999;
        font-size: 0.9em
    }

.chat-header__actions {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 15px
}

    .chat-header__actions button {
        background: none;
        border: none;
        color: #999999;
        cursor: pointer;
        padding: 5px
    }

        .chat-header__actions button:hover {
            color: #ffffff
        }

.chat-app__sidebar {
    width: 300px;
    border-left: 1px solid #333333;
    background: #1f1f1f;
    overflow-y: auto
}

    .chat-app__sidebar::-webkit-scrollbar {
        width: 6px;
        height: 6px
    }

    .chat-app__sidebar::-webkit-scrollbar-track {
        background: #222
    }

    .chat-app__sidebar::-webkit-scrollbar-thumb {
        background: #333333;
        border-radius: 3px
    }

        .chat-app__sidebar::-webkit-scrollbar-thumb:hover {
            background: #404040
        }

.login-main {
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column
}

    .login-main h1 {
        position: relative;
        z-index: 1;
        margin-top: 40px
    }

    .login-main img {
        position: absolute;
        width: 100%;
        height: 100%;
        -o-object-fit: cover;
        object-fit: cover
    }

.login-container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 20px;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    margin: auto;
    max-width: 500px;
    width: 100%
}

    .login-container .login-form-wrapper {
        padding: 40px;
        background: rgba(255,255,255,0.2);
        -webkit-backdrop-filter: blur(15px);
        backdrop-filter: blur(15px);
        border-radius: 20px;
        width: 100%
    }

.form-floating {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 5px;
    margin-top: 15px
}

    .form-floating input {
        padding: 10px;
        border-radius: 6px;
        border: 0
    }

.links-wrapper {
    text-align: center
}

.chat-list {
    width: 300px;
    height: 100%;
    background: #1f1f1f;
    border-right: 1px solid #333333;
    overflow-y: auto
}

    .chat-list::-webkit-scrollbar {
        width: 6px;
        height: 6px
    }

    .chat-list::-webkit-scrollbar-track {
        background: #222
    }

    .chat-list::-webkit-scrollbar-thumb {
        background: #333333;
        border-radius: 3px
    }

        .chat-list::-webkit-scrollbar-thumb:hover {
            background: #4d4d4d
        }

@media screen and (max-width: 768px) {
    .chat-list {
        width: 100% !important
    }
}

.chat-list h3 {
    padding: 20px 0
}

.chat-list__header {
    padding: 20px;
    border-bottom: 1px solid #333333
}

    .chat-list__header .search-box {
        background: #252525;
        border-radius: 20px;
        padding: 8px 15px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center
    }

        .chat-list__header .search-box input {
            background: none;
            border: none;
            color: #ffffff;
            width: 100%;
            outline: none
        }

            .chat-list__header .search-box input::-webkit-input-placeholder {
                color: #999999
            }

            .chat-list__header .search-box input::-moz-placeholder {
                color: #999999
            }

            .chat-list__header .search-box input:-ms-input-placeholder {
                color: #999999
            }

            .chat-list__header .search-box input::-ms-input-placeholder {
                color: #999999
            }

            .chat-list__header .search-box input::placeholder {
                color: #999999
            }

.chat-list__item {
    padding: 15px 20px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    -webkit-transition: background 0.2s;
    transition: background 0.2s
}

    .chat-list__item:hover {
        background: #2d2d2d
    }

.chat-list__item--active {
    background: #2d2d2d
}

.chat-list__item .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    position: relative
}

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

.chat-list__item .avatar__status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff00;
    border: 2px solid #1f1f1f
}

.chat-list__item .chat-info {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.chat-list__item .chat-info__name {
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 4px
}

.chat-list__item .chat-info__last-message {
    color: #999999;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.chat-list__item .chat-info__time {
    color: #999999;
    font-size: 0.8em
}

.chat-list {
    width: 300px;
    height: 100%;
    background: #1f1f1f;
    border-right: 1px solid #333333;
    overflow-y: auto;
    padding: 0 15px
}

    .chat-list::-webkit-scrollbar {
        width: 6px;
        height: 6px
    }

    .chat-list::-webkit-scrollbar-track {
        background: #222
    }

    .chat-list::-webkit-scrollbar-thumb {
        background: #333333;
        border-radius: 3px
    }

        .chat-list::-webkit-scrollbar-thumb:hover {
            background: #404040
        }

.chat-list__header {
    padding: 20px;
    border-bottom: 1px solid #333333
}

    .chat-list__header .search-box {
        background: #252525;
        border-radius: 20px;
        padding: 8px 15px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center
    }

        .chat-list__header .search-box input {
            background: none;
            border: none;
            color: #ffffff;
            width: 100%;
            outline: none
        }

            .chat-list__header .search-box input::-webkit-input-placeholder {
                color: #999999
            }

            .chat-list__header .search-box input::-moz-placeholder {
                color: #999999
            }

            .chat-list__header .search-box input:-ms-input-placeholder {
                color: #999999
            }

            .chat-list__header .search-box input::-ms-input-placeholder {
                color: #999999
            }

            .chat-list__header .search-box input::placeholder {
                color: #999999
            }

.chat-list__search {
    width: 100% !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 6px !important;
    border: 1px solid #333333 !important;
    background: #252525 !important;
    color: #ffffff !important;
    margin-bottom: 1rem !important;
    -webkit-box-sizing: border-box !important;
    box-sizing: border-box !important;
}

    .chat-list__search::-webkit-input-placeholder {
        color: #999999
    }

    .chat-list__search::-moz-placeholder {
        color: #999999
    }

    .chat-list__search:-ms-input-placeholder {
        color: #999999
    }

    .chat-list__search::-ms-input-placeholder {
        color: #999999
    }

    .chat-list__search::placeholder {
        color: #999999
    }

.chat-list__item {
    padding: 15px 20px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    -webkit-transition: background 0.2s;
    transition: background 0.2s;
    border-radius: 6px
}

    .chat-list__item:hover {
        background: #2d2d2d
    }

    .chat-list__item .avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        overflow: hidden;
        position: relative
    }

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

    .chat-list__item .avatar__status {
        position: absolute;
        bottom: 2px;
        right: 2px;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #00ff00;
        border: 2px solid #1f1f1f
    }

    .chat-list__item .chat-info {
        -webkit-box-flex: 1;
        -ms-flex: 1;
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

    .chat-list__item .chat-info__name {
        color: #ffffff;
        font-weight: 500;
        margin-bottom: 4px;
        overflow: hidden;
        text-overflow: ellipsis
    }

    .chat-list__item .chat-info__last-message {
        color: #999999;
        font-size: 0.9em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

    .chat-list__item .chat-info__time {
        color: #999999;
        font-size: 0.8em
    }

.chat-list__item--active {
    background: #2d2d2d
}

.chat-list-container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    height: 100%
}

.chat-list-search {
    position: relative;
    margin-bottom: 10px
}

    .chat-list-search input {
        width: 100%;
        padding: 10px 15px;
        border: 1px solid #333333;
        border-radius: 20px;
        background: #252525;
        color: #ffffff;
        font-size: 14px
    }

        .chat-list-search input::-webkit-input-placeholder {
            color: #999999
        }

        .chat-list-search input::-moz-placeholder {
            color: #999999
        }

        .chat-list-search input:-ms-input-placeholder {
            color: #999999
        }

        .chat-list-search input::-ms-input-placeholder {
            color: #999999
        }

        .chat-list-search input::placeholder {
            color: #999999
        }

.chat-list-empty {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    height: 200px;
    color: #999999;
    font-style: italic
}

.chat-list-item {
    -webkit-transition: all 0.2s ease;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 2px 8px
}

    .chat-list-item:hover {
        background: #2d2d2d;
        -webkit-transform: translateX(4px);
        transform: translateX(4px)
    }

    .chat-list-item.active {
        background: #2d2d2d;
        border-left: 3px solid #ff0000
    }

    .chat-list-item.unread {
        background: rgba(255,0,0,0.1)
    }

        .chat-list-item.unread .chat-info__name {
            font-weight: 600
        }

.message-bubble--sender {
    background: #25482e;
    color: #fff;
    border-radius: 18px 18px 4px 18px;
    margin-left: 150px;
    margin-right: 0;
    padding: 10px 15px;
    max-width: 70%;
    border-bottom-right-radius: 4px;
    -ms-flex-item-align: end;
    align-self: flex-end
}

.message-bubble {
    background: #222;
    color: #fff;
    border-radius: 18px 18px 18px 4px;
    margin-right: 150px;
    margin-left: 0;
    -ms-flex-item-align: start;
    align-self: flex-start;
    background: #2a2a2a;
    border-radius: 18px;
    padding: 12px 16px;
    word-wrap: break-word;
    line-height: 1.4
}

.message {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: end;
    -ms-flex-align: end;
    align-items: flex-end;
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
    align-items: flex-end
}

    .message.sent {
        -webkit-box-pack: end;
        -ms-flex-pack: end;
        justify-content: flex-end;
        text-align: right
    }

        .message.sent .message__content {
            background: #25482e;
            color: #fff;
            border-radius: 18px 18px 4px 18px;
            margin-left: 40px;
            margin-right: 0;
            -ms-flex-item-align: end;
            align-self: flex-end
        }

    .message.received {
        -webkit-box-pack: start;
        -ms-flex-pack: start;
        justify-content: flex-start;
        text-align: left
    }

        .message.received .message__content {
            background: #222;
            color: #fff;
            border-radius: 18px 18px 18px 4px;
            margin-right: 40px;
            margin-left: 0;
            -ms-flex-item-align: start;
            align-self: flex-start
        }

.message__image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    margin: 5px 0
}

.message__video {
    max-width: 300px;
    max-height: 200px;
    border-radius: 8px;
    margin: 5px 0
}

.message__file {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    background: #2f2f2f;
    border-radius: 6px;
    padding: 8px 12px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9em;
    border: 1px solid #333333;
    -webkit-transition: background 0.15s,color 0.15s;
    transition: background 0.15s,color 0.15s;
    margin: 5px 0
}

    .message__file:hover {
        background: #25482e;
        color: #fff
    }

    .message__file .file-icon {
        margin-right: 8px;
        font-size: 1.1em
    }

.inputfile-hidden {
    opacity: 0;
    position: absolute;
    width: 24px;
    height: 24px;
    left: 0;
    top: 0;
    cursor: pointer;
    z-index: 2
}

.inputfile-label {
    position: relative;
    display: inline-block;
    cursor: pointer
}

.chat-window {
    -webkit-box-flex: 1;
    -ms-flex: auto;
    flex: auto;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    width: 100%;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    background: #1a1a1a
}

.chat-messages {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    overflow: hidden;
    overflow-y: auto;
    padding: 20px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 10px
}

    .chat-messages::-webkit-scrollbar {
        width: 6px;
        height: 6px
    }

    .chat-messages::-webkit-scrollbar-track {
        background: #222
    }

    .chat-messages::-webkit-scrollbar-thumb {
        background: #333333;
        border-radius: 3px
    }

        .chat-messages::-webkit-scrollbar-thumb:hover {
            background: #404040
        }

.message__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    -ms-flex-negative: 0;
    flex-shrink: 0
}

    .message__avatar img {
        width: 100%;
        height: 100%;
        -o-object-fit: cover;
        object-fit: cover
    }

.message__content {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 4px
}

.message__time {
    color: #666666;
    font-size: 0.8em;
    -ms-flex-item-align: start;
    align-self: flex-start;
    font-size: 11px;
    color: #666666;
    margin-top: 2px
}

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

.message-input {
    padding: 20px;
    border-top: 1px solid #333333;
    background: #1a1a1a
}

.message-input__container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 10px;
    -webkit-box-align: end;
    -ms-flex-align: end;
    align-items: flex-end;
    display: flex;
    gap: 12px;
    align-items: flex-end;
    width: 100%
}

.message-input__field {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    background: #2a2a2a;
    border: 1px solid #333333;
    border-radius: 20px;
    padding: 12px 16px;
    color: #ffffff;
    resize: none;
    min-height: 44px;
    max-height: 120px;
    font-family: inherit;
    flex: 1;
    min-height: 44px;
    max-height: 120px;
    padding: 12px 16px;
    border: 1px solid #333333;
    border-radius: 22px;
    background: #2a2a2a;
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    resize: none;
    -webkit-transition: border-color 0.2s;
    transition: border-color 0.2s;
    width: 100%;
    -webkit-box-sizing: border-box;
    box-sizing: border-box
}

    .message-input__field:focus {
        border-color: #ff0000;
        border-color: #ff0000;
        outline: none
    }

.message-input__send {
    background: #ff0000;
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-transition: background 0.2s;
    transition: background 0.2s;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: #ff0000;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    font-size: 16px
}

    .message-input__send:hover {
        background: #cc0000
    }

        .message-input__send:hover:not(:disabled) {
            background: #cc0000;
            -webkit-transform: scale(1.05);
            transform: scale(1.05)
        }

    .message-input__send:disabled {
        background: #333333;
        cursor: not-allowed;
        background: #333333;
        cursor: not-allowed;
        -webkit-transform: none;
        transform: none;
        opacity: 0.5
    }

    .message-input__send svg {
        width: 20px;
        height: 20px
    }

.user-sidebar {
    background: #181818;
    color: #fff;
    padding: 24px 16px;
    min-width: 220px;
    max-width: 300px;
    height: 100vh;
    box-shadow: 2px 0 8px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.user-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

    .user-profile img {
        width: 72px;
        height: 72px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid #25482e;
        margin-bottom: 12px;
        background: #222;
    }

.user-profile__name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.user-profile__status {
    font-size: 0.95rem;
    color: #7ee787;
    margin-bottom: 8px;
    text-align: center
}

.user-search input {
    width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    border: none;
    background: #222;
    color: #fff;
    margin-bottom: 16px
}

.chat-window-container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    height: 100%;
    background: #1a1a1a
}

.chat-window-header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #333333;
    background: #1f1f1f
}

    .chat-window-header .user-info {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        gap: 12px
    }

    .chat-window-header .actions {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        gap: 10px
    }

        .chat-window-header .actions button {
            background: none;
            border: none;
            color: #999999;
            cursor: pointer;
            padding: 8px;
            border-radius: 50%;
            -webkit-transition: all 0.2s;
            transition: all 0.2s
        }

            .chat-window-header .actions button:hover {
                background: #2d2d2d;
                color: #ffffff
            }

.chat-messages-container {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 15px
}

    .chat-messages-container::-webkit-scrollbar {
        width: 6px
    }

    .chat-messages-container::-webkit-scrollbar-track {
        background: transparent
    }

    .chat-messages-container::-webkit-scrollbar-thumb {
        background: #333333;
        border-radius: 3px
    }

        .chat-messages-container::-webkit-scrollbar-thumb:hover {
            background: #404040
        }

.message-input-container {
    padding: 20px;
    border-top: 1px solid #333333;
    background: #1a1a1a
}

.message-input-form {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 12px;
    -webkit-box-align: end;
    -ms-flex-align: end;
    align-items: flex-end
}

.message-input__actions {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 8px;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center
}

.message-input__action {
    background: none;
    border: none;
    color: #999999;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
    font-size: 16px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    width: 36px;
    height: 36px
}

    .message-input__action:hover {
        background: #2d2d2d;
        color: #ffffff
    }

.message-input__field-container {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    position: relative
}

.message-container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 10px;
    -webkit-box-align: end;
    -ms-flex-align: end;
    align-items: flex-end;
    max-width: 80%
}

    .message-container.sent {
        -ms-flex-item-align: end;
        align-self: flex-end;
        -webkit-box-orient: horizontal;
        -webkit-box-direction: reverse;
        -ms-flex-direction: row-reverse;
        flex-direction: row-reverse
    }

        .message-container.sent .message-bubble {
            background: #ff0000;
            border-bottom-right-radius: 6px
        }

        .message-container.sent .message__time {
            text-align: right
        }

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

        .message-container.received .message-bubble {
            border-bottom-left-radius: 6px
        }

        .message-container.received .message__time {
            text-align: left
        }

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    -ms-flex-negative: 0;
    flex-shrink: 0
}

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

.message-content {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 4px;
    max-width: calc(100% - 42px)
}

.typing-indicator {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: #2a2a2a;
    border-radius: 18px;
    border-bottom-left-radius: 6px;
    -ms-flex-item-align: start;
    align-self: flex-start;
    max-width: 80px
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #999999;
    -webkit-animation: typing 1.4s infinite ease-in-out;
    animation: typing 1.4s infinite ease-in-out
}

    .typing-dot:first-child {
        -webkit-animation-delay: -0.32s;
        animation-delay: -0.32s
    }

    .typing-dot:nth-child(2) {
        -webkit-animation-delay: -0.16s;
        animation-delay: -0.16s
    }

@-webkit-keyframes spin {
    to {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg)
    }
}

@keyframes spin {
    to {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg)
    }
}

@-webkit-keyframes typing {
    0%,80%,to {
        -webkit-transform: scale(0.8);
        transform: scale(0.8);
        opacity: 0.5
    }

    40% {
        -webkit-transform: scale(1);
        transform: scale(1);
        opacity: 1
    }
}

@keyframes typing {
    0%,80%,to {
        -webkit-transform: scale(0.8);
        transform: scale(0.8);
        opacity: 0.5
    }

    40% {
        -webkit-transform: scale(1);
        transform: scale(1);
        opacity: 1
    }
}

/*.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #333333;
    border-radius: 50%;
    border-top-color: #ff0000;
    -webkit-animation: spin 1s ease-in-out infinite;
    animation: spin 1s ease-in-out infinite
}*/

.error-message {
    background: #ff3333;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    margin: 10px 20px;
    font-size: 14px
}

.success-message {
    background: #00cc00;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    margin: 10px 20px;
    font-size: 14px
}

.empty-state {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    height: 100%;
    color: #999999;
    text-align: center;
    padding: 40px 20px
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5
}

.empty-state-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px
}

.empty-state-description {
    font-size: 14px;
    line-height: 1.5
}

.sidebar-divider {
    height: 1px;
    background: #333;
    margin: 18px 0 12px 0;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.user-media-section {
    padding: 0 10px 10px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.media-section-title {
    font-size: 1.08em;
    font-weight: 600;
    color: #999;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    text-align: center;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    overflow-y: auto;
    width: 100%;
    justify-items: center;
    padding-bottom: 5px;
}

.media-thumb {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    background: #222;
    transition: transform 0.15s, box-shadow 0.15s, border 0.15s;
    display: block;
}

    .media-thumb:hover {
        transform: scale(1.08);
        box-shadow: 0 4px 16px rgba(45,136,255,0.18);
        border: 2px solid #2d88ff;
    }

.media-file {
    display: flex;
    align-items: center;
    background: #2f2f2f;
    border-radius: 8px;
    padding: 6px 8px;
    color: #fff;
    text-decoration: none;
    font-size: 0.97em;
    border: 1.5px solid #333;
    transition: background 0.15s, color 0.15s, border 0.15s;
    word-break: break-all;
    margin-bottom: 2px;
    width: 100%;
    justify-content: center;
}

    .media-file:hover {
        background: #2d88ff;
        color: #fff;
        border: 1.5px solid #2d88ff;
    }

.file-icon {
    margin-right: 7px;
    font-size: 1.25em;
}

.user-sidebar-container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    height: 100%;
    background: #1f1f1f
}

.user-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #333333;
    font-weight: 600;
    font-size: 16px
}

.user-sidebar-content {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    overflow-y: auto;
    padding: 10px 0
}

    .user-sidebar-content::-webkit-scrollbar {
        width: 6px
    }

    .user-sidebar-content::-webkit-scrollbar-track {
        background: transparent
    }

    .user-sidebar-content::-webkit-scrollbar-thumb {
        background: #333333;
        border-radius: 3px
    }

        .user-sidebar-content::-webkit-scrollbar-thumb:hover {
            background: #404040
        }

.user-item {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    -webkit-transition: background 0.2s;
    transition: background 0.2s;
    margin: 2px 8px;
    border-radius: 8px
}

    .user-item:hover {
        background: #2d2d2d
    }

    .user-item.online .avatar__status {
        background: #00ff00
    }

    .user-item.offline .avatar__status {
        background: #999999
    }


@media (max-width: 768px) {
    .chat-messages {
        height: 60vh;
    }
}

@media (min-width: 769px) {
    .chat-messages {
        height: 70vh;
    }
}


textarea.message-input__field {
    height: auto !important;
    min-height: 32px !important;
    max-height: 60px !important;
    resize: none !important;
    margin-top: 0 !important;
    font-size: 15px;
    padding: 8px 10px;
}

/*
@media screen and (max-width: 768px) {
    .chat-app__main.hide-on-sidebar {
        display: none !important;
    }
}


@media screen and (max-width: 768px) {
    .chat-app__main.hide-on-sidebar {
        display: none !important;
    }
}*/


.chat-list {
    display: flex;
    flex-direction: column;
    height: 100%; 
    max-height: 100vh;
    min-height: 0;
}

#chat-users {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    max-height: calc(10 * 70px);

}

.logout-form {
    flex-shrink: 0;
    margin-top: 10px;

}

#chat-users::-webkit-scrollbar {
    width: 6px;
    height: 3px;
}

#chat-users::-webkit-scrollbar-track {
    background: #222;
}

#chat-users::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 3px;
}

    #chat-users::-webkit-scrollbar-thumb:hover {
        background: #404040;
    }


#chat-users::-webkit-scrollbar {
    width: 3px;
    height: 3px;
}

#chat-users::-webkit-scrollbar-track {
    background: #222;
}

#chat-users::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 3px;
}

    #chat-users::-webkit-scrollbar-thumb:hover {
        background: #404040;
    }

@media (max-width: 767.98px) {
    .chat-list {
        display: flex;
        flex-direction: column;
        height: 100%;
        max-height: 100vh;
        min-height: 0;
    }

    #chat-users {
        flex: 1 1 auto;
        overflow-y: auto;
        min-height: 0;
        max-height: calc(10 * 55px);
    }

    .logout-form {
        flex-shrink: 0;
        margin-top: 10px;
    }

    #chat-users::-webkit-scrollbar {
        width: 6px;
        height: 3px;
    }

    #chat-users::-webkit-scrollbar-track {
        background: #222;
    }

    #chat-users::-webkit-scrollbar-thumb {
        background: #333333;
        border-radius: 3px;
    }

        #chat-users::-webkit-scrollbar-thumb:hover {
            background: #404040;
        }
}


body.chat-scroll-lock {
    overflow-y: hidden !important;
}