/* Estilos para o Sistema de Reembolso de Viagens */

/* Estilos gerais */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: #007bff;
    color: white;
    padding: 15px 0;
    position: relative;
}

h1 {
    margin: 0;
    padding: 0 20px;
    font-size: 24px;
}

nav {
    margin-top: 10px;
    padding: 0 20px;
}

nav a {
    color: white;
    text-decoration: none;
    margin-right: 15px;
    padding: 5px 10px;
    border-radius: 3px;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

nav a.active {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Estilos para o botão de configurações */
.header-actions {
    position: absolute;
    top: 20px;
    right: 20px;
}

.btn-config {
    display: flex;
    align-items: center;
    background-color: #343a40;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-config:hover {
    background-color: #23272b;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.config-icon {
    margin-right: 8px;
    font-size: 1.2em;
}

/* Estilos para o formulário */
.card {
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-header {
    background-color: #f1f1f1;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    border-radius: 5px 5px 0 0;
}

.card-header h2 {
    margin: 0;
    font-size: 20px;
    color: #555;
}

.card-body {
    padding: 20px;
}

.form-row {
    display: flex;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1 0 200px;
    margin-right: 15px;
    margin-bottom: 15px;
}

.form-group:last-child {
    margin-right: 0;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group .input-with-button {
    display: flex;
}

.form-group .input-with-button input, 
.form-group .input-with-button select {
    flex: 1;
    border-radius: 4px 0 0 4px;
}

.form-group .input-with-button button {
    width: 40px;
    height: 36px;
    border: 1px solid #ddd;
    border-left: none;
    background-color: #f1f1f1;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-group .input-with-button button:hover {
    background-color: #e1e1e1;
}

.form-actions {
    text-align: right;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.btn {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-left: 10px;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0069d9;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Estilos para sugestões */
.suggestions-container {
    position: relative;
}

.suggestions {
    display: none;
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.suggestion-item {
    padding: 8px 10px;
    cursor: pointer;
}

.suggestion-item:hover {
    background-color: #f1f1f1;
}

/* Estilos para modais */
.modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 5px;
    width: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    text-align: right;
}

.close {
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #999;
}

/* Estilos para tabelas nos modais */
.table-list {
    width: 100%;
    margin-top: 15px;
    border-collapse: collapse;
}

.table-list th, .table-list td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table-list th {
    background-color: #f1f1f1;
    font-weight: bold;
}

.table-list tr:hover {
    background-color: #f9f9f9;
}

.table-list button {
    padding: 3px 8px;
    margin-right: 5px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.table-list .btn-editar-unidade,
.table-list .btn-editar-pessoa,
.table-list .btn-editar-responsavel {
    background-color: #ffc107;
    color: #333;
}

.table-list .btn-excluir-unidade,
.table-list .btn-excluir-pessoa,
.table-list .btn-excluir-responsavel {
    background-color: #dc3545;
    color: white;
}

/* Estilos para mensagens */
.message {
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Estilos para formulário de edição inline */
.form-edit-unidade,
.form-edit-pessoa,
.form-edit-responsavel {
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    margin: 5px 0;
}

.form-edit-unidade .form-actions,
.form-edit-pessoa .form-actions,
.form-edit-responsavel .form-actions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    text-align: right;
}
.table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    background-color: transparent;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
    text-align: left;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
}

.table tbody + tbody {
    border-top: 2px solid #dee2e6;
}

/* Melhorar responsividade */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

/* Tamanhos específicos para colunas da tabela de reembolsos */
#reembolsosTableBody td:nth-child(1) { /* Nº Reembolso */
    width: 10%;
    min-width: 80px;
}

#reembolsosTableBody td:nth-child(2) { /* Data */
    width: 10%;
    min-width: 90px;
}

#reembolsosTableBody td:nth-child(3) { /* Unidade */
    width: 20%;
}

#reembolsosTableBody td:nth-child(4) { /* Nome */
    width: 30%;
}

#reembolsosTableBody td:nth-child(5) { /* Valor */
    width: 12%;
    min-width: 100px;
}

#reembolsosTableBody td:nth-child(6) { /* Ações */
    width: 18%;
    min-width: 210px;
}

/* Melhorar botões de ação na tabela */
.btn-visualizar,
.btn-editar,
.btn-excluir {
    padding: 6px 10px;
    margin: 2px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
}

.btn-visualizar {
    background-color: #007bff;
    color: white;
}

.btn-visualizar:hover {
    background-color: #0069d9;
}

.btn-editar {
    background-color: #ffc107;
    color: #333;
}

.btn-editar:hover {
    background-color: #e0a800;
}

