/* Configuração Geral - Estilos globais para HTML, body, labels e classes utilitárias */
html {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
	scrollbar-width: thin;
}
body {
    overflow-y: scroll;
}
label {
    color: #000;
    margin-bottom: unset;
    font-size: 13px;
    font-weight: bold;
}
.text-black {
    color: #000 !important;
}
.row-header {
    min-height: 40px;
}
.txbxdata {
    cursor: pointer;
}
.border-left-disabled {
    border-left: 0.25rem solid #d0d0d0 !important;
}
.border-bottom-disabled {
    border-bottom: 0.25rem solid #d0d0d0 !important;
}
.bg-gradient-index {
    background-image: linear-gradient(180deg, #76BA27 20%, #2365af 100%);
    background-size: cover;
}

/* Botões de Categorias - Estilos para botões de categorias e suas variações */
.tab-pane-categorias {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    padding: 0;
}
.btn-categorias {
    position: relative;
    min-height: 52px;
    width: calc((100% - 40px) / 11);
    min-width: 90px;
    max-width: 142px;
    border-color: #76BA27 !important;
    background-color: #fff !important;
    color: #000 !important;
    padding: 0.2rem 0.2rem !important;
    text-align: center;
    box-sizing: border-box;
    margin: 2px;
}
.btn-categorias:focus,
.btn-categorias.active {
    font-weight: bold;
}
.btn-categorias-progress {
    position: absolute;
    height: 100%;
    width: 0%;
    top: 0;
    left: 0;
    background: #b8e3bf;
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
    border-radius: 0.2rem !important;
}
.btn-especial-div {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}
.btn-especial-i {
    position: absolute;
    right: 2px;
    top: 36px;
    font-size: 0.8em;
}
.btn-objetivo-i {
    position: absolute;
    right: 2px;
    top: 2px;
    font-size: 0.8em;
}
.btn-categorias-text {
    position: relative;
    display: block;
    overflow: hidden;
    line-height: 1.1em;
    max-height: 3.2em;
    font-size: 0.9rem;
}

/* Sidebar - Estilos para a barra lateral e suas variações (menu-small, menu-small-titles) */
.sidebar {
    transition: width 0.3s ease, opacity 0.3s ease;
}
.sidebar-dark-green {
    color: #225B34 !important;
}
.sidebar .nav-item .nav-link i {
    font-size: large;
}
.sidebar .nav-img {
    width: 43px;
    height: 35px;
}
.fa-nav-spacer {
    width: 30px;
    height: 25px;
    padding: 2px;
}
.nav-row {
    display: flex;
    flex-wrap: wrap;
}
.sb_nm {
    font-size: 0.85rem;
    font-weight: 600;
}
.sb_pt {
    font-size: 0.8rem;
    font-weight: 600;
}
.nav-img, .sb_nm, .sb_pt, .progress {
    transition: width 0.3s ease, font-size 0.3s ease, margin 0.3s ease, opacity 0.3s ease;
}
.nav-row .progress {
    transition: width 0.6s ease !important;
    max-width: 100%;
}
.nav-row .progress-bar {
    transition: width 0.6s ease !important;
    max-width: 100%;
}

/* Menu Pequeno (menu-small) - Estilos para sidebar recolhida */
body.menu-small .sidebar.toggled .nav-item .nav-link .h_act {
    display: none;
}
body.menu-small .sidebar.toggled .nav-item .nav-link .nav-img {
    margin: auto;
}
body.menu-small.sidebar-toggled .sb_nm,
body.menu-small.sidebar-toggled .sb_pt {
    max-width: 72px;
}

/* Menu Pequeno com Títulos (menu-small-titles) - Estilos para sidebar com títulos reduzidos */
body.menu-small-titles.sidebar-toggled .sidebar .nav-img {
    margin: auto;
}
body.menu-small-titles.sidebar-toggled .sidebar .sb_nm {
    font-size: 0.6rem;
    margin: auto;
    width: 72px;
    white-space: nowrap;
}
body.menu-small-titles.sidebar-toggled .sidebar .sb_pt {
    font-size: 0.6rem;
    margin: auto;
    width: 72px;
}

/* Breakpoint 1920px - Ajustes para botões de categorias */
@media (max-width: 1920px) {
    .btn-categorias {
        width: calc((100% - 44px) / 11);
    }
    .btn-categorias-text {
        font-size: 0.88rem;
    }
    body.menu-small.sidebar-toggled .btn-categorias {
        width: calc((100% - 80px) / 11);
    }
    body.menu-small-titles.sidebar-toggled .btn-categorias {
        width: calc((100% - 84px) / 12);
    }
}

/* Breakpoint 1600px - Ajustes para botões de categorias */
@media (max-width: 1600px) {
    .btn-categorias {
        width: calc((100% - 38px) / 10);
    }
    .btn-categorias-text {
        font-size: 0.86rem;
    }
    body.menu-small.sidebar-toggled .btn-categorias {
        width: calc((100% - 50px) / 10);
    }
    body.menu-small-titles.sidebar-toggled .btn-categorias {
        width: calc((100% - 42px) / 10);
    }
}

/* Breakpoint 1440px - Ajustes para botões de categorias */
@media (max-width: 1440px) {
    .btn-categorias {
        width: calc((100% - 36px) / 9);
    }
    .btn-categorias-text {
        font-size: 0.85rem;
    }
    body.menu-small.sidebar-toggled .btn-categorias {
        width: calc((100% - 46px) / 9);
    }
    body.menu-small-titles.sidebar-toggled .btn-categorias {
        width: calc((100% - 40px) / 10);
    }
}

/* Breakpoint 1280px - Ajustes para botões de categorias */
@media (max-width: 1280px) {
    .btn-categorias {
        width: calc((100% - 34px) / 8);
    }
    .btn-categorias-text {
        font-size: 0.84rem;
    }
    body.menu-small.sidebar-toggled .btn-categorias {
        width: calc((100% - 46px) / 9);
    }
    body.menu-small-titles.sidebar-toggled .btn-categorias {
        width: calc((100% - 38px) / 9);
    }
}

/* Breakpoint 768px - Ajustes para botões de categorias e sidebar */
@media (max-width: 768px) {
    .btn-categorias {
        width: calc((100% - 20px) / 6);
    }
    .btn-categorias-text {
        font-size: 0.82rem;
    }
    body.menu-small.sidebar-toggled .btn-categorias {
        width: calc((100% - 30px) / 6);
    }
    body.menu-small-titles.sidebar-toggled .btn-categorias {
        width: calc((100% - 24px) / 6);
    }
    body.sidebar-toggled:not(.menu-small):not(.menu-small-titles) .btn-categorias {
        width: calc((100% - 24px) / 6);
    }
    /* Menu Pequeno (menu-small) - Estilos para sidebar em telas menores */
    body.menu-small .sidebar .nav-item .collapse {
        left: calc(5rem + 1.5rem / 2);
    }
    body.menu-small .sidebar .nav-item .nav-link {
        width: 5rem;
    }
    body.menu-small .sidebar {
        width: 5rem;
    }
    body.menu-small .sidebar .nav-item .nav-link i {
        font-size: large;
    }
    body.menu-small .sidebar .nav-item .nav-link .h_act {
        display: none;
    }
    body.menu-small .sidebar .nav-item .nav-link .nav-img {
        margin: auto;
    }
    /* Menu Pequeno com Títulos (menu-small-titles) - Estilos para sidebar com títulos */
    body.menu-small-titles .sidebar .nav-img {
        margin: auto;
    }
    body.menu-small-titles .sidebar .sb_nm {
        font-size: 0.6rem;
        margin: auto;
        width: 72px;
        white-space: nowrap;
    }
    body.menu-small-titles .sidebar .sb_pt {
        font-size: 0.6rem;
        margin: auto;
        width: 72px;
    }
    /* Sidebar Não Recolhida - Estilos para nav-img e textos */
    .sidebar .nav-img:not(.sidebar-toggled) {
        margin: auto;
    }
    .sb_nm:not(.sidebar-toggled) {
        font-size: 0.6rem;
        margin: auto;
        width: 72px;
        white-space: nowrap;
    }
    .sb_pt:not(.sidebar-toggled) {
        font-size: 0.6rem;
        margin: auto;
        width: 72px;
    }
}

/* Breakpoint 480px - Ajustes para botões de categorias e sidebar */
@media (max-width: 480px) {
    .btn-categorias {
        width: calc((100% - 14px) / 4);
    }
    .btn-categorias-text {
        font-size: 0.76rem;
    }
    body.menu-small.sidebar-toggled .btn-categorias {
        width: calc((100% - 20px) / 4);
    }
    body.menu-small-titles.sidebar-toggled .btn-categorias {
        width: calc((100% - 20px) / 4);
    }
    body.sidebar-toggled:not(.menu-small):not(.menu-small-titles) .btn-categorias {
        width: calc((100% - 20px) / 4);
    }
    /* Sidebar Recolhida - Estilos para telas pequenas */
    body.sidebar-toggled {
        overflow-x: hidden;
    }
    .sidebar.toggled {
        width: 0;
        opacity: 0;
        overflow: hidden;
    }
    .sidebar .collapse {
        display: none;
    }
	.sidebar:not(.toggled) .collapse.show {
        display: block;
    }
}

/* Breakpoint 768px (mínimo) - Ajustes para sidebar em telas maiores */
@media (min-width: 768px) {
    /* Menu Pequeno (menu-small) - Estilos para sidebar recolhida */
    body.menu-small .sidebar.toggled .nav-item .collapse {
        left: calc(5rem + 1.5rem / 2);
    }
    body.menu-small .sidebar.toggled .nav-item .nav-link {
        width: 5rem;
    }
    body.menu-small .sidebar.toggled {
        width: 5rem !important;
    }
    /* Sidebar Recolhida (sem menu-small-titles) - Estilos para nav-img e textos */
    body.sidebar-toggled .sidebar .nav-img:not(.menu-small-titles) {
        margin: auto;
    }
    body.sidebar-toggled .sb_nm:not(.menu-small-titles) {
        font-size: 0.6rem;
        margin: auto;
        width: 72px;
        white-space: nowrap;
    }
    body.sidebar-toggled .sb_pt:not(.menu-small-titles) {
        font-size: 0.6rem;
        margin: auto;
        width: 72px;
    }
}

/* Tabelas - Estilos para tabelas e suas variações */
table {
    font-size: 13px;
}
td, th {
    white-space: nowrap;
}
td {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    user-select: text !important;
}
#tbl_artigos td {
    white-space: normal !important;
}
#tbl_vendas td {
    white-space: normal !important;
}
table.dataTable thead th {
    padding: 10px 13px 10px 0px !important;
}
table.dataTable tbody td {
    padding: 8px 13px 8px 0px !important;
}
table.dataTable tfoot th {
    padding: 8px 13px 8px 0px !important;
}
table.dataTable thead > tr > th.sorting:before,
table.dataTable thead > tr > th.sorting:after {
    right: 3px !important;
}
table.dataTable tbody td i {
    cursor: pointer;
}
.tr-b-success td {
    border-bottom: 1pt solid #1cc88a !important;
}
.tr-b-danger td {
    border-bottom: 1pt solid #e74a3b !important;
}
.tr-b-warning td {
    border-bottom: 1pt solid #f6c23e !important;
}
.tr-b-info td {
    border-bottom: 1pt solid #36b9cc !important;
}
.td-div-text-break {
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 100%;
    overflow-wrap: break-word;
}
.categoria-header:hover {
    text-decoration: underline;
    cursor: pointer;
}
.total-row {
    background-color: #565656 !important;
    color: #fff !important;
}
.no-hover:hover {
    background-color: transparent !important;
}
.sub-table.table-hover thead tr:hover,
.sub-table.table-hover thead tr:hover th,
.sub-table.table-hover thead tr:hover th * {
    background-color: transparent !important;
    color: inherit !important;
}
.sub-table.table-hover tbody tr:hover,
.sub-table.table-hover tbody tr:hover td {
    background-color: var(--bs-table-hover-bg, #f5f5f5) !important;
    color: inherit !important;
}
.txt_obj {
    font-size: 0;
}
.txtData {
    font-size: 13px;
    color: #858796;
    font-weight: bold;
}
.text-perphrmance {
    color: #595959 !important;
    font-weight: bold;
}
.changetxbx {
    background: #1cc88a !important;
}
.bg-calculado {
    background: #76BA27 !important;
}
.especial td {
    background-color: #e3ffe6 !important;
}
.validade td {
    background-color: #fff8c3 !important;
}
.especial-validade td {
    background: #ffcbcb !important;
}

/* Inputs - Estilos para inputs e classes relacionadas */
.input-shadow-error {
    box-shadow: inset 0 1px 1px rgba(0,0,0,0.075), 0 0 3px #e72c28;
}
.input-shadow-error:focus {
    box-shadow: inset 0 1px 1px rgba(0,0,0,0.075), 0 0 4px #e72c28;
}
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
}
input[type=checkbox] {
    cursor: pointer;
}
.required {
    border-color: #d59392;
}
.required:focus {
    border-color: #d59392;
}
.required-txt {
    border-color: #f7b635;
}
.required-txt:focus {
    border-color: #f7b635;
}

