:root {
    --primary: #25D366;
    --primary-dark: #128C7E;
    --secondary: #5458AF;
    --danger: #E74C3C;
    --warning: #F39C12;
    --success: #27AE60;
    --info: #3498DB;
    --light: #F8F9FA;
    --dark: #2C3E50;
    --gray: #6C757D;
    --light-gray: #E9ECEF;
    --white: #FFFFFF;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 10px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========== LOGIN STYLES ========== */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 40px 30px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.logo {
    margin-bottom: 30px;
}

.logo i {
    font-size: 50px;
    color: var(--primary);
    margin-bottom: 10px;
}

.logo h1 {
    color: var(--dark);
    font-size: 24px;
    font-weight: 700;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.phone-input {
    display: flex;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}

.phone-input:focus-within {
    border-color: var(--primary);
}

.phone-input span {
    padding: 12px 15px;
    background: var(--light-gray);
    border-right: 2px solid var(--light-gray);
    font-weight: 600;
    color: var(--gray);
}

.phone-input input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    outline: none;
    font-size: 16px;
    background: var(--white);
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
}

.btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-footer {
    margin-top: 30px;
    font-size: 14px;
    color: var(--gray);
}

/* ========== DASHBOARD STYLES ========== */

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light-gray);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: var(--gray);
    font-weight: 500;
}

/* Header */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.header .logo {
    display: flex;
    align-items: center;
    margin: 0;
}

.header .logo i {
    font-size: 28px;
    margin-right: 12px;
    color: var(--primary);
}

.header .logo span {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    color: var(--gray);
    font-size: 14px;
}

.btn-logout {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    font-size: 18px;
    padding: 8px;
    border-radius: 6px;
    transition: var(--transition);
}

.btn-logout:hover {
    color: var(--danger);
    background: rgba(231, 76, 60, 0.1);
}

/* Navigation */
.nav {
    background: var(--white);
    border-bottom: 1px solid var(--light-gray);
    overflow-x: auto;
}

.nav-content {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--gray);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
    min-width: fit-content;
}

.nav-link i {
    margin-right: 8px;
    font-size: 16px;
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(37, 211, 102, 0.05);
}

.nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(37, 211, 102, 0.05);
}

/* Main Content */
.main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.view-content {
    display: none;
}

.view-content.active {
    display: block;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.view-header h1 {
    color: var(--dark);
    font-size: 28px;
    font-weight: 700;
}

.period-filter {
    padding: 10px 15px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    background: var(--white);
    color: var(--dark);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.period-filter:focus {
    outline: none;
    border-color: var(--primary);
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.summary-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 24px;
}

.summary-card.income .card-icon {
    background: rgba(39, 174, 96, 0.15);
    color: var(--success);
}

.summary-card.expense .card-icon {
    background: rgba(231, 76, 60, 0.15);
    color: var(--danger);
}

.summary-card.balance .card-icon {
    background: rgba(52, 152, 219, 0.15);
    color: var(--info);
}

.summary-card.transactions .card-icon {
    background: rgba(155, 89, 182, 0.15);
    color: #9B59B6;
}

.card-content h3 {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
}

.metric-value.positive {
    color: var(--success);
}

.metric-value.negative {
    color: var(--danger);
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.chart-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    position: relative;
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.chart-card h3 {
    margin-bottom: 20px;
    color: var(--dark);
    font-size: 18px;
    font-weight: 600;
}

.chart-card canvas {
    max-height: 300px !important;
    width: 100% !important;
    height: auto !important;
}

.chart-card.full-width canvas {
    max-height: 400px !important;
}

/* Activity Section */
.activity-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.activity-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
}

.activity-card h3 {
    margin-bottom: 20px;
    color: var(--dark);
    font-size: 18px;
    font-weight: 600;
}

.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

/* Transaction Items */
.transaction-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--light-gray);
    transition: var(--transition);
}

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

