/* Estilos para as abas */
/* ATUALIZAÇÃO DE COR: Substituir verde por #248636 */
.df-date-badge,
.df-btn-primary,
.df-btn-success,
.df-tab-button.active {
    background: #248636 !important;
    border-color: #248636 !important;
}

.df-btn-primary:hover,
.df-btn-success:hover {
    background: #1e6a2b !important;
}

.df-value-receita,
.df-amount-positive,
.df-year-total-positive {
    color: #248636 !important;
}

.df-card-receita .df-summary-icon {
    background: #d0e8d7 !important;
}

.df-icon-receita {
    background: linear-gradient(135deg, #248636, #1e6a2b) !important;
}

.df-category-receita {
    background: #d0e8d7 !important;
    color: #1e6a2b !important;
}

.df-view-all-btn,
.df-view-all-btn:hover {
    color: #248636 !important;
}

.df-form-input:focus,
.df-form-select:focus {
    border-color: #248636 !important;
    box-shadow: 0 0 0 3px rgba(36, 134, 54, 0.1) !important;
}

.df-year-item:hover {
    border-color: #248636 !important;
}

.df-tabs-container {
    width: 100%;
}

.df-tabs-header {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.df-tab-button {
    padding: 10px 16px;
    border: none;
    background: #f7fafc;
    color: #4a5568;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: capitalize;
}

.df-tab-button:hover {
    background: #e2e8f0;
    color: #2d3748;
}

.df-tab-button.active {
    background: #48bb78;
    color: white;
    box-shadow: 0 2px 4px rgba(72, 187, 120, 0.3);
}

.df-tabs-content {
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
}

.df-tab-pane {
    display: none;
}

.df-tab-pane.active {
    display: block;
}

/* Estilos para transações nas abas */
.df-tab-transactions {
    padding: 15px 0;
}

.df-tab-transactions .df-transaction-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 15px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
    font-size: 0.9rem;
}

.df-tab-transactions .df-transaction-item:hover {
    background-color: #f7fafc;
    margin: 0 -10px;
    padding: 12px 10px;
    border-radius: 6px;
}

.df-tab-transactions .df-transaction-item:last-child {
    border-bottom: none;
}

.df-tab-empty {
    text-align: center;
    color: #718096;
    padding: 40px 0;
}

/* Resto do CSS permanece igual */
#dashboard-financeiro-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    min-height: 100vh;
}

#dashboard-financeiro-container * {
    box-sizing: border-box;
}

.df-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.df-header {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.df-header-info h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2d3748;
    margin: 5px 0 0 0;
}

.df-date-badge {
    background: #48bb78;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.df-summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

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

.df-summary-card:hover {
    transform: translateY(-2px);
}

.df-summary-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.df-card-receita .df-summary-icon {
    background: #e8f5e8;
}

.df-card-despesa .df-summary-icon {
    background: #fff3cd;
}

.df-card-total .df-summary-icon {
    background: #e3f2fd;
}

.df-summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
}

.df-summary-label {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}

.df-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

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

.df-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.df-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.df-form-group {
    margin-bottom: 20px;
}

.df-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4a5568;
    font-size: 0.9rem;
}

.df-form-input, .df-form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.df-form-input:focus, .df-form-select:focus {
    outline: none;
    border-color: #48bb78;
    box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.1);
}

.df-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.df-btn-primary {
    background: #48bb78;
    color: white;
}

.df-btn-primary:hover {
    background: #38a169;
}

.df-btn-success {
    background: #48bb78;
    color: white;
}

.df-btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.df-view-all-btn {
    background: none;
    border: none;
    color: #48bb78;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
}

.df-transactions-list {
    max-height: 300px;
    overflow-y: auto;
}

.df-transaction-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 15px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
    font-size: 0.9rem;
}

.df-transaction-item:hover {
    background-color: #f7fafc;
    margin: 0 -10px;
    padding: 12px 10px;
    border-radius: 6px;
}

.df-transaction-description {
    font-weight: 500;
    color: #2d3748;
}

.df-transaction-date {
    color: #718096;
    font-size: 0.85rem;
}

.df-transaction-amount {
    font-weight: 600;
    text-align: right;
}