/* Notificações - Estilos para badges de notificação */
.badge-counter-right {
    padding: 0.3em 0.4em;
    font-size: 80%;
    font-weight: 800;
    bottom: 30px;
}
.badge-counter-left {
    padding: 0.3em 0.4em;
    font-size: 80%;
    font-weight: 800;
    right: 25px !important;
    bottom: 30px;
}

/* Seleção de Usuário - Estilo para contêiner de seleção de usuário */
.user-sl-overvflow {
    overflow-y: scroll;
    max-height: 595px;
    min-width: 193px;
}

/* Botões Gerais - Estilos para botões e links utilitários */
.btn-tool {
    color: #fff;
    background-color: #c2c2c2;
    border-color: #c2c2c2;
    border-radius: 5px 0px 0px 5px;
}
.btn-tool-right {
    border-radius: 0px 5px 5px 0px;
}
.btn-tool:hover {
    color: #fff;
}
.btn-opt {
    color: #000;
    background-color: #fffacc;
    border-color: #cbcbcb;
    width: 33px;
    height: 31px;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}
.btn-opt:hover {
    color: #000;
    background-color: #ececec;
    border-color: #cbcbcb;
}
.btn-opt:focus, .btn-opt.focus {
    -webkit-box-shadow: 0 0 0 0.2rem rgba(203, 203, 203, 0.5);
    box-shadow: 0 0 0 0.2rem rgba(203, 203, 203, 0.5);
}
.btn-opt:disabled, .btn-opt.disabled {
    color: #000;
    background-color: #eaecf4;
    border-color: #cbcbcb;
}
.link-like {
    color: #007bff;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease-in-out, text-decoration 0.15s ease-in-out;
}
.link-like:hover {
    color: #0056b3;
    text-decoration: underline;
}
.highlight {
    background-color: #fffacc !important;
    font-weight: bold;
}
.btn-border-0 {
    box-shadow: unset;
}
.btn-border-0:focus, .btn-border-0:hover, .btn-border-0:active {
    box-shadow: unset;
}
.close-session-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    color: #dc3545;
}

