/* Arquivo: public/css/usuarios.css (PADRÃO HYFRIEND) */

/* ==========================================================================
   1. POPUP E FORMULÁRIO
   ========================================================================== */
   #popupNovoUsuario .popup-content {
    background-color: var(--cor-fundo-container);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    width: 95%;
    max-width: 650px;
}

#popupNovoUsuario .popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--cor-borda);
}

#popupNovoUsuario .popup-header h2 {
    margin: 0;
    color: var(--cor-principal);
    font-size: 1.25rem;
}

.form-row {
    display: flex;
    gap: 15px;
    width: 100%;
}

.form-group {
    margin-bottom: 15px;
    width: 100%;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--cor-texto-principal);
}

input, select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--cor-borda);
    border-radius: 4px;
    font-size: 0.9rem;
    outline: none;
}

input:focus, select:focus {
    border-color: var(--cor-destaque);
}

input[readonly] {
    background-color: #f5f5f5;
    color: #666;
    cursor: not-allowed;
}

/* ==========================================================================
   2. BOTÕES (PADRÃO VERDE/VERMELHO)
   ========================================================================== */
.form-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.form-buttons button {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    font-weight: 500;
    color: white;
    transition: opacity 0.2s;
}

#btn-cancelar-usuario {
    background-color: var(--cor-erro);
}
#btn-cancelar-usuario:hover {
    background-color: var(--cor-erro-hover);
}

#btn-confirmar-usuario {
    background-color: var(--cor-sucesso);
}
#btn-confirmar-usuario:hover {
    opacity: 0.9;
}

/* ==========================================================================
   3. TABELA (AZUL #1a237e)
   ========================================================================== */
#tabela-usuarios-principal {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

#tabela-usuarios-principal thead tr {
    background-color: #1a237e !important;
    color: white;
}

#tabela-usuarios-principal th {
    padding: 12px 15px;
    text-align: left;
    cursor: pointer;
}

#tabela-usuarios-principal th:hover {
    background-color: #283593 !important;
}

/* Ordenação Ativa */
#tabela-usuarios-principal th.sort-asc,
#tabela-usuarios-principal th.sort-desc {
    background-color: #0d47a1 !important;
    border-bottom: 3px solid #64b5f6;
}

#tabela-usuarios-principal th i {
    font-size: 14px;
    margin-left: 6px;
    color: rgba(255,255,255,0.7);
}
#tabela-usuarios-principal th.sort-asc i,
#tabela-usuarios-principal th.sort-desc i {
    color: white; opacity: 1;
}

#tabela-usuarios-principal td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.status-ativo { background-color: #e8f5e9; color: #2e7d32; padding: 4px 12px; border-radius: 20px; font-size: 0.85em; font-weight: 600; }
.status-inativo { background-color: #ffebee; color: #c62828; padding: 4px 12px; border-radius: 20px; font-size: 0.85em; font-weight: 600; }

/* Botões de Ação na Tabela */
.btn-acao {
    width: 30px; height: 30px; border: none; border-radius: 4px; color: white; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.btn-editar { background-color: var(--cor-destaque); }
.btn-excluir { background-color: var(--cor-erro); } /* Desativar */
.btn-reativar { background-color: #2ecc71; }

#usuarios-search-container { display: flex; gap: 15px; align-items: flex-end; margin-bottom: 20px; padding: 20px; background-color: white; border-radius: 8px; }
#usuarios-search-container .search-group { flex: 1; }
#usuarios .table-footer { display: flex; justify-content: space-between; padding: 15px 0; }