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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.header {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.main-content {
    padding: 30px;
}

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

.summary-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.summary-card h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #666;
}

.amount {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
}

.income {
    color: #4CAF50;
}

.expense {
    color: #f44336;
}

.balance {
    color: #2196F3;
}

.balance-card {
    border: 2px solid #2196F3;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
}

.forms-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.form-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.form-container:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.form-container h3 {
    margin-bottom: 25px;
    color: #333;
    font-size: 1.3rem;
}

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

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #4CAF50;
    background: white;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-income {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.btn-income:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(76, 175, 80, 0.3);
}

.btn-expense {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
}

.btn-expense:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(33, 150, 243, 0.3);
}

.income-list-section,
.expense-list-section {
    margin-bottom: 40px;
}

.income-list-section h3,
.expense-list-section h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
}

.filter-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-controls select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-controls select:focus {
    outline: none;
    border-color: #2196F3;
}

.list-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.financial-list {
    list-style: none;
}

.financial-list li {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.financial-list li:last-child {
    border-bottom: none;
}

.financial-list li:hover {
    background: #f8f9fa;
}

.empty-state {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 40px 20px !important;
}

.item-info {
    flex: 1;
    min-width: 200px;
}

.item-description {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #333;
}

.item-details {
    font-size: 0.9rem;
    color: #666;
}

.item-amount {
    font-size: 1.3rem;
    font-weight: bold;
    margin: 0 15px;
}

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

.btn-small {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

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

.btn-delete:hover {
    background: #d32f2f;
    transform: scale(1.05);
}

.btn-pay {
    background: #4CAF50;
    color: white;
}

.btn-pay:hover {
    background: #45a049;
    transform: scale(1.05);
}

.btn-paid {
    background: #9E9E9E;
    color: white;
    cursor: not-allowed;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-paid {
    background: #d4edda;
    color: #155724;
}

.status-overdue {
    background: #f8d7da;
    color: #721c24;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.alerts-section {
    margin-top: 30px;
}

.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 15px;
    }
    
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .forms-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .financial-summary {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .summary-card {
        padding: 20px;
    }
    
    .amount {
        font-size: 1.5rem;
    }
    
    .filter-controls {
        flex-direction: column;
    }
    
    .filter-controls select {
        width: 100%;
    }
    
    .financial-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .item-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .form-container {
        padding: 15px;
    }
    
    .summary-card {
        padding: 15px;
    }
}



/* Navegação por Abas */
.tab-navigation {
    display: flex;
    background: white;
    border-radius: 15px;
    padding: 10px;
    margin-bottom: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    gap: 10px;
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    color: #666;
}

.tab-button:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.tab-button.active {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

/* Conteúdo das Abas */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* Seção de Análise */
.analytics-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.analytics-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.analytics-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Filtros de Período */
.period-filters {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group label {
    font-weight: 600;
    color: #333;
    min-width: 150px;
}

.filter-group select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 200px;
}

.filter-group select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Métricas de Análise */
.analytics-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.metric-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    border-left: 4px solid #4CAF50;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.metric-card h4 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: #666;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

/* Seção de Gráficos */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.chart-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.chart-container:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.chart-container h3 {
    margin-bottom: 25px;
    color: #333;
    font-size: 1.3rem;
    text-align: center;
}

.chart-wrapper {
    position: relative;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-wrapper canvas {
    max-width: 100%;
    max-height: 100%;
}

.chart-placeholder {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 50px 20px;
}

/* Seção de Insights */
.insights-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.insights-section h3 {
    margin-bottom: 25px;
    color: #333;
    font-size: 1.5rem;
}

#insights-container {
    display: grid;
    gap: 15px;
}

.insight-card {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #2196F3;
    transition: all 0.3s ease;
}

.insight-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.2);
}

.insight-card p {
    margin: 0;
    color: #333;
    font-weight: 500;
}

.insight-positive {
    border-left-color: #4CAF50;
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
}

.insight-warning {
    border-left-color: #FF9800;
    background: linear-gradient(135deg, #fff3e0 0%, #fef7e6 100%);
}

.insight-danger {
    border-left-color: #f44336;
    background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
}

/* Responsividade para Análise */
@media (max-width: 768px) {
    .tab-navigation {
        flex-direction: column;
        gap: 5px;
    }
    
    .tab-button {
        padding: 12px 15px;
        font-size: 1rem;
    }
    
    .analytics-header {
        padding: 20px;
    }
    
    .analytics-header h2 {
        font-size: 1.5rem;
    }
    
    .analytics-metrics {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .metric-card {
        padding: 20px;
    }
    
    .metric-value {
        font-size: 1.3rem;
    }
    
    .charts-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .chart-container {
        padding: 20px;
    }
    
    .chart-wrapper {
        height: 250px;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group label {
        min-width: auto;
    }
    
    .filter-group select {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .analytics-header {
        padding: 15px;
    }
    
    .analytics-header h2 {
        font-size: 1.3rem;
    }
    
    .analytics-header p {
        font-size: 1rem;
    }
    
    .chart-container {
        padding: 15px;
    }
    
    .chart-wrapper {
        height: 200px;
    }
    
    .insights-section {
        padding: 20px;
    }
    
    .insight-card {
        padding: 15px;
    }
}