/* Macros - Estilos para botões de macros e marcadores */
.btn-macro {
    min-width: 100px !important;
    margin: 1px !important;
    border-radius: 0.35rem !important;
}
.btn-macro-especial {
    background-color: #e3ffe6 !important;
}
.btn-macro-progress {
    position: absolute;
    height: 100%;
    width: 0%;
    top: 0;
    left: 0;
    background: #b8e3bf;
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
    border-radius: 4px;
}
.btn-macro-text {
    position: relative;
}
.marker-container {
    width: 200px;
    position: absolute;
}
.marker {
    position: relative;
    width: 2px;
    height: 16px;
}

/* Progress Bar - Estilo para barra de progresso geral */
.bg-progress-geral {
    background-color: #b8e3bf !important;
}

/* Imagens - Estilos para thumbnails, imagens de perfil e popovers */
.thumbnail {
    display: block;
    padding: 4px;
    margin-bottom: 20px;
    line-height: 1.42857143;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    -webkit-transition: border .2s ease-in-out;
    -o-transition: border .2s ease-in-out;
    transition: border .2s ease-in-out;
}
.conquistas {
    display: block;
    padding: 4px;
    line-height: 1.42857143;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    -webkit-transition: border .2s ease-in-out;
    -o-transition: border .2s ease-in-out;
    transition: border .2s ease-in-out;
}
.image-profile {
    width: 45px;
    height: 45px;
    border-radius: 20% !important;
    padding: 2px;
    border: 1px solid #ddd;
}
.image-position {
    width: 35px;
    height: 35px;
    border-radius: 20% !important;
    padding: 1px;
    border: 1px solid #ddd;
}
.navbar-nav:not(.toggled) .image-top3 {
    left: -6px;
}
.image-top3 {
    width: 20px;
    height: 20px;
    position: relative;
    left: -17px;
    top: -44px;
}
.popover-text {
    max-width: 200px;
}
.popover-image {
    width: 200px;
    height: 200px;
}
@media (max-width: 560px) {
    .image-profile {
        width: 28px;
        height: 28px;
    }
}