.transaction-item:hover {
    background: rgba(37, 211, 102, 0.02);
    margin: 0 -15px;
    padding: 15px;
    border-radius: 8px;
}

.transaction-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 18px;
    background: var(--light-gray);
}

.transaction-item.income .transaction-icon {
    background: rgba(39, 174, 96, 0.15);
    color: var(--success);
}

.transaction-item.expense .transaction-icon {
    background: rgba(231, 76, 60, 0.15);
    color: var(--danger);
}

.transaction-info {
    flex: 1;
}

.transaction-description {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.transaction-details {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--gray);
}

.transaction-amount {
    text-align: right;
    font-weight: 700;
    font-size: 16px;
}

.transaction-code {
    font-size: 11px;
    color: var(--gray);
    margin-top: 2px;
}

/* Goal Cards */
.goal-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.goal-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.goal-header h4 {
    color: var(--dark);
    font-size: 18px;
    font-weight: 600;
}

.goal-target {
    color: var(--gray);
    font-weight: 600;
}

.goal-progress {
    margin-bottom: 15px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--light-gray);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 14px;
    color: var(--gray);
    font-weight: 500;
}

.goal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
}

.goal-deadline {
    color: var(--gray);
}

.goal-days {
    font-weight: 600;
    color: var(--success);
}

.goal-days.warning {
    color: var(--warning);
}

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

/* Bill Items */
.bill-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 15px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--light-gray);
    transition: var(--transition);
}

.bill-item.urgent {
    border-left-color: var(--danger);
}

.bill-item.warning {
    border-left-color: var(--warning);
}

.bill-item.normal {
    border-left-color: var(--success);
}

.bill-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    background: var(--light-gray);
    color: var(--gray);
}

.bill-info {
    flex: 1;
}

.bill-description {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.bill-store {
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 2px;
}

.bill-due {
    font-size: 12px;
    font-weight: 500;
}

.bill-amount {
    text-align: right;
    margin-right: 15px;
    font-weight: 700;
}

.bill-date {
    font-size: 12px;
    color: var(--gray);
    margin-top: 2px;
}

/* Reminder Items */
.reminder-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 15px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.reminder-item.today {
    border-left: 4px solid var(--warning);
    background: rgba(243, 156, 18, 0.05);
}

.reminder-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    background: rgba(52, 152, 219, 0.15);
    color: var(--info);
}

.reminder-info {
    flex: 1;
}

.reminder-title {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.reminder-description {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 4px;
}

.reminder-time {
    font-size: 12px;
    color: var(--gray);
    font-weight: 500;
}

/* Forms */
.form-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.form-card.hidden {
    display: none;
}

.form-card h3 {
    margin-bottom: 20px;
    color: var(--dark);
    font-size: 20px;
    font-weight: 600;
}

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

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

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

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--gray);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: var(--success);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-success:hover {
    background: #229954;
}

.btn-sm {

    font-size: 12px;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: var(--transition);
}

.btn-icon:hover {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
}

.delete-btn:hover {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
    font-weight: 500;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: var(--white);
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.success {
    background: var(--success);
}

.notification.error {
    background: var(--danger);
}

/* Reports Grid */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.report-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
}

.report-card.full-width {
    grid-column: 1 / -1;
}

.report-card h3 {
    margin-bottom: 20px;
    color: var(--dark);
    font-size: 18px;
    font-weight: 600;
}

.report-content {
    position: relative;
    height: 300px;
}

.report-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 24px;
}

.report-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 24px;
    min-width: 280px;
    flex: 1;
}

.report-card.wide {
    min-width: 100%;
}

.report-card h4 {
    margin-bottom: 16px;
    font-size: 1.1rem;
    color: #2d3436;
}

.report-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.report-card table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.report-card th, .report-card td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.report-card th {
    background: #f7f7f7;
    font-weight: 600;
}

