/* ============================================
   MÓDULO BANCOS v2.0 - ESTILOS
   ============================================ */

/* ========================================
   TABS E NAVEGAÇÃO
   ======================================== */
.tabs-container {
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tabs {
    display: flex;
    gap: 0;
    padding: 0;
    border-bottom: 2px solid #ecf0f1;
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #7f8c8d;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-button:hover {
    color: #3498db;
    background: #f8f9fa;
}

.tab-button.active {
    color: #3498db;
    border-bottom-color: #3498db;
    background: #f8f9fa;
}

.tab-button i {
    font-size: 16px;
}

/* ========================================
   CARDS DE CONTAS BANCÁRIAS
   ======================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card-banco {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-banco:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.card-banco .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-banco .card-header h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
}

.card-banco .card-header p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

.card-banco .card-body {
    padding: 20px;
}

.saldo-container {
    text-align: center;
    padding: 15px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #ecf0f1;
}

.saldo-label {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.saldo-container h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: #555;
}

.info-row i {
    color: #3498db;
    width: 20px;
}

.card-actions {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #ecf0f1;
}

.card-actions .btn {
    flex: 1;
}

/* ========================================
   RESUMO GERAL
   ======================================== */
.resumo-geral {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.resumo-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.resumo-card h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.resumo-card h2 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
}

/* ========================================
   EXTRATO
   ======================================== */
.extrato-header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filtros-extrato {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.filtros-extrato .form-group {
    margin: 0;
}

.filtros-extrato .form-group:last-child {
    display: flex;
    gap: 10px;
}

.resumo-extrato {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.resumo-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.resumo-item i {
    font-size: 32px;
    padding: 15px;
    border-radius: 50%;
}

.resumo-item.receitas i {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
}

.resumo-item.despesas i {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.resumo-item.saldo i {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.resumo-item div {
    flex: 1;
}

.resumo-item span {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.resumo-item h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

/* ========================================
   TABELA DE EXTRATO
   ======================================== */
.extrato-table {
    width: 100%;
}

.extrato-table tbody tr {
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.extrato-table tbody tr:hover {
    background: #f8f9fa;
}

.extrato-table tbody tr.mov-receita {
    border-left-color: #2ecc71;
}

.extrato-table tbody tr.mov-despesa {
    border-left-color: #e74c3c;
}

.extrato-table tbody tr.mov-transferencia {
    border-left-color: #3498db;
}

/* ========================================
   CONCILIAÇÃO
   ======================================== */
.conciliacao-header {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.conciliacao-header h2 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.conciliacao-header p {
    margin: 0 0 20px 0;
}

.conciliacao-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

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

.conciliacao-table tbody tr:hover {
    background: #f8f9fa;
}

.conciliacao-footer {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ========================================
   DASHBOARD
   ======================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

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

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.card-icon.success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.card-icon.danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.card-icon.info {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.card-content {
    flex: 1;
}

.card-content h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-content h2 {
    margin: 0 0 5px 0;
    font-size: 28px;
    font-weight: 700;
}

.card-content p {
    margin: 0;
    font-size: 12px;
    color: #95a5a6;
}

/* ========================================
   GRÁFICOS
   ======================================== */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.chart-container {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-height: 400px;
    max-height: 500px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chart-container h3 {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
    flex-shrink: 0;
}

.chart-wrapper {
    flex: 1;
    position: relative;
    min-height: 300px;
    max-height: 400px;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
    max-height: 400px;
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    background: white;
    padding: 60px 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.empty-state i {
    color: #bdc3c7;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 24px;
}

.empty-state p {
    margin: 0 0 25px 0;
    color: #7f8c8d;
    font-size: 16px;
}

/* ========================================
   BADGES CUSTOMIZADOS
   ======================================== */
.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-secondary {
    background: #e2e3e5;
    color: #383d41;
}

/* ========================================
   UTILITÁRIOS
   ======================================== */
.text-success {
    color: #2ecc71 !important;
}

.text-danger {
    color: #e74c3c !important;
}

.text-muted {
    color: #7f8c8d !important;
}

.text-center {
    text-align: center;
}

/* ========================================
   RESPONSIVIDADE
   ======================================== */
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab-button {
        flex: 1 1 calc(50% - 10px);
        font-size: 12px;
        padding: 12px 10px;
    }
    
    .filtros-extrato {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .resumo-geral {
        grid-template-columns: 1fr;
    }
    
    .resumo-extrato {
        grid-template-columns: 1fr;
    }
    
    .conciliacao-actions {
        flex-direction: column;
    }
    
    .conciliacao-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .card-banco .card-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .card-actions {
        flex-direction: column;
    }
    
    .dashboard-card {
        flex-direction: column;
        text-align: center;
    }
    
    .extrato-table {
        font-size: 12px;
    }
    
    .extrato-table th,
    .extrato-table td {
        padding: 8px 5px;
    }
}

/* ========================================
   ANIMAÇÕES
   ======================================== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-banco,
.dashboard-card,
.resumo-item {
    animation: slideIn 0.5s ease forwards;
}

/* ========================================
   IMPRESSÃO
   ======================================== */
@media print {
    .module-header,
    .tabs-container,
    .card-actions,
    .btn,
    button {
        display: none !important;
    }
    
    .extrato-table {
        page-break-inside: avoid;
    }
    
    .card-banco {
        page-break-inside: avoid;
    }
}