/* Seleção de Ano/Mês - Estilos para seletores de ano e mês */
.sl-ano-sme {
    background-color: #f3de7d;
    border: 1px solid #f3de7d;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    color: #000 !important;
    border-radius: 0.35rem 0.35rem 0px 0px;
}
.sl-ano {
    width: 135px !important;
}
.sl-sme {
    width: 70px !important;
}


/* Navegação do modal de gestão de categorias */
.modal-categoria-nav-custom {
    border-bottom: 1px solid #e3e6f0;
    margin-bottom: 15px;
}
.modal-categoria-nav-custom .nav-item {
    margin: 1px 2px;
}
.modal-categoria-nav-custom .nav-link {
    background-color: #fff;
    border: 1px solid #cbcbcb;
    border-radius: 0.35rem;
    color: #000;
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
}
.modal-categoria-nav-custom .nav-link:hover {
    background-color: #ececec;
    color: #000;
}
.modal-categoria-nav-custom .nav-link.active {
    background-color: #76BA27;
    border-color: #cbcbcb;
    color: #000;
}

/* Estilo para o editor Quill, anulando a cor do body */
#editor .ql-editor {
    color: #000000 !important;
}
#modal_texto_formatado .modal-body {
    color: #000000 !important;
}

/* Slider - Estilos para interruptores (switches) */
.switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}
input:checked + .slider {
    background-color: #1cc88a;
}
input:focus + .slider {
    box-shadow: 0 0 1px #1cc88a;
}
input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}
.slider.round {
    border-radius: 10px;
}
.slider.round:before {
    border-radius: 30%;
}

