* {
    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;
}

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

header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.balance {
    font-size: 1.5em;
    font-weight: bold;
}

#saldo {
    color: #4ade80;
    font-size: 1.2em;
}

main {
    padding: 30px;
}

h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.form-section {
    background: #f8fafc;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
}

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

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

.input-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #4facfe;
}

.radio-group {
    display: flex;
    gap: 20px;
    align-items: center;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.radio-custom {
    padding: 10px 20px;
    background: #f1f5f9;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s;
}

.radio-custom:hover {
    background: #e2e8f0;
}

input[type="radio"]:checked + .radio-custom {
    background: #4facfe;
    color: white;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 172, 254, 0.3);
}

.btn-danger {
    background: #ef4444;
    color: white;
    padding: 12px 24px;
    width: auto;
    margin: 0 10px;
}

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

.chart-section {
    margin-bottom: 30px;
}

#graficoGastos {
    max-height: 400px;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.filtros {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filtro-btn {
    padding: 10px 20px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
}

.filtro-btn.active,
.filtro-btn:hover {
    background: #4facfe;
    color: white;
    border-color: #4facfe;
}

.transacoes-section {
    max-height: 400px;
    overflow-y: auto;
}

.lista-transacoes {
    background: #f8fafc;
    border-radius: 15px;
    padding: 20px;
    min-height: 200px;
}

.empty-state {
    text-align: center;
    color: #94a3b8;
    font-style: italic;
    padding: 40px;
}

.transacao-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    animation: slideIn 0.3s ease;
}

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

.transacao-descricao {
    font-weight: 600;
    color: #334155;
}

.transacao-valor.ganho {
    color: #10b981;
    font-weight: bold;
}

.transacao-valor.despesa {
    color: #ef4444;
    font-weight: bold;
}

.transacao-data {
    color: #64748b;
    font-size: 0.9em;
}

.actions {
    padding: 20px 30px;
    background: #f8fafc;
    text-align: center;
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 15px;
    }
    
    main {
        padding: 20px;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .filtros {
        flex-wrap: wrap;
    }
}