/**
 * CSS para o Sistema de Parcelamento de Despesas
 */

/* Container principal do sistema */
.sistema-parcelamento {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Título do sistema */
.sistema-parcelamento h3 {
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Cards de estatísticas */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card.success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.stat-card.info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card.warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card.primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Abas do sistema */
.nav-tabs .nav-link {
    border: none;
    border-radius: 25px 25px 0 0;
    margin-right: 5px;
    background: #e9ecef;
    color: #6c757d;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    background: #dee2e6;
    color: #495057;
}

.nav-tabs .nav-link.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Conteúdo das abas */
.tab-content {
    background: white;
    border-radius: 0 10px 10px 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Formulários */
.form-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
}

.form-section h5 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: none;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f5f8b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border: none;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.btn-outline-secondary {
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Campo de valor calculado */
.valor-calculado {
    background: #e8f5e8;
    border: 2px solid #27ae60;
    font-weight: bold;
    color: #27ae60;
}

/* Área de consulta */
.consulta-section {
    margin-bottom: 25px;
}

.consulta-filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

/* Resultados da consulta */
.resultado-consulta {
    min-height: 200px;
}

.table-hover tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

/* Barras de progresso */
.progress {
    height: 20px;
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    background: linear-gradient(90deg, #3498db 0%, #2ecc71 100%);
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* Badges de status */
.badge {
    font-size: 0.75rem;
    padding: 0.5em 0.75em;
    border-radius: 15px;
}

.badge.bg-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%) !important;
}

.badge.bg-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
}

.badge.bg-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%) !important;
}

/* Botões de ação */
.btn-group-sm .btn {
    border-radius: 15px;
    margin: 0 2px;
    transition: all 0.3s ease;
}

.btn-outline-info:hover {
    background: #17a2b8;
    transform: scale(1.1);
}

.btn-outline-success:hover {
    background: #28a745;
    transform: scale(1.1);
}

/* Modais */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    border-bottom: none;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 15px 25px;
}

/* Alertas */
.alert {
    border-radius: 10px;
    border: none;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

/* Processamento mensal */
.processamento-section {
    background: #fff5f5;
    border: 2px solid #e74c3c;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.processamento-section h5 {
    color: #c0392b;
    margin-bottom: 15px;
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border: none;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

/* Spinner de loading */
.spinner-border {
    color: #3498db;
}

/* Responsividade */
@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sistema-parcelamento {
        padding: 15px;
        margin: 10px 0;
    }
    
    .tab-content {
        padding: 15px;
    }
    
    .form-section {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .nav-tabs {
        flex-direction: column;
    }
    
    .nav-tabs .nav-link {
        margin-right: 0;
        margin-bottom: 5px;
        border-radius: 25px;
    }
    
    .tab-content {
        border-radius: 10px;
    }
}

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Efeitos de hover para cards */
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

/* Estilo para campos obrigatórios */
.required::after {
    content: " *";
    color: #e74c3c;
    font-weight: bold;
}

/* Estilo para valores monetários */
.valor-monetario {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #27ae60;
}

/* Estilo para datas */
.data-formatada {
    font-family: 'Courier New', monospace;
    color: #6c757d;
}

/* Loading overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 10px;
}

/* Estilo para tabelas */
.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.table-dark thead th {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

/* Estilo para inputs de busca */
.search-input {
    border-radius: 25px;
    padding-left: 40px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}