/* Animações - Estilos para animações de entrada e efeitos */
.animated {
    -webkit-animation-duration: 1s;
    animation-duration: 1s;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
}
.animated.infinite {
    -webkit-animation-iteration-count: infinite;
    animation-iteration-count: infinite;
}
.animated.hinge {
    -webkit-animation-duration: 2s;
    animation-duration: 2s;
}
@-webkit-keyframes fadeInDown {
    0% {
        opacity: 0;
        -webkit-transform: translateY(-20px);
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}
@keyframes fadeInDown {
    0% {
        opacity: 0;
        -webkit-transform: translateY(-20px);
        -ms-transform: translateY(-20px);
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        -webkit-transform: translateY(0);
        -ms-transform: translateY(0);
        transform: translateY(0);
    }
}
.fadeInDown {
    -webkit-animation-name: fadeInDown;
    animation-name: fadeInDown;
}
@-webkit-keyframes pulse {
    0% {
        -webkit-transform: scale(1);
        transform: scale(1);
    }
    50% {
        -webkit-transform: scale(1.1);
        transform: scale(1.1);
    }
    100% {
        -webkit-transform: scale(1);
        transform: scale(1);
    }
}
@-webkit-keyframes growIn {
    0% {
        -webkit-transform: scale(0.9);
        transform: scale(0.9);
        opacity: 0;
    }
    100% {
        -webkit-transform: scale(1);
        transform: scale(1);
        opacity: 1;
    }
}
@keyframes growIn {
    0% {
        -webkit-transform: scale(0.9);
        transform: scale(0.9);
        opacity: 0;
    }
    100% {
        -webkit-transform: scale(1);
        transform: scale(1);
        opacity: 1;
    }
}
.growIn {
    -webkit-animation-name: growIn;
    animation-name: growIn;
}

/* Card Tool - Estilos para ferramenta de cartão */
.card-tool {
    background-color: #f8f9fc;
}
@media (max-width: 768px) {
    .card-tool {
        border-top: 1px solid #e3e6f0;
        border-radius: 0px 0px 0.35rem 0.35rem;
    }
}
@media (min-width: 768px) {
    .card-tool {
        border-left: 1px solid #e3e6f0;
        border-radius: 0px 0px 0.35rem 0px;
    }
}

/* Variáveis Globais - Define cores e alturas usadas no chat */
:root {
    --chat-height: 400px;
    --modal-height: 600px;
    --priority-normal-sent: #007bff;
    --priority-normal-received: #f1f1f1;
    --priority-urgent: #FF8F00;
    --priority-emergency: #D32F2F;
    --priority-normal-popup: #4CAF50;
    --text-sent: #FFFFFF;
    --text-received: #000000;
}

/* Botões Personalizados - Estilos para botões genéricos do chat */
.btn-chat {
    border: 1px solid #d1d3e2;
    background-color: #f8f9fc;
    color: black;
}
.btn-chat:hover {
    background-color: #e9ecef;
    color: #000000;
}
.btn-chat:active {
    background-color: #dee2e6;
    color: #000000;
	box-shadow: 0 0 0 0.2rem rgba(203, 203, 203, 0.5);
}
.btn-chat:focus {
	box-shadow: 0 0 0 0.2rem rgba(203, 203, 203, 0.5);
}

/* Container Principal - Layout geral do chat */
.chat-container {
    display: flex;
    flex-direction: column;
}

/* Lista de Contatos - Estilos para a lista de contatos e itens de contato */
.contact-list {
    min-height: calc(var(--chat-height) - 48px);
    max-height: calc(var(--chat-height) - 48px);
    overflow-y: auto;
}
.group-member-checkbox {
    margin-right: 8px;
}
.group-create-container:not([style*="display: none"]) ~ .chat-container .contact-list {
    min-height: calc(var(--chat-height) - 48px - 48px);
    max-height: calc(var(--chat-height) - 48px - 48px);
}
.contact-item {
    border: unset !important;
    border-bottom: 1px solid #e3e6f0 !important;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    padding: 8px;
}
.contact-list .contact-image {
    flex: 0 0 24px;
    margin-right: 8px;
}
.contact-list .contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.contact-list .contact-name {
    font-weight: bold;
    color: #858796;
}
.contact-list .message-preview {
    font-size: 0.85em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #858796;
}
.contact-list .priority-1 .message-preview {
    color: var(--text-received);
}
.contact-list .message-preview.font-weight-bold {
    color: var(--text-received);
}
.contact-list .priority-2 .message-preview,
.contact-list .priority-3 .message-preview {
    font-weight: bold;
}
.contact-list .priority-2 .message-preview {
    color: var(--priority-urgent);
}
.contact-list .priority-3 .message-preview {
    color: var(--priority-emergency);
}
#chatDropdownMenu .dropdown-item:active {
    background-color: #eaecf4;
    color: #3a3b45;
}