.btn-excluir {
    background-color: #dc3545;
    color: white;
}

.btn-excluir:hover {
    background-color: #c82333;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .form-group {
        flex: 0 0 100%;
        margin-right: 0;
    }
    
    .modal-content {
        width: 90%;
    }
    .modal-lg {
    width: 80%;
    max-width: 900px;
}
.detalhe-header {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #007bff;
}

.detalhe-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #007bff;
}

.detalhe-body {
    background-color: #fff;
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.detalhe-section {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.detalhe-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #333;
}

.detalhe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.detalhe-item {
    margin-bottom: 10px;
}

.detalhe-item.full-width {
    grid-column: 1 / -1;
}

.detalhe-label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    color: #555;
}

.detalhe-valor {
    padding: 8px 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #eee;
    min-height: 20px;
}

.detalhe-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
/* Estilos para a página de listagem de reembolsos */

/* Estilos para o card de filtros */
.filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
}

.filtros .form-group {
    flex: 1 0 200px;
}

/* Estilos para o cabeçalho do card com opções de tabela */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.card-header h2 {
    margin: 0;
    padding: 0;
}

/* Estilos para o seletor de itens por página */
.table-options {
    display: flex;
    align-items: center;
}

.items-per-page {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.items-per-page label {
    margin-right: 10px;
    margin-bottom: 0;
    white-space: nowrap;
    font-weight: normal;
}

.items-per-page select {
    width: auto;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Estilos para a tabela responsiva */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table th, 
.table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.table tr:hover {
    background-color: #f5f5f5;
}

.text-center {
    text-align: center;
}

/* Estilos para os botões de ação na tabela */
.acoes {
    white-space: nowrap;
    text-align: center;
}

.btn-action {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin: 0 2px;
    font-size: 18px;
    line-height: 1;
    transition: transform 0.2s;
}

.btn-action:hover {
    transform: scale(1.2);
}

/* Estilos para a paginação */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
}

#paginaAtual {
    margin: 0 15px;
    font-weight: bold;
}

