/* Variáveis CSS atualizadas */
:root {
    /* Cores principais */
    --primary-color: #036e7e;
    --secondary-color: #000000;
    --accent-color: #25d366;
    --text-color: #333333;
    --light-text-color: #ffffff;
    --border-color: #e0e0e0;
    --card-bg: #ffffff;
    --body-bg: #f5f7fa;
    --hover-bg: #f0f0f0;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-strong: rgba(0, 0, 0, 0.25);
    --new-message-color: #dc3545;

    /* Cores de status/badges */
    --status-online: #28a745;
    --status-offline: #dc3545;
    --status-admin: #6f42c1;
    --status-system: #fd7e14;

    /* Cores do painel de gerenciamento de usuários (mantidas) */
    --card-gradient: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    --title-bg: linear-gradient(135deg, #ffffff, #f7fafc);
    --button-bg: #0e7490;
    --badge-bg: #718096;
    --modal-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    --delete-color: #e53e3e;
    --logout-color: #d69e2e;
    --unblock-color: #38a169;
    --2fa-color: #ed8936;
    --change-password-color: #3182ce;

    /* Sombras e transições */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Gradientes */
    --gradient-main: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    --gradient-pulse: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    --gradient-body-background: linear-gradient(135deg, #e0f2f7, #c1e0ed);
    --gradient-button-gray: linear-gradient(90deg, #6c757d, #5a6268);
    --gradient-accent: linear-gradient(90deg, #25d366, #1eaf53);
    --gradient-danger: linear-gradient(90deg, #dc3545, #c82333);
    --gradient-size: 200%;
    --animation-speed: 20s;

    /* Variáveis para o menu sidebarlayout */
    --sidebarlayout-bg: linear-gradient(180deg, #1a202c 0%, #2d3748 100%);
    --sidebarlayout-bg-hover: #4a5568;
    --sidebarlayout-text: #e2e8f0;
    --sidebarlayout-active-bg: rgba(37, 211, 102, 0.2);
    --sidebarlayout-active-bar: #25d366;
    --sidebarlayout-glow: rgba(37, 211, 102, 0.3);
}


/* Animação para o gradiente de fundo */
@keyframes animateGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Estilização da sidebarlayout */
.sidebarlayout {
    width: 80px;
    background: var(--sidebarlayout-bg);
    background-size: var(--gradient-size);
    animation: animateGradient 15s ease infinite;
    color: var(--sidebarlayout-text);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebarlayout:hover {
    width: 250px;
    box-shadow: 4px 0 20px var(--sidebarlayout-glow);
}

.sidebarlayout-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 70px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.sidebarlayout-logo {
    height: 40px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.sidebarlayout-logo-icon {
    display: block;
    opacity: 1;
    height: 35px;
}

.sidebarlayout-logo-full {
    display: none;
    opacity: 0;
    height: 45px;
}

.sidebarlayout:hover .sidebarlayout-logo-icon {
    opacity: 0;
    transform: scale(0.8);
    display: none;
}

.sidebarlayout:hover .sidebarlayout-logo-full {
    opacity: 1;
    transform: scale(1);
    display: block;
}

/* Regra principal para rolagem do menu */
.sidebarlayout-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    /* Ocupa o espaço restante */
    padding: 10px 0;
    overflow-y: auto;
    /* A chave! Habilita a rolagem vertical */
    overflow-x: hidden;
    /* MODIFICADO: Habilita flex para empurrar o link de Ajuda para baixo */
    display: flex;
    flex-direction: column;
}

.nav-item {
    position: relative;
    margin: 5px 10px;
}

/* NOVO: Estilo específico para o item de Ajuda, empurra para o final da área de rolagem */
.nav-item.help-item {
    margin-top: auto;
    /* Empurra para o final da área de navegação */
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* FIM NOVO ESTILO DE AJUDA */

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--sidebarlayout-text);
    text-decoration: none;
    font-size: 16px;
    border-radius: 8px;
    transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link i {
    font-size: 20px;
    width: 30px;
    text-align: center;
    transition: transform 0.3s ease, color 0.3s ease;
}

.nav-link:hover i {
    transform: scale(1.2);
    color: var(--accent-color);
}

.nav-text {
    margin-left: 15px;
    opacity: 0;
    width: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s ease;
    white-space: nowrap;
    font-weight: 500;
    overflow: hidden;
}

.sidebarlayout:hover .nav-text {
    opacity: 1;
    width: 100%;
}

.nav-link:hover {
    background: var(--sidebarlayout-bg-hover);
    color: var(--light-text-color);
    transform: translateX(5px);
    box-shadow: 0 0 10px var(--sidebarlayout-glow);
}

.nav-link.active {
    background: var(--sidebarlayout-active-bg);
    color: var(--sidebarlayout-active-bar);
}

.nav-link.active i {
    color: var(--sidebarlayout-active-bar);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 80%;
    background: linear-gradient(180deg, var(--sidebarlayout-active-bar), #1eaf53);
    border-radius: 0 4px 4px 0;
}

/* Estilos do Submenu (Collapse) */
.submenu-links {
    padding-left: 0;
    margin-top: 5px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    /* Garante que os links desapareçam suavemente */
}

.submenu-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.submenu-link {
    padding-left: 30px !important;
    /* Indentação para links do submenu */
    font-size: 15px !important;
}

.submenu-link i {
    font-size: 18px;
}

.nav-item .submenu-icon {
    position: absolute;
    right: 15px;
    transition: transform 0.3s ease;
}

.nav-item .nav-link[aria-expanded="true"] .submenu-icon {
    transform: rotate(180deg);
}

.sidebarlayout:hover .submenu-link .nav-text {
    opacity: 1;
    width: 100%;
    margin-left: 10px;
}

/* Área de informações do usuário (Rodapé Fixo) */
.sidebarlayout-user-info {
    padding: 15px 10px;
    margin: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--sidebarlayout-text);
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
    transition: opacity 0.3s ease;
    opacity: 0;
    height: 0;
    overflow: hidden;
    position: relative;
    padding-bottom: 25px;
    flex-shrink: 0;
}

.sidebarlayout:hover .sidebarlayout-user-info {
    opacity: 1;
    height: auto;
    overflow: visible;
}

.user-avatar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-avatar i {
    font-size: 32px;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

.user-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--sidebarlayout-bg);
}

.user-status.attendant {
    background-color: var(--status-online);
}

.user-status.admin {
    background-color: var(--status-admin);
}

.user-status.system {
    background-color: var(--status-system);
}

.user-status.manager {
    background-color: var(--change-password-color);
}


.sidebarlayout:hover .user-avatar i {
    transform: scale(1.1);
}

/* Detalhes do usuário */
.user-details {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
    flex-grow: 1;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--light-text-color);
    cursor: default;
    text-decoration: none;
}

.user-role {
    font-size: 12px;
    color: var(--sidebarlayout-text);
    opacity: 0.8;
    text-transform: capitalize;
}

/* Estilo para o Setor */
.user-sector {
    font-size: 12px;
    color: var(--sidebarlayout-active-bar);
    font-weight: 500;
    margin-top: 2px;
    white-space: nowrap;
}

/* Botão/Link Alterar Senha */
.change-password-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 10px;
    color: var(--light-text-color);
    text-decoration: none;
    background: var(--change-password-color);
    border-radius: 6px;
    transition: all 0.3s ease;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;

    /* Esconder por padrão */
    opacity: 0;
    height: 0;
    overflow: hidden;
    position: absolute;
    bottom: -35px;
    left: 10px;
    width: calc(100% - 20px);
    box-sizing: border-box;
    cursor: pointer;
    z-index: 5;
}

.change-password-link:hover {
    background: #2b6cb0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(49, 130, 206, 0.3);
}

/* Regra para mostrar o link "Alterar Senha" no hover do menu */
.sidebarlayout:hover .change-password-link {
    opacity: 1;
    height: auto;
    overflow: visible;
    bottom: 5px;
}

/* Link de Logout */
.logout-link {
    color: var(--sidebarlayout-text);
    font-size: 18px;
    transition: color 0.3s ease, transform 0.3s ease;
    padding: 5px;
    border-radius: 4px;
    z-index: 10;
    flex-shrink: 0;
}

.logout-link:hover {
    color: var(--btn-danger-hover);
    transform: scale(1.2);
    background: rgba(220, 53, 69, 0.1);
}

/* Ajuste do conteúdo principal */
.main-wrapper {
    margin-left: 80px;
    padding: 20px;
    width: calc(100% - 80px);
    min-height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebarlayout:hover~.main-wrapper {
    margin-left: 250px;
    width: calc(100% - 250px);
}

.container-fluid {
    max-width: 1200px;
    width: 100%;
    padding: 0 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 70px);
    overflow-y: auto;
    margin-left: auto;
    margin-right: auto;
}

/* Estilos de página cheia para login */
body.full-screen-layout .main-wrapper {
    margin-left: 0;
    width: 100%;
    padding-top: 0;
    height: 100vh;
    justify-content: center;
    background: var(--gradient-body-background);
    background-size: var(--gradient-size);
    animation: animateGradient var(--animation-speed) ease infinite;
    overflow: hidden;
}

/* Botão Hamburger para Mobile */
.sidebarlayout-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1100;
    background: var(--gradient-accent);
    border: none;
    border-radius: 8px;
    padding: 10px;
    color: var(--light-text-color);
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebarlayout-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px var(--sidebarlayout-glow);
}

/* Responsividade do Menu */
@media (max-width: 991px) {
    .sidebarlayout {
        width: 0;
        left: -250px;
        transition: left 0.3s ease;
    }

    .sidebarlayout.active {
        width: 250px;
        left: 0;
        box-shadow: 4px 0 20px var(--sidebarlayout-glow);
    }

    .main-wrapper {
        margin-left: 0;
        width: 100%;
    }

    .sidebarlayout.active~.main-wrapper {
        margin-left: 250px;
        width: calc(100% - 250px);
    }

    .sidebarlayout-toggle {
        display: block;
    }

    .sidebarlayout-header {
        justify-content: space-between;
    }

    .sidebarlayout-logo-icon {
        display: none;
    }

    .sidebarlayout-logo-full {
        display: block;
        opacity: 1;
    }

    .nav-text {
        opacity: 1;
        width: 100%;
    }

    .sidebarlayout-user-info {
        opacity: 1;
        height: auto;
        overflow: visible;
    }

    /* Força o botão de senha a aparecer no mobile/tablet */
    .change-password-link {
        opacity: 1;
        height: auto;
        overflow: visible;
        position: static;
        margin: 10px 0 10px 0;
        width: 100%;
        padding: 8px 10px;
        background: var(--change-password-color);
    }

    .logout-link {
        display: block;
    }
}

/* Modal e Toast Styles */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 12px 30px var(--shadow-strong);
    overflow: hidden;
    background-color: var(--card-bg);
}

.modal-header {
    background: var(--gradient-pulse);
    background-size: var(--gradient-size);
    animation: animateGradient 10s ease infinite;
    color: var(--light-text-color);
    border-bottom: none;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.6rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title i {
    font-size: 1.4rem;
}

.modal-header .btn-close {
    filter: invert(1);
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 25px;
    color: var(--text-color);
    font-size: 1rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 15px 25px;
    background-color: var(--body-bg);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Botões dentro de modais */
.btn-modal-submit,
.btn-modal-close {
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-modal-submit {
    background: var(--gradient-accent);
    background-size: var(--gradient-size);
    animation: animateGradient 10s ease infinite;
    color: var(--light-text-color);
    border: none;
}

.btn-modal-submit:hover {
    background: var(--gradient-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(37, 211, 102, 0.3);
}

.btn-modal-close {
    background: var(--gradient-button-gray);
    color: var(--light-text-color);
    border: none;
}

.btn-modal-close:hover {
    background: var(--btn-secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(108, 117, 125, 0.3);
}

/* Formulários dentro dos modais */
.form-label {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-control,
.form-select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 15px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: var(--card-bg);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(3, 110, 126, 0.35);
    outline: none;
}

/* Toast Container */
#toastContainer {
    position: fixed !important;
    top: 1rem !important;
    right: 1rem !important;
    left: auto !important;
    z-index: 9999 !important;
    width: auto !important;
    max-width: 350px;
}

.position-fixed.top-0.end-0.p-3 {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    padding: 1rem !important;
    z-index: 9999 !important;
}

/* Animações */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Estilos de Gerenciamento de Usuários (Mantidos) */

/* Título aprimorado */
.title-container {
    text-align: center;
    margin-bottom: 40px;
    padding: 35px 20px;
    background: var(--title-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.title-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--button-bg), var(--unblock-color));
    opacity: 0.8;
}

.title-container:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    position: relative;
}

h1 i {
    color: var(--button-bg);
    font-size: 36px;
}

/* Grid de usuários */
.user-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
    padding: 10px 0;
}

/* Cartão de usuário aprimorado */
.user-card {
    background: var(--card-gradient);
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    animation: fadeIn 0.6s ease-out forwards;
    animation-delay: calc(var(--index) * 0.1s);
    opacity: 0;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow: hidden;
}

.user-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--border-color);
    transition: var(--transition);
}

.user-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.user-card:hover::before {
    width: 6px;
}

/* Estados do cartão */
.user-card.online {
    border-left: 4px solid var(--unblock-color);
    box-shadow: 0 4px 6px rgba(56, 161, 105, 0.15);
}

.user-card.offline {
    border-left: 4px solid var(--badge-bg);
    box-shadow: 0 4px 6px rgba(113, 128, 150, 0.15);
}

.user-card:hover[data-role="attendant"]::before {
    background: var(--unblock-color);
}

.user-card:hover[data-role="admin"]::before {
    background: var(--button-bg);
}

.user-card:hover[data-role="system"]::before {
    background: var(--delete-color);
}

/* Informações do usuário */
.user-info_attendants {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.user-info_attendants h6 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
    word-break: break-word;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px dashed #e2e8f0;
}

.user-details p {
    font-size: 15px;
    color: #4a5568;
    margin-bottom: 0;
    word-break: break-word;
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-details strong {
    color: var(--text-color);
    min-width: 80px;
}

/* Indicador de status */
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-dot.online {
    background-color: var(--unblock-color);
    box-shadow: 0 0 0 0 rgba(56, 161, 105, 0.7);
    animation: pulse-green 2s infinite;
}

.status-dot.offline {
    background-color: var(--badge-bg);
}

/* Badge de função */
.role-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
}

.role-badge.attendant {
    background-color: var(--unblock-color);
}

.role-badge.admin {
    background-color: var(--button-bg);
}

.role-badge.system {
    background-color: var(--delete-color);
}

/* Ações do usuário */
.user-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px dashed #e2e8f0;
    flex-wrap: wrap;
    align-items: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(247, 250, 252, 0.7));
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: auto;
}