/* Caixa de Chat - Contêiner principal do chat e cabeçalho */
.chat-box {
    flex-grow: 1;
    position: relative;
}
.chat-header {
    border-bottom: 1px solid #e3e6f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.chat-header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #858796;
}
.chat-header-buttons {
    display: flex;
    gap: 5px;
}

/* Pesquisa de Mensagens - Caixa de pesquisa e dropdown de sugestões de tags (usa estilos Bootstrap por padrão) */
/*
.message-search-container {
    display: none;
    position: absolute;
    top: 45px;
    left: 10px;
    right: 10px;
    background-color: #fff;
    border: 1px solid #e3e6f0;
    border-radius: 4px;
    z-index: 10;
}
*/
.message-search-container:not([style*="display: none"]) ~ .chat-messages {
    min-height: calc(var(--chat-height) - 48px - 48px - 54px);
    max-height: calc(var(--chat-height) - 48px - 48px - 54px);
}
.tag-suggestions {
    position: absolute;
    left: 0;
    width: calc(100% - 14px);
    max-height: 110px;
    overflow-y: auto;
    border: 1px solid #e3e6f0;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    z-index: 1001;
    margin: 2px 8px;
    border-radius: 4px;
}
.tag-suggestions ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.tag-suggestions li {
    padding: 8px 12px;
    cursor: pointer;
    color: #333333;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #e3e6f0;
}
.tag-suggestions li.selected {
    background: #e9ecef;
}
.tag-suggestions li.priority-normal {
    color: var(--priority-normal-sent);
}
.tag-suggestions li.priority-urgent {
    color: var(--priority-urgent);
}
.tag-suggestions li.priority-emergency {
    color: var(--priority-emergency);
}
.tag-suggestions li.date,
.tag-suggestions li.username {
    color: #333333;
}
.tag-suggestions li:hover {
    background: #e9ecef;
}

/* Mensagens - Estilos para mensagens enviadas e recebidas */
.chat-messages {
    min-height: calc(var(--chat-height) - 48px - 54px);
    max-height: calc(var(--chat-height) - 48px - 54px);
    overflow-y: auto;
    padding: 10px;
}
.chat-messages .message {
    margin: 5px 0;
    padding: 10px;
    border-radius: 5px;
    position: relative;
}
.chat-messages .sent {
    margin-left: 20%;
}
.chat-messages .sent.priority-1 {
    background-color: var(--priority-normal-sent);
    color: var(--text-sent);
}
.chat-messages .sent.priority-2 {
    background-color: var(--priority-urgent);
    color: var(--text-sent);
}
.chat-messages .sent.priority-3 {
    background-color: var(--priority-emergency);
    color: var(--text-sent);
}
.chat-messages .message.received.priority-1 {
    background-color: var(--priority-normal-received) !important;
    color: var(--text-received) !important;
    margin-right: 20%;
}
.chat-messages .message.received.priority-2 {
    background-color: var(--priority-urgent) !important;
    color: var(--text-received) !important;
    margin-right: 20%;
}
.chat-messages .message.received.priority-3 {
    background-color: var(--priority-emergency) !important;
    color: var(--text-received) !important;
    margin-right: 20%;
}
.chat-messages .message-text {
    color: inherit;
}
.chat-messages .read-check {
    font-size: 10px;
    position: absolute;
    bottom: 5px;
    right: 5px;
    color: var(--text-received);
}

.message-image {
    width: 150px;
    height: 100px;
    cursor: pointer;
    object-fit: cover; /* Preserva proporções sem distorção */
    vertical-align: middle; /* Alinha ao texto */
	opacity: 0; /* Invisível até carregar */
	transition: opacity 0.3s ease; /* Fade-in suave */
}

.message-image.loaded {
    opacity: 1; /* Aparece após carregar */
}

/* Campo de Entrada - Estilos para o campo de entrada de mensagens */
#message-input {
    resize: none;
    height: 38px;
}
.chat-input-group {
    border-top: 1px solid #e3e6f0;
    padding: 8px;
}
.message-priority {
    border: 1px solid #d1d3e2;
}

/* Botão de Prioridade - Estilos para o botão de seleção de prioridade */
.priority-button {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
}
.btn-priority-normal {
    background-color: #dbdbdb;
}
.btn-priority-urgent {
    background-color: var(--priority-urgent);
}
.btn-priority-emergency {
    background-color: var(--priority-emergency);
}

