/* Navigation Bar */
.nav-bar {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 0;
    margin-bottom: 20px;
}

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

.nav-back {
    color: #667eea;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: color 0.2s;
}

.nav-back:hover {
    color: #764ba2;
}

.nav-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-actions {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: #a0a0a0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #e0e0e0;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
    color: #e0e0e0;
    min-height: 100vh;
}

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header h1 {
    font-size: 2.2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.time-selector {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px 15px;
    color: #e0e0e0;
    font-size: 14px;
    cursor: pointer;
}

.export-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.export-btn:hover {
    transform: translateY(-2px);
}

/* Summary Cards */
.summary-section {
    margin-bottom: 30px;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.summary-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

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

.card-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.card-content h3 {
    font-size: 0.9rem;
    color: #a0a0a0;
    margin-bottom: 8px;
}

.amount {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.amount.income { color: #4ade80; }
.amount.expense { color: #f87171; }
.amount.savings { color: #60a5fa; }

.change {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
}

.change.positive {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.change.negative {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

/* Charts Section */
.charts-section {
    margin-bottom: 30px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.chart-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.chart-header h3 {
    font-size: 1.2rem;
    color: #e0e0e0;
}

.chart-subtitle {
    font-size: 0.85rem;
    color: #a0a0a0;
}

.chart-controls {
    display: flex;
    gap: 8px;
}

.chart-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 6px 12px;
    color: #a0a0a0;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.chart-btn.active,
.chart-btn:hover {
    background: rgba(102, 126, 234, 0.3);
    color: #667eea;
    border-color: #667eea;
}

.toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px;
    color: #a0a0a0;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Merchants List */
.merchants-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.merchant-item {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.merchant-name {
    flex: 1;
    font-weight: 600;
}

.merchant-amount {
    font-weight: 700;
    color: #60a5fa;
    min-width: 80px;
    text-align: right;
}

.merchant-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Reports Section */
.reports-section {
    margin-bottom: 30px;
}

.reports-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 20px;
}

.reports-header h2 {
    font-size: 1.8rem;
    color: #e0e0e0;
}

.report-filters {
    display: flex;
    gap: 15px;
    align-items: center;
}

.generate-btn {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.generate-btn:hover {
    transform: translateY(-2px);
}

/* Report Table */
.report-table-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
}

.report-table th {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #e0e0e0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.report-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.category-icon {
    margin-right: 8px;
}

.trend {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.trend.up {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.trend.down {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

.trend.neutral {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

/* Insights Section */
.insights-section h2 {
    font-size: 1.8rem;
    color: #e0e0e0;
    margin-bottom: 25px;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.insight-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    display: flex;
    gap: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.insight-card:hover {
    transform: translateY(-3px);
}

.insight-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    flex-shrink: 0;
}

.insight-content h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #e0e0e0;
}

.insight-content p {
    color: #a0a0a0;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-actions {
        justify-content: space-between;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .reports-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .report-filters {
        justify-content: space-between;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .insight-card {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .summary-card {
        flex-direction: column;
        text-align: center;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .merchant-item {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .merchant-bar {
        position: relative;
        margin-top: 8px;
    }
}
/* Fix chart grid for smaller screens */
@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr !important;
    }

    .chart-container {
        padding: 15px;
    }
}.chart-container canvas {
    width: 100% !important;
    height: auto !important;
}@media (max-width: 768px) {
    .report-table th,
    .report-table td {
        padding: 10px;
        font-size: 14px;
    }
}@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .nav-actions {
        width: 100%;
        justify-content: space-between;
    }
}html, body {
    overflow-x: hidden;
}