/* Containers */
.transactions-container,
.goals-container,
.bills-container,
.reminders-container {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
}

/* Dashboard Metrics */
.dashboard-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 24px;
}

.metric-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 24px;
    min-width: 180px;
    flex: 1;
    text-align: center;
}

/* Dashboard Charts */
.dashboard-charts {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.dashboard-charts canvas {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 16px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .activity-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main {
        padding: 20px 15px;
    }
    
    .header-content {
        padding: 15px;
    }
    
    .nav-content {
        padding: 0 15px;
    }
    
    .nav-link {
        padding: 12px 15px;
    }
    
    .nav-link span {
        display: none;
    }
    
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .view-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .user-info span:first-child {
        display: none;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .reports-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .login-card {
        padding: 25px 20px;
    }
    
    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .transaction-amount {
        text-align: left;
        align-self: flex-end;
    }
    
    .bill-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--gray);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

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

.view-content.active {
    animation: fadeIn 0.3s ease;
}

/* Print Styles */
@media print {
    .header,
    .nav,
    .btn-primary,
    .btn-secondary,
    .btn-success,
    .btn-icon,
    .loading-overlay,
    .notification {
        display: none !important;
    }
    
    .main {
        padding: 0;
        max-width: none;
    }
    
    .summary-cards,
    .charts-grid,
    .activity-section {
        break-inside: avoid;
    }
}



/* ========== ESTILOS PARA SISTEMA DE RELATÓRIOS ========== */

/* Filtros de Relatórios */
.report-filters {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
}

.filter-select,
.filter-input {
    padding: 10px 12px;
    border: 2px solid var(--light-gray);
    border-radius: 6px;
    font-size: 14px;
    transition: var(--transition);
    background: var(--white);
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--primary);
}

.checkbox-group {
    display: flex;
    gap: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
}

/* Resumo Executivo */
.executive-summary {
    padding: 20px 0;
}

.summary-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.metric {
    text-align: center;
    padding: 20px;
    background: var(--light);
    border-radius: 10px;
    transition: var(--transition);
}

.metric:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.metric-label {
    display: block;
    font-size: 14px;
    color: var(--gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.metric-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.metric-value.positive {
    color: var(--success);
}

.metric-value.negative {
    color: var(--danger);
}

.metric-count {
    font-size: 12px;
    color: var(--gray);
}

/* Insights Inteligentes */
.insights-container {
    display: grid;
    gap: 15px;
}

.insight-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid;
}

.insight-item.positive {
    background: rgba(39, 174, 96, 0.05);
    border-left-color: var(--success);
}

.insight-item.negative,
.insight-item.danger {
    background: rgba(231, 76, 60, 0.05);
    border-left-color: var(--danger);
}

.insight-item.warning {
    background: rgba(243, 156, 18, 0.05);
    border-left-color: var(--warning);
}

.insight-item.info {
    background: rgba(52, 152, 219, 0.05);
    border-left-color: var(--info);
}

.insight-item.success {
    background: rgba(39, 174, 96, 0.05);
    border-left-color: var(--success);
}

.insight-item i {
    font-size: 20px;
    margin-top: 2px;
}

.insight-item.positive i {
    color: var(--success);
}

.insight-item.negative i,
.insight-item.danger i {
    color: var(--danger);
}

.insight-item.warning i {
    color: var(--warning);
}

.insight-item.info i {
    color: var(--info);
}

.insight-item.success i {
    color: var(--success);
}

.insight-content h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
}

.insight-content p {
    margin: 0;
    font-size: 14px;
    color: var(--gray);
    line-height: 1.4;
}

/* Análise de Categorias */
.categories-analysis {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--light-gray);
}