/*Configurações de link e download*/
.download-link {
    display: inline-block;
    padding: 2px 6px;
    background-color: #ffffff;
    color: #007bff;
    text-decoration: none;
    border: 1px solid #e3e6f0;
    border-radius: 3px;
    font-size: 0.9em;
    transition: color 0.2s ease, background-color 0.2s ease;
}
.download-link:hover {
    background-color: #e9ecef;
    color: #0056b3;
}
.download-link .fa {
    margin-right: 4px;
}
.chat-messages .sent .download-link {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.2);
}
.chat-messages .sent .download-link:hover {
    background-color: rgba(255, 255, 255, 0.3);
}
.chat-messages .received .download-link {
    color: #007bff;
    background-color: #ffffff;
}
.chat-messages .received .download-link:hover {
    background-color: #e9ecef;
}

/* Configurações de Grupo - Estilos para o painel de configurações de grupo */
.group-settings {
    min-height: calc(var(--chat-height) - 48px - 54px);
    max-height: calc(var(--chat-height) - 48px - 54px);
    overflow-y: auto;
    padding: 10px;
}
.chat-settings-container {
    padding: 5px;
}
.chat-settings-controls .btn-group {
    margin-bottom: 10px;
}
.settings-content {
    border: 1px solid #e3e6f0;
    padding: 10px;
    border-radius: 0.35rem;
}
.file-item {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.remove-file {
    background-color: #D32F2F;
    color: white;
    border: none;
    padding: 2px 6px;
    cursor: pointer;
}
.remove-file:hover {
    background-color: #B71C1C;
}
.pagination-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 5px;
}
.pagination-controls button {
    padding: 2px 6px;
    cursor: pointer;
    border: 1px solid #d1d3e2;
    background-color: #f8f9fc;
}
.pagination-controls button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}
.group-settings .list-group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
}
.group-settings .list-group-item .remove-member-btn,
.group-settings .list-group-item .delete-group-btn {
    color: #D32F2F;
    cursor: pointer;
}
.group-settings .list-group-item .change-group-image-btn {
    color: #007bff;
    cursor: pointer;
}
.group-settings .list-group-item .remove-member-btn:hover,
.group-settings .list-group-item .delete-group-btn:hover {
    color: #B71C1C;
}
.group-settings .list-group-item .change-group-image-btn:hover {
    color: #0056b3;
}
.group-settings .list-group-item .member-image {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
}
.group-settings .list-group-item .admin-icon {
    font-size: 0.9rem;
    color: #007bff;
    margin-left: 8px;
}
.group-settings .list-group-item .icon-group {
    display: flex;
    gap: 8px;
    align-items: center;
}
.btn.active {
    background-color: #76BA27;
    color: #000;
}

/* Estilos específicos para imagens em #images-content (config-images) */
#images-content.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 92px);
    gap: 2px;
    padding: 5px;
    max-width: 290px;
    box-sizing: border-box;
}

#images-content .image-container {
    position: relative;
    overflow: hidden;
    width: 90px;
    height: 90px;
    display: inline-block;
}

#images-content .image-content {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

#images-content .remove-icon {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 10;
    font-size: 14px;
    color: #D32F2F;
    cursor: pointer;
    transition: color 0.2s ease;
}

#images-content .remove-icon:hover {
    color: #B71C1C;
}

/* Estilos específicos para arquivos em #files-content */
#files-content .file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 5px;
    border: 1px solid #e3e6f0;
    border-radius: 3px;
}

#files-content .download-link {
    flex-grow: 1;
    text-align: left;
    padding: 2px 6px;
    color: #007bff;
    text-decoration: none;
    border: 1px solid #e3e6f0;
    border-radius: 3px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

#files-content .download-link:hover {
    background-color: #e9ecef;
    color: #0056b3;
}

#files-content .download-link .fa {
    margin-right: 5px;
}

#files-content .remove-icon {
    margin-left: auto;
    font-size: 14px;
    color: #D32F2F;
    cursor: pointer;
    transition: color 0.2s ease;
}

#files-content .remove-icon:hover {
    color: #B71C1C;
}

/* Popup de Notificação - Estilos para popups de novas mensagens */
.new-message-popup {
    display: none;
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    padding: 15px 30px 15px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    font-size: 14px;
    text-align: center;
}
.new-message-popup.priority-1 {
    background-color: var(--priority-normal-popup);
    color: var(--text-sent);
}
.new-message-popup.priority-2 {
    background-color: var(--priority-urgent);
    color: var(--text-sent);
}
.new-message-popup.priority-3 {
    background-color: var(--priority-emergency);
    color: var(--text-sent);
}
.new-message-popup .popup-message {
    display: inline-block;
}
.new-message-popup .popup-close {
    background: none;
    border: none;
    color: var(--text-sent);
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 16px;
    line-height: 1;
}
.new-message-popup .popup-close:focus,
.new-message-popup .popup-close:active {
    outline: none;
}

/* Preview de Anexos*/
.attachment-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    position: relative;
}

.preview-content {
    transition: opacity 0.3s;
}

