/* Variáveis globais */
:root {
    --table-header-bg: #d8dde2;
    --table-hover-bg: rgba(0, 0, 0, 0.02);
    --border-color: #dee2e6;
    --blue: #0d6efd;
    --green: #198754;
    --cyan: #0dcaf0;
    --yellow: #ffc107;
    --primary-color: #dc3545;
    --primary-hover: #bb2d3b;
    --text-color: #333;
    --text-muted: #6c757d;
    --bg-hover: #f8f9fa;
    --tab-active-color: var(--primary-color);
    --tab-hover-color: rgba(220, 53, 69, 0.1);
    
    /* Variáveis para os botões */
    --bs-success: #198754;
    --bs-success-dark: #157347;
    --bs-secondary: #6c757d;
    --bs-secondary-dark: #565e64;
    
    /* Variáveis para status */
    --status-active: #28a745;
    --status-inactive: #dc3545;
}

/* Tabelas */
.table-container {
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.table {
    margin-bottom: 0;
}

.table thead {
    background-color: var(--table-header-bg) !important;
}

.table thead th {
    border-bottom: none;
    font-weight: 600;
    padding: 1rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: var(--table-hover-bg) !important;
    cursor: pointer;
}

.table-hover tbody tr {
    transition: all 0.3s ease;
}

/* Botões de ação */
.btn-group-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.btn-group-actions .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Botões padrão */
.btn-outline-primary {
    color: #0d6efd;
    border-color: #0d6efd;
    background-color: transparent;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Cabeçalho de listagem */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.list-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.list-actions {
    display: flex;
    gap: 0.5rem;
}

/* Barra de pesquisa e filtros */
.search-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.search-input-group {
    flex: 1;
    max-width: 500px;
}

.search-input-group .input-group-text {
    background-color: #f8f9fa;
    border-right: none;
}

.search-input-group .form-control {
    border-left: none;
}

.search-input-group .form-control:focus {
    box-shadow: none;
    border-color: #dee2e6;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.5em 0.8em;
}

.badge.bg-success {
    background-color: #198754 !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
}

/* Paginação */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.pagination {
    margin: 0;
}

.page-link {
    padding: 0.375rem 0.75rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .search-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input-group {
        max-width: 100%;
    }

    .list-actions {
        flex-wrap: wrap;
    }

    .btn-group-actions {
        justify-content: center;
    }
}

/* Cards do Dashboard */
.stats-card {
    position: relative;
    padding: 1.5rem;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    overflow: hidden;
    height: 100%;
}

.stats-card .title {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.stats-card .value {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.stats-card .link {
    color: inherit;
    text-decoration: none;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stats-card .icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    opacity: 0.2;
}

.stats-card.blue {
    background: linear-gradient(135deg, var(--blue) 0%, #0a58ca 100%);
    color: #fff;
}

.stats-card.green {
    background: linear-gradient(135deg, var(--green) 0%, #146c43 100%);
    color: #fff;
}

.stats-card.cyan {
    background: linear-gradient(135deg, var(--cyan) 0%, #0aa2c0 100%);
    color: #fff;
}

.stats-card.yellow {
    background: linear-gradient(135deg, var(--yellow) 0%, #cc9a06 100%);
    color: #fff;
}

/* Welcome Header */
.welcome-header {
    margin-bottom: 2rem;
}

.welcome-header h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.welcome-header h4 {
    font-size: 1.25rem;
    font-weight: 400;
}

/* Tabs */
.nav-tabs {
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1rem;
}

.nav-tabs .nav-link,
.nav-tabs .nav-link:focus,
.nav-tabs .nav-link:hover,
.nav-tabs .nav-link.active {
    color: var(--primary-color) !important;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.75rem 1.5rem;
    margin-bottom: -2px;
    transition: all 0.2s ease-in-out;
    font-weight: 500;
    background-color: transparent;
}

.nav-tabs .nav-link:hover {
    background-color: var(--tab-hover-color);
    border-bottom: 2px solid var(--primary-color);
}

.nav-tabs .nav-link.active {
    font-weight: 600;
    background-color: var(--tab-hover-color);
    border-bottom: 2px solid var(--primary-color);
}

.nav-tabs .nav-link i {
    margin-right: 0.5rem;
}

.tab-content {
    padding: 1rem 0;
}

.tab-pane {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsividade das abas */
@media (max-width: 768px) {
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-tabs .nav-link {
        white-space: nowrap;
        padding: 0.5rem 1rem;
    }
}

/* Estilo para botões com largura fixa */
.btn-fixed-width {
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.75rem;
    text-align: center;
    height: 38px;
    line-height: 1.5;
    vertical-align: middle;
}

.btn-fixed-width i {
    margin-right: 8px;
    font-size: 0.875rem;
}

/* Estilo para o backdrop com blur em todos os modais */
.modal-backdrop.show {
    backdrop-filter: blur(8px);
    background-color: rgba(0, 0, 0, 0.7);
}

/* Estilo para o botão de fechar dos modais */
.btn-close {
    background-color: transparent;
    padding: 0.5rem;
    opacity: 0.8;
    transition: opacity 0.2s;
    filter: invert(1) grayscale(100%) brightness(200%);
}

.btn-close:hover {
    opacity: 1;
    background-color: transparent;
}

/* Estilos do Modal */
.modal-header {
    background-color: #343a40;
    color: #fff;
    padding: 1rem;
}

.modal-title {
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.modal-header i {
    color: #fff;
    margin-right: 0.5rem;
}

.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
}

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

/* Estilos globais de formulário */
.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn:focus,
.btn-check:focus + .btn {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.form-control:hover,
.form-select:hover {
    border-color: var(--primary-color);
}

/* Input group com foco */
.input-group .form-control:focus,
.input-group .form-select:focus {
    border-color: var(--primary-color);
}

/* Checkbox e radio */
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Date picker */
input[type="date"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Estilo para colunas ordenáveis */
th[data-sort] {
    cursor: pointer;
    user-select: none;
}

th[data-sort] i {
    margin-left: 5px;
    color: #ccc;
}

th[data-sort].sort-asc i,
th[data-sort].sort-desc i {
    color: var(--primary-color);
}

/* Animação para linhas da tabela */
#militantesTable tbody tr {
    transition: all 0.3s ease;
}

/* Estilos globais para botões */
.btn-success,
.modal-footer .btn-success,
button.btn-success,
input.btn-success,
.btn-success.active,
.btn-success:active,
.show > .btn-success.dropdown-toggle {
    background-color: #198754 !important;
    border-color: #198754 !important;
    color: #fff !important;
}

.btn-success:hover,
.modal-footer .btn-success:hover,
button.btn-success:hover,
input.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.modal-footer .btn-success:focus,
.modal-footer .btn-success:active,
.btn-success:not(:disabled):not(.disabled):active,
.btn-success:not(:disabled):not(.disabled).active,
.show > .btn-success.dropdown-toggle:hover {
    background-color: #146c43 !important;
    border-color: #146c43 !important;
    color: #fff !important;
}

.btn-secondary,
.modal-footer .btn-secondary,
button.btn-secondary,
input.btn-secondary,
.btn-secondary.active,
.btn-secondary:active,
.show > .btn-secondary.dropdown-toggle {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #fff !important;
}

.btn-secondary:hover,
.modal-footer .btn-secondary:hover,
button.btn-secondary:hover,
input.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active,
.modal-footer .btn-secondary:focus,
.modal-footer .btn-secondary:active,
.btn-secondary:not(:disabled):not(.disabled):active,
.btn-secondary:not(:disabled):not(.disabled).active,
.show > .btn-secondary.dropdown-toggle:hover {
    background-color: #5c636a !important;
    border-color: #5c636a !important;
}

.btn-secondary:not(:disabled):not(.disabled).active {
    background-color: #4b545c !important;
    border-color: #4b545c !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Estilos para botões nos modais */
.modal .btn,
.modal-footer .btn {
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    transition: all 0.2s ease-in-out;
}

.modal .btn:hover,
.modal-footer .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Garantir que o botão primário mantenha suas cores */
.modal .btn-primary,
.modal-footer .btn-primary,
.modal .btn-primary.active,
.modal .btn-primary:active,
.modal-footer .btn-primary.active,
.modal-footer .btn-primary:active,
.modal .btn-primary:not(:disabled):not(.disabled):active,
.modal .btn-primary:not(:disabled):not(.disabled).active,
.modal-footer .btn-primary:not(:disabled):not(.disabled):active,
.modal-footer .btn-primary:not(:disabled):not(.disabled).active,
.show > .modal .btn-primary.dropdown-toggle,
.show > .modal-footer .btn-primary.dropdown-toggle {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: white !important;
}

.modal .btn-primary:hover,
.modal-footer .btn-primary:hover,
.modal .btn-primary:focus,
.modal-footer .btn-primary:focus,
.modal .btn-primary:active,
.modal-footer .btn-primary:active,
.modal .btn-primary:not(:disabled):not(.disabled):active:focus,
.modal .btn-primary:not(:disabled):not(.disabled).active:focus,
.modal-footer .btn-primary:not(:disabled):not(.disabled):active:focus,
.modal-footer .btn-primary:not(:disabled):not(.disabled).active:focus {
    background-color: #0b5ed7 !important;
    border-color: #0b5ed7 !important;
    color: white !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Estilos para alertas */
.alert {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    min-width: 300px;
    max-width: 600px;
    text-align: center;
    padding: 1rem 2.5rem 1rem 1rem;
    margin: 0;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.alert .btn-close {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    padding: 0.5rem;
}

.alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

.alert-warning {
    color: #664d03;
    background-color: #fff3cd;
    border-color: #ffecb5;
}

.alert-info {
    color: #055160;
    background-color: #cff4fc;
    border-color: #b6effb;
}

/* Status styles */
.status-active {
    color: var(--status-active);
    font-weight: 500;
}

.status-inactive {
    color: var(--status-inactive);
    font-weight: 500;
} 