:root {
    --primary-color: #007bff;
    --primary-color-rgb: 0, 123, 255;
    --text-color: #ffffff;
    --text-secondary: #dfdfdf;
    --text-tertiary: #242424;
    --card-bg: #0b6ce821;
    --input-bg: #2a2a2a;
    --border-color: #dfdfdf;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --success-color-rgb: 40, 167, 69;
    --warning-color-rgb: 255, 193, 7;
    --danger-color-rgb: 220, 53, 69;
    --primary-dark-blue: #192A56;
    --primary-medium-blue: #2980B9;
    --primary-light-blue-green: #95E4D3;
    --secondary-white: #FFFFFF;
    --secondary-light-gray: #F0F0F0;
    --secondary-medium-gray: #A9A9A9;
    --text-dark: #333;
}

/* Container principal */
.usuarios-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.usuarios-header {
    text-align: center;
    margin-bottom: 2rem;
}

.usuarios-header h1 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.usuarios-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Menu de navegação */
.menu-usuarios {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.menu-usuarios ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.menu-usuarios a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.menu-usuarios a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.menu-usuarios a.active {
    background: var(--primary-color);
    color: white;
}

.menu-usuarios i {
    font-size: 1.1rem;
}

/* Seções */
.secao-usuarios {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease;
}

.secao-usuarios[hidden] {
    display: none;
}

/* Ações do topo */
.acoes-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.acoes-topo h2 {
    font-size: 1.8rem;
    color: var(--text-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Filtros */
.filtros-usuarios,
.filtros-logs,
.filtros-convites {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

/* Estilização dos selects */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: rgba(255, 255, 255, 0.05) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
    background-size: 16px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1rem;
    height: 45px;
    line-height: 1.5;
    padding: 0.5rem 2.25rem 0.5rem 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.2);
    outline: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

select:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

select option {
    background-color: #1a1f24;
    color: var(--text-color);
    padding: 12px;
}

/* Ajuste específico para os filtros */
.filtros-usuarios select,
.filtros-logs select {
    max-width: none;
    margin-right: 0;
}

/* Tabelas */
.tabela-usuarios table,
.tabela-logs table,
.tabela-convites table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
}

table th,
table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

table th {
    /* color: var(--text-secondary); */
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
}

table td {
    color: var(--text-color);
}

table tbody tr {
    transition: background-color 0.3s ease;
}

table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Grupos e Permissões */
.lista-grupos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.grupo-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grupo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.grupo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.grupo-header h3 {
    color: var(--text-color);
    margin: 0;
    font-size: 1.3rem;
}

.grupo-permissoes {
    margin: 1.5rem 0;
}

.grupo-permissoes h4 {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.grupo-permissoes ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.grupo-permissoes li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.grupo-permissoes i.fa-check {
    color: var(--success-color);
}

.grupo-permissoes i.fa-times {
    color: var(--danger-color);
}

.grupo-acoes {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: var(--primary-color-dark);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline-danger {
    background: transparent;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.btn-outline-danger:hover {
    background: var(--danger-color);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Badges */
.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge.bg-primary {
    background: var(--primary-color) !important;
    color: white;
}

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

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

/* Responsividade */
@media (max-width: 768px) {
    .usuarios-container {
        margin: 1rem;
        padding: 1rem;
    }

    .menu-usuarios ul {
        flex-direction: column;
    }

    .menu-usuarios a {
        justify-content: center;
    }

    .acoes-topo {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .filtros-usuarios,
    .filtros-logs,
    .filtros-convites {
        grid-template-columns: 1fr;
    }

    .tabela-usuarios,
    .tabela-logs,
    .tabela-convites {
        overflow-x: auto;
    }

    .grupo-card {
        margin-bottom: 1rem;
    }
}

/* Tooltips */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

[data-tooltip]:hover:before {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 5px);
}

/* Estilos para modais */
.modal {
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
}

.modal-title {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
}

/* Estilos para formulários no modal */
.modal-body label {
    color: rgba(255, 255, 255, 0.9);
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.modal-body .form-control {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.modal-body .form-control:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.2);
    outline: none;
    color: var(--text-color);
}

.modal-body .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Estilos para selects no modal */
.modal-body select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

.modal-body select.form-control option {
    background-color: #2a2a2a;
    color: #ffffff;
    padding: 0.5rem;
}

/* Estilos para botões no modal */
.modal .btn-primary {
    background-color: var(--primary-color);
    border: none;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.modal .btn-primary:hover {
    background-color: var(--primary-color-dark);
}

.modal .btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.modal .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Estilos para grupos de formulário */
.modal-body .form-group {
    margin-bottom: 1.5rem;
}

.modal-body .form-group:last-child {
    margin-bottom: 0;
}

/* Estilos para mensagens de erro */
.modal-body .invalid-feedback {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Estilos para o botão de fechar */
.modal .btn-close {
    background: transparent url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E") center/1em auto no-repeat;
    opacity: 0.7;
}

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

/* Animação do modal */
.modal.fade .modal-dialog {
    transform: scale(0.95);
    transition: transform 0.3s ease-in-out;
}

.modal.show .modal-dialog {
    transform: none;
}

/* Estilo para o contador de resultados */
.results-count {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #fff;
    font-style: italic;
}

/* Estilo para os filtros */
.filtros-usuarios {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filtros-usuarios .form-group {
    flex: 1;
    min-width: 200px;
}

.filtros-usuarios label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.filtros-usuarios input,
.filtros-usuarios select {
    width: 100%;
    padding: 8px 12px;
    /* border: 1px solid #ddd; */
    border-radius: 4px;
    font-size: 0.9rem;
    color: #fff;
}

.filtros-usuarios input:focus,
.filtros-usuarios select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}