.attachment-display {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cancel-icon {
    font-size: 16px;
    color: #000000;
    cursor: pointer;
    margin-left: auto; /* Alinha o ícone à direita */
	position: absolute;
	top: 5px;
	right: 5px;
}
.cancel-icon:hover {
	color: #333333;
}

.cancel-attachment:hover {
    background-color: #c82333;
}

/* Imagem de Perfil - Estilos para imagens de perfil de usuários e grupos */
.image-profile-chat {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transition: border 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
.image-profile-chat.online {
    border: 2px solid #00cc00;
    box-shadow: 0 0 8px rgba(0, 204, 0, 0.6);
}
.image-profile-chat.group {
    border: 2px solid #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.6);
}

/* Ícone de Mensagem - Estilo para o ícone de envio de mensagem */
.chat-paper-plane {
    font-size: 10px;
}

/* Janela Flutuante de Leitura - Estilos para a janela de detalhes de leitura e ícone */
.read-by-popup {
    position: absolute;
    background-color: #ffffff;
    border: 1px solid #cccccc;
    padding: 10px;
    z-index: 1100;
    max-width: 200px;
    font-size: 11px;
    color: #333333;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}
.read-by-icon {
    position: absolute;
    top: 5px;
    right: 5px;
    cursor: pointer;
    color: #000000;
    font-size: 14px;
}
.read-by-icon:hover {
    color: #333333;
}

/* Configurações de Grupo - Estilos para o painel de configurações de grupo */
.group-settings {
    min-height: calc(var(--chat-height) - 48px - 54px);
    max-height: calc(var(--chat-height) - 48px - 54px);
    overflow-y: auto;
    padding: 10px;
}
.group-settings .list-group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
}
.group-settings .list-group-item .remove-member-btn,
.group-settings .list-group-item .delete-group-btn {
    color: #D32F2F;
    cursor: pointer;
}
.group-settings .list-group-item .change-group-image-btn {
    color: #007bff;
    cursor: pointer;
}
.group-settings .list-group-item .remove-member-btn:hover,
.group-settings .list-group-item .delete-group-btn:hover {
    color: #B71C1C;
}
.group-settings .list-group-item .change-group-image-btn:hover {
    color: #0056b3;
}
.group-settings .list-group-item .member-image {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
}
.group-settings .list-group-item .admin-icon {
    font-size: 0.9rem;
    color: #007bff;
    margin-left: 8px;
}
.group-settings .list-group-item .icon-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Modal de Chat - Estilos para o modal de chat */
#chatModal .modal-header {
	align-items: center;
}

#chatModal .modal-dialog {
    max-width: 600px;
    width: 600px;
    margin-top: 30px;
}
#chatModal .contact-list {
    min-height: calc(var(--modal-height) - 48px);
    max-height: calc(var(--modal-height) - 48px);
    overflow-y: auto;
}
#chatModal .chat-messages {
    min-height: calc(var(--modal-height) - 48px - 54px);
    max-height: calc(var(--modal-height) - 48px - 54px);
}
#chatModal .group-create-container:not([style*="display: none"]) ~ .chat-container .contact-list {
    min-height: calc(var(--modal-height) - 48px - 48px);
    max-height: calc(var(--modal-height) - 48px - 48px);
}
#chatModal .message-search-container:not([style*="display: none"]) ~ .chat-messages {
    min-height: calc(var(--modal-height) - 48px - 48px - 54px);
    max-height: calc(var(--modal-height) - 48px - 48px - 54px);
}
#chatModal .image-profile-chat {
    width: 31px;
    height: 31px;
}
#chatModal .group-settings {
    min-height: calc(var(--modal-height) - 48px - 54px);
    max-height: calc(var(--modal-height) - 48px - 54px);
}
#chatModal #images-content.image-grid {
    display: grid;
    grid-template-columns: repeat(4, 138px);
    gap: 2px;
    padding: 5px;
    max-width: 578px;
    box-sizing: border-box;
}

#chatModal #images-content .image-container {
    width: 138px;
    height: 138px;
}

#chatModal .message-image {
    max-width: 200px !important;
    max-height: 150px !important;
}

/*Modal imagens*/
#imageModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1055;
}

#imageModal .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

#imageModal .modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 70%;
    max-height: 90%;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    z-index: 1060;
}

#imageModal .modal-header {
    padding: 10px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#imageModal .modal-title {
    margin: 0;
}

#imageModal .modal-close {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
}

#imageModal .modal-body {
    padding: 0;
}

#imageModal .modal-image {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

#imageModal .nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 1.5em;
    z-index: 1061;
	height: 100px;
	outline: unset;
}

#imageModal .nav-button:hover {
	color: #e9ecef;
}

#imageModal .prev-button {
    left: 10%;
}

#imageModal .next-button {
    right: 10%;
}

@media (max-width: 768px) {
    #chatModal .modal-dialog {
        max-width: 90vw;
        width: 90vw;
    }
}