.category-item:last-child {
    border-bottom: none;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.category-name {
    font-weight: 600;
    color: var(--dark);
}

.category-total {
    font-weight: 700;
    color: var(--primary);
}

.category-details {
    font-size: 12px;
    color: var(--gray);
}

/* Análise de Metas */
.goals-analysis {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.goals-summary {
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    background: var(--light);
    border-radius: 8px;
}

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

.goal-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.goal-label {
    font-size: 12px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.goal-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--light-gray);
}

.goal-item:last-child {
    border-bottom: none;
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.goal-name {
    font-weight: 600;
    color: var(--dark);
}

.goal-progress {
    font-weight: 700;
    color: var(--success);
}

/* Análise de Contas */
.bills-analysis {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bills-summary {
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    background: var(--light);
    border-radius: 8px;
}

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

.bill-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--info);
}

.bill-label {
    font-size: 12px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bills-amounts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.amount-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.amount-label {
    font-weight: 500;
    color: var(--dark);
}

.amount-value {
    font-weight: 700;
}

.amount-value.negative {
    color: var(--danger);
}


/* Estilos para gráficos */
.chart-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    position: relative;
}

.chart-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

.chart-card canvas {
    width: 100% !important;
    height: 250px !important;
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
    font-size: 14px;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
    color: #bdc3c7;
}

/* Grid de gráficos */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

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

/* Notificações */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: #27ae60;
}

.notification.error {
    background: #e74c3c;
}

.notification i {
    font-size: 18px;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
}

.loading-overlay .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: #7f8c8d;
    font-size: 16px;
}

/* Responsividade para gráficos */
@media (max-width: 1024px) {
    .chart-card canvas {
        height: 200px !important;
    }
}

@media (max-width: 768px) {
    .chart-card {
        padding: 15px;
    }
    
    .chart-card canvas {
        height: 180px !important;
    }
}

/* Adicione ao seu style.css */
.monthly-chart-container {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.monthly-chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #27ae60, #e74c3c, #3498db);
    border-radius: 15px 15px 0 0;
}

.chart-card.full-width {
    background: white;
    border: none;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    border-radius: 15px;
    overflow: hidden;
}

.chart-card.full-width h3 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    margin: 0;
    border-radius: 15px 15px 0 0;
}

/* Melhorias para tooltips */
.chartjs-tooltip {
    background: rgba(0, 0, 0, 0.9) !important;
    border-radius: 10px !important;
    padding: 15px !important;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.chartjs-tooltip-key {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

/* Animações suaves */
canvas {
    transition: all 0.3s ease;
}

canvas:hover {
    transform: scale(1.02);
}

/* Melhorias para visualização em mobile */
@media (max-width: 480px) {
    .chart-card h3 {
        font-size: 14px;
    }
    
    .chart-card canvas {
        height: 160px !important;
    }
    
    .empty-state {
        padding: 20px 15px;
    }
    
    .empty-state i {
        font-size: 36px;
    }
}

/* Responsividade para Relatórios */
@media (max-width: 768px) {
    .filters-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .checkbox-group {
        justify-content: center;
    }
    
    .summary-metrics {
        grid-template-columns: 1fr;
    }
    
    .goals-summary,
    .bills-summary {
        flex-direction: column;
        gap: 15px;
    }
    
    .category-header,
    .goal-header,
    .amount-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* Animações para Relatórios */
.report-card {
    animation: slideInUp 0.5s ease-out;
}

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

.insight-item {
    animation: fadeInLeft 0.6s ease-out;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Melhorias nos botões de relatório */
.filter-group .btn-primary,
.filter-group .btn-secondary {
    white-space: nowrap;
    min-width: fit-content;
}

.filter-group .btn-secondary {
    background: var(--gray);
    color: var(--white);
}

.filter-group .btn-secondary:hover {
    background: #5a6268;
}

.transaction-actions .btn-secondary {
    margin-right: 8px;
}

.transaction-actions {
    display: flex;
    margin-left: 20px; /* Adiciona espaço entre o valor e os botões */
}




.btn-danger {
    background: var(--danger);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-danger:hover {
    background: #c0392b;
}