/* Estilos para os detalhes do reembolso no modal */
.detalhe-reembolso {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.detalhe-reembolso p {
    margin: 0 0 10px 0;
}

/* Ajuste para responsividade */
@media (max-width: 768px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .table-options {
        margin-top: 10px;
        width: 100%;
    }
    
    .items-per-page {
        width: 100%;
        justify-content: flex-start;
    }
    
    .filtros {
        flex-direction: column;
    }
    
    .filtros .form-group {
        width: 100%;
    }
    
    .form-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .form-actions button {
        margin: 5px 0;
    }
    
    .detalhe-reembolso {
        grid-template-columns: 1fr;
    }
}
/* Estilos para o cabeçalho do card com opções de tabela */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.card-header h2 {
    margin: 0;
    padding: 0;
}

/* Estilos para o seletor de itens por página */
.table-options {
    display: flex;
    align-items: center;
}

.items-per-page {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.items-per-page label {
    margin-right: 10px;
    margin-bottom: 0;
    white-space: nowrap;
    font-weight: normal;
}

.items-per-page select {
    width: auto;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Estilos para a tabela responsiva */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

/* Estilos para a paginação */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
}

#paginaAtual {
    margin: 0 15px;
    font-weight: bold;
}

.pagination-controls button {
    min-width: 80px;
}

.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Ajuste para responsividade */
@media (max-width: 768px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .table-options {
        margin-top: 10px;
        width: 100%;
    }
    
    .items-per-page {
        width: 100%;
        justify-content: flex-start;
    }
    
    .filtros {
        flex-direction: column;
    }
    
    .filtros .form-group {
        width: 100%;
    }
}
/* Estilos para o cabeçalho do card com opções de tabela */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.card-header h2 {
    margin: 0;
    padding: 0;
}

/* Estilos para o seletor de itens por página */
.table-options {
    display: flex;
    align-items: center;
}

.items-per-page {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.items-per-page label {
    margin-right: 10px;
    margin-bottom: 0;
    white-space: nowrap;
    font-weight: normal;
}

.items-per-page select {
    width: auto;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Estilos para a tabela responsiva */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table th, 
.table td {
    padding: 6px 8px; /* Reduzir o padding para linhas mais compactas */
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-size: 0.9em; /* Reduzir um pouco o tamanho da fonte */
}

.table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.table tr:hover {
    background-color: #f5f5f5;
}

/* Estilos específicos para a coluna de ações */
.acoes {
    white-space: nowrap;
    text-align: center;
    width: 1%; /* Mínimo espaço possível */
    padding: 2px 4px; /* Padding reduzido para ações */
}

/* Estilo para o grupo de botões inline */
.btn-group {
    display: flex;
    justify-content: center;
    gap: 2px; /* Espaçamento mínimo entre botões */
}

/* Estilos para os botões de ação */
.btn-action {
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px;
    margin: 0;
    font-size: 14px; /* Tamanho menor dos ícones */
    line-height: 1;
    transition: transform 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-action:hover {
    transform: scale(1.2);
}

.btn-visualizar {
    color: #007bff; /* Azul */
}

.btn-editar {
    color: #28a745; /* Verde */
}

.btn-excluir {
    color: #dc3545; /* Vermelho */
}

/* Estilos para a paginação */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
}

#paginaAtual {
    margin: 0 15px;
    font-weight: bold;
}

.pagination-controls button {
    min-width: 80px;
}

.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Ajuste para responsividade */
@media (max-width: 768px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .table-options {
        margin-top: 10px;
        width: 100%;
    }
    
    .items-per-page {
        width: 100%;
        justify-content: flex-start;
    }
    
    .table th, 
    .table td {
        padding: 4px 6px; /* Ainda mais compacto em telas pequenas */
    }
    
    .btn-action {
        font-size: 16px; /* Botões um pouco maiores em dispositivos móveis para facilitar o toque */
        padding: 4px;
    }
}
/* Adicionar classe narrow ao container para tornar o layout mais estreito */
.container.narrow {
    max-width: 950px;
    margin: 0 auto;
}

/* Estilos para o cabeçalho do card com opções de tabela */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px 15px; /* Padding reduzido */
}

.card-header h2 {
    margin: 0;
    padding: 0;
    font-size: 16px; /* Título menor */
}

/* Estilos para o seletor de itens por página */
.table-options {
    display: flex;
    align-items: center;
}

.item-pagination {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

/* Label pequeno para o seletor de itens */
.mini-label {
    margin-right: 5px;
    margin-bottom: 0;
    white-space: nowrap;
    font-weight: normal;
    font-size: 12px;
    color: #666;
}

/* Seletor de itens por página compacto */
.compact-select {
    width: auto;
    padding: 2px 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 12px;
    background-color: #f8f9fa;
}

/* Estilos para a tabela responsiva */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    font-size: 0.85em; /* Fonte reduzida para toda a tabela */
}

.table th, 
.table td {
    padding: 4px 6px; /* Padding reduzido para linhas mais compactas */
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table th {
    background-color: #f8f9fa;
    font-weight: bold;
    font-size: 0.9em;
}

.table tr:hover {
    background-color: #f5f5f5;
}

/* Estilos específicos para a coluna de ações */
.acoes {
    white-space: nowrap;
    text-align: center;
    width: 1%; /* Mínimo espaço possível */
    padding: 1px 3px; /* Padding ainda mais reduzido para ações */
}

/* Estilo para o grupo de botões inline */
.btn-group {
    display: flex;
    justify-content: center;
    gap: 1px; /* Espaçamento mínimo entre botões */
}

/* Estilos para os botões de ação */
.btn-action {
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px;
    margin: 0;
    font-size: 14px; /* Tamanho dos ícones */
    line-height: 1;
    transition: transform 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-action:hover {
    transform: scale(1.2);
}

.btn-visualizar {
    color: #17a2b8; /* Azul claro */
}

.btn-imprimir {
    color: #6c757d; /* Cinza */
}

.btn-editar {
    color: #28a745; /* Verde */
}

.btn-excluir {
    color: #dc3545; /* Vermelho */
}

/* Botões menores */
.btn-sm {
    padding: 3px 8px;
    font-size: 12px;
}

/* Estilos para a paginação */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    gap: 8px;
    font-size: 12px;
}

#paginaAtual {
    margin: 0 10px;
    font-weight: bold;
    font-size: 12px;
}

.pagination-controls button {
    min-width: 70px;
    font-size: 12px;
}

.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Ajuste compacto para os filtros */
.filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filtros .form-group {
    flex: 1 0 180px; /* Tamanho mínimo reduzido */
}

.filtros label {
    font-size: 0.85em;
    margin-bottom: 3px;
}

.filtros input,
.filtros select {
    padding: 5px;
    font-size: 0.9em;
}

.form-actions {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

.form-actions button {
    padding: 5px 10px;
    font-size: 0.85em;
}

/* Ajuste para responsividade */
@media (max-width: 768px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .table-options {
        margin-top: 8px;
        width: 100%;
    }
    
    .item-pagination {
        width: 100%;
        justify-content: flex-start;
    }
}