/* Botões de ação aprimorados */
.btn-action {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
    width: 40px;
    height: 40px;
    box-shadow: var(--shadow-sm);
}

.btn-action i {
    font-size: 16px;
}

/* Cores específicas para cada botão */
.btn-delete {
    color: var(--delete-color);
    border-color: rgba(229, 62, 62, 0.3);
}

.btn-delete:hover {
    background: var(--delete-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(229, 62, 62, 0.2);
}

.btn-change-password {
    color: var(--change-password-color);
    border-color: rgba(49, 130, 206, 0.3);
}

.btn-change-password:hover {
    background: var(--change-password-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(49, 130, 206, 0.2);
}

.btn-disable-2fa {
    color: var(--2fa-color);
    border-color: rgba(237, 137, 54, 0.3);
}

.btn-disable-2fa:hover {
    background: var(--2fa-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(237, 137, 54, 0.2);
}

.btn-force-logout {
    color: var(--logout-color);
    border-color: rgba(214, 158, 46, 0.3);
}

.btn-force-logout:hover {
    background: var(--logout-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(214, 158, 46, 0.2);
}

.btn-block-user {
    color: var(--delete-color);
    border-color: rgba(229, 62, 62, 0.3);
}

.btn-block-user:hover {
    background: var(--delete-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(229, 62, 62, 0.2);
}

.btn-unblock-user {
    color: var(--unblock-color);
    border-color: rgba(56, 161, 105, 0.3);
}

.btn-unblock-user:hover {
    background: var(--unblock-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(56, 161, 105, 0.2);
}

/* Estados desabilitados */
.btn-action:disabled {
    background: #edf2f7;
    color: #a0aec0;
    border-color: #e2e8f0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-action:disabled i {
    animation: spin 1s linear infinite;
}

/* Tooltips aprimorados */
.btn-action:hover::before {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #2d3748;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: var(--transition);
    z-index: 100;
    pointer-events: none;
    font-weight: 500;
}

.btn-action:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px);
}

/* Modal de criação de usuário */
.create-user-modal .modal-content {
    background: #ffffff;
    border-radius: var(--radius);
    border: none;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.4s ease-out forwards;
    overflow: hidden;
}

.create-user-modal .modal-header {
    border-bottom: 1px solid var(--border-color);
    background: #ffffff;
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
    padding: 20px 24px;
}

.create-user-modal .modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.create-user-modal .modal-body {
    padding: 24px;
}

/* Modal de confirmação ajustado */
#confirmationModal .modal-content {
    background: var(--modal-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    margin: 0 auto;
}

#confirmationModal .modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
}

#confirmationModal .modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#confirmationModal .modal-body {
    padding: 24px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 1rem;
    color: var(--text-color);
}

#confirmationModal .modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

#confirmationModal .btn-primary {
    background: var(--button-bg);
    border: none;
    padding: 10px 20px;
    font-weight: 600;
}

#confirmationModal .btn-primary:hover {
    background: #0c635c;
    transform: translateY(-2px);
}

#confirmationModal .btn-secondary {
    background: #edf2f7;
    color: var(--text-color);
    border: none;
    padding: 10px 20px;
    font-weight: 600;
}

#confirmationModal .btn-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.form-control-custom,
.form-select-custom {
    border: 1px solid var(--border-color);
    border-radius: 0 8px 8px 0;
    padding: 12px;
    font-size: 1rem;
    transition: var(--transition);
    height: 48px;
}

.form-control-custom:focus,
.form-select-custom:focus {
    border-color: var(--button-bg);
    box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.15);
    outline: none;
}

.input-group-text {
    background: #f7fafc;
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: var(--text-color);
    padding: 12px;
    height: 48px;
}

.form-label {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 8px;
}

.btn-submit {
    background: var(--button-bg);
    color: #fff;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    transition: var(--transition);
    width: 100%;
    max-width: 200px;
}

.btn-submit:hover {
    background: #0c635c;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(14, 116, 144, 0.2);
}

.btn-submit:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Botão Criar Usuário */
.btn-create-user {
    min-width: 300px;
    padding: 14px 24px;
    font-size: 1.125rem;
    font-weight: 600;
    background: var(--button-bg);
    color: #fff;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-create-user:hover {
    background: #0c635c;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: #fff;
}

/* Modal de sucesso */
.modal-content.success {
    border: 2px solid var(--unblock-color);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
}