.df-amount-positive { color: #48bb78; }
.df-amount-negative { color: #f56565; }

.df-transaction-actions {
    display: flex;
    gap: 8px;
}

.df-action-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.df-edit-btn {
    background: #4299e1;
    color: white;
}

.df-delete-btn {
    background: #f56565;
    color: white;
}

.df-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.df-empty-state {
    text-align: center;
    color: #718096;
    padding: 40px 0;
}

.df-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.df-modal-content {
    background-color: white;
    margin: 3% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.df-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.df-modal-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.df-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #718096;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.df-close:hover {
    background: #f7fafc;
    color: #2d3748;
}

.df-modal-body {
    padding: 25px;
}

.df-form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
}

.df-form-actions .df-btn {
    width: auto;
    min-width: 120px;
}

/* Responsividade */
@media (max-width: 768px) {
    .df-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .df-summary-cards {
        grid-template-columns: 1fr;
    }

    .df-dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .df-transaction-item {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: left;
    }

    .df-transaction-actions {
        justify-content: flex-start;
    }

    .df-modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .df-form-actions {
        flex-direction: column;
    }

    .df-form-actions .df-btn {
        width: 100%;
    }

    .df-tabs-header {
        flex-direction: column;
        gap: 5px;
    }

    .df-tab-button {
        width: 100%;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .df-container {
        padding: 15px;
    }

    .df-dashboard-card {
        padding: 20px;
    }

    .df-header h1 {
        font-size: 1.3rem;
    }

    .df-summary-value {
        font-size: 1.3rem;
    }
}

.df-transactions-list::-webkit-scrollbar,
.df-tabs-content::-webkit-scrollbar {
    width: 6px;
}

.df-transactions-list::-webkit-scrollbar-track,
.df-tabs-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.df-transactions-list::-webkit-scrollbar-thumb,
.df-tabs-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.df-transactions-list::-webkit-scrollbar-thumb:hover,
.df-tabs-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}


/* Estilos para o contêiner de anos */
.df-years-container {
    margin-top: 30px;
}

.df-years-list {
    display: grid;
    gap: 15px;
}

.df-year-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.df-year-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #48bb78;
}

.df-year-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.df-year-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
}

.df-year-summary {
    font-size: 0.9rem;
    color: #718096;
}

.df-year-total {
    text-align: right;
}

.df-year-total-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.df-year-total-label {
    font-size: 0.85rem;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.df-year-total-positive {
    color: #48bb78;
}

.df-year-total-negative {
    color: #f56565;
}

.df-year-total-neutral {
    color: #4299e1;
}

/* Responsividade para anos */
@media (max-width: 768px) {
    .df-year-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .df-year-total {
        text-align: center;
    }
}

/* ATUALIZAÇÃO DE COR: Substituir verde por #248636 */
.df-date-badge,
.df-btn-primary,
.df-btn-success,
.df-tab-button.active {
    background: #248636 !important;
    border-color: #248636 !important;
}

.df-btn-primary:hover,
.df-btn-success:hover {
    background: #1e6a2b !important;
}

.df-value-receita,
.df-amount-positive,
.df-year-total-positive {
    color: #248636 !important;
}

.df-card-receita .df-summary-icon {
    background: #d0e8d7 !important;
}

.df-icon-receita {
    background: linear-gradient(135deg, #248636, #1e6a2b) !important;
}

.df-category-receita {
    background: #d0e8d7 !important;
    color: #1e6a2b !important;
}

.df-view-all-btn,
.df-view-all-btn:hover {
    color: #248636 !important;
}

.df-form-input:focus,
.df-form-select:focus {
    border-color: #248636 !important;
    box-shadow: 0 0 0 3px rgba(36, 134, 54, 0.1) !important;
}

.df-year-item:hover {
    border-color: #248636 !important;
}
/* Estilos para botões de exportação */
.df-modal-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.df-btn-export {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    width: auto;
}

.df-btn-export:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.df-btn-export i {
    font-size: 1rem;
}

.df-loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.df-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsividade para botões de exportação */
@media (max-width: 768px) {
    .df-modal-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .df-modal-actions {
        justify-content: space-between;
        width: 100%;
    }

    .df-btn-export {
        flex: 1;
        justify-content: center;
    }

    .df-close {
        position: absolute;
        top: 15px;
        right: 15px;
    }
}