.success-animation {
    margin: 0 auto 20px;
    width: 80px;
    height: 80px;
}

.checkmark {
    width: 64px;
    height: 64px;
}

/* Modal de erro */
.modal-content.error {
    border: 2px solid var(--delete-color);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
}

.error-animation {
    margin: 0 auto 20px;
    font-size: 56px;
    color: var(--delete-color);
}

.modal-body {
    padding: 32px;
    text-align: center;
}

/* Mensagem de lista vazia */
.no-users {
    font-size: 16px;
    color: #718096;
    text-align: center;
    padding: 40px 20px;
    grid-column: 1 / -1;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

/* Animações atualizadas */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(56, 161, 105, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(56, 161, 105, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(56, 161, 105, 0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .user-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .user-card {
        padding: 20px;
    }

    .user-actions {
        justify-content: center;
    }

    .btn-create-user {
        min-width: 100%;
    }

    #confirmationModal .modal-dialog {
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .title-container {
        padding: 24px 16px;
    }

    h1 {
        font-size: 26px;
    }

    .user-card {
        padding: 16px;
    }

    .user-info_attendants h6 {
        font-size: 18px;
    }

    .btn-action {
        width: 36px;
        height: 36px;
    }

    #confirmationModal .modal-title {
        font-size: 1.1rem;
    }

    #confirmationModal .modal-body {
        font-size: 0.9rem;
        padding: 16px;
    }
}


/* Correção para o Backdrop (camada escura) */
.offcanvas-backdrop {
    /* Torna o backdrop invisível */
    opacity: 0 !important;
    transition: opacity 0.15s linear;
    /* Mantém a transição rápida */
}

.offcanvas-backdrop.show {
    /* Garante que o backdrop cubra a tela, mesmo sendo invisível */
    opacity: 0 !important;
}

/* Garante que o Offcanvas está acima do backdrop (z-index padrão é 1040) */
.offcanvas {
    z-index: 1045;
}


.offcanvas-header .btn-close {
    filter: none;
    background-color: #000000;
    color: #ffffff;
}

/* /public/css/layout.css (Adicione este bloco) */

/* Estilo para destacar o item de menu do Chat Interno */
.sidebarlayout-nav .nav-link.unread-chat-notification {
    background-color: #ffc1071a;
    /* Cor de fundo leve (amarelo claro) */
    color: #ffc107 !important;
    /* Cor do texto e ícone (amarelo escuro/alerta) */
    font-weight: 700;
    border-left: 5px solid #ffc107;
    /* Borda lateral para destaque */
    animation: pulse-border 1.5s infinite alternate;
    /* Animação sutil */
}

/* Mantém o texto branco no hover ou foco (opcional, dependendo do seu tema) */
.sidebarlayout-nav .nav-link.unread-chat-notification:hover {
    color: #ffffff !important;
    background-color: #ffc10750;
}

/* Animação para dar um efeito de "pulso" (opcional) */
@keyframes pulse-border {
    0% {
        border-left-color: #ffc107;
    }

    100% {
        border-left-color: #dc3545;
        /* Muda para vermelho suave para chamar a atenção */
    }
}

/* Toast notifications */
.toast-container {
    z-index: 9999;
    top: 20px;
    right: 20px;
}

.toast {
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px var(--shadow-medium);
    border: none;
    overflow: hidden;
}

.toast-header {
    color: var(--light-text-color);
    border-bottom: none;
    padding: 12px 16px;
    font-weight: 600;
}

.toast-body {
    padding: 16px;
    font-size: 0.95rem;
}

.toast.success .toast-header {
    background: var(--gradient-accent);
}

.toast.success .toast-body {
    background-color: var(--success-bg);
    color: var(--success-text);
}

.toast.error .toast-header,
.toast.danger .toast-header {
    background: var(--gradient-danger);
}

.toast.error .toast-body,
.toast.danger .toast-body {
    background-color: var(--error-bg);
    color: var(--error-text);
}

.toast.warning .toast-header {
    background: linear-gradient(135deg, var(--warning-bg), var(--warning-border));
}

.toast.warning .toast-body {
    background-color: var(--warning-bg);
    color: var(--warning-text);
}

.toast.info .toast-header {
    background: linear-gradient(135deg, var(--info-bg), var(--info-border));
}

.toast.info .toast-body {
    background-color: var(--info-bg);
    color: var(--info-text);
}

/* Button close for toasts */
.toast .btn-close {
    filter: invert(1);
    /* Ensures visibility on dark backgrounds */
}