/* /assets/style.css */
:root {
    --bg-color: #f4f6f9;
    --card-bg: #ffffff;
    --primary: #4361ee;
    --success: #2ecc71;
    --danger: #e74c3c;
    --text-dark: #2b2d42;
    --text-muted: #8d99ae;
    --border: #edf2f4;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }

body { background-color: var(--bg-color); color: var(--text-dark); padding-bottom: 30px; }

.app-header { background: #1a1a2e; color: white; padding: 20px; text-align: center; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.container { padding: 15px; max-width: 800px; margin: 0 auto; }

/* Grid de Métricas */
.metrics-grid { display: grid; gap: 15px; grid-template-columns: 1fr; margin-bottom: 25px; }
@media (min-width: 600px) { .metrics-grid { grid-template-columns: repeat(3, 1fr); } }

.metric-card { background: var(--card-bg); padding: 20px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); text-align: center; }
.metric-card.highlight { background: var(--primary); color: white; grid-column: 1 / -1; }
.metric-card h3 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.8; margin-bottom: 8px; }
.metric-card .amount { font-size: 1.8rem; font-weight: bold; margin-bottom: 5px; }
.metric-card small { font-size: 0.75rem; color: var(--text-muted); }
.metric-card.highlight small, .metric-card.highlight h3 { color: rgba(255,255,255,0.8); }

.text-success { color: var(--success); }
.text-primary { color: var(--primary); }

/* Formulário */
.add-transaction-section { background: var(--card-bg); padding: 20px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); margin-bottom: 25px; }
.add-transaction-section h2, .transactions-list h2 { font-size: 1.2rem; margin-bottom: 15px; color: var(--text-dark); border-bottom: 2px solid var(--border); padding-bottom: 10px; }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 0.85rem; margin-bottom: 5px; color: var(--text-muted); font-weight: 600; }
.form-group input, .form-group select { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; background: var(--bg-color); outline: none; transition: border 0.3s; }
.form-group input:focus, .form-group select:focus { border-color: var(--primary); }

.row-inputs { display: flex; gap: 10px; }
.row-inputs .half { flex: 1; }

.btn-primary { width: 100%; background: var(--primary); color: white; border: none; padding: 14px; border-radius: 8px; font-size: 1rem; font-weight: bold; cursor: pointer; transition: background 0.3s; }
.btn-primary:active { background: #3a53d0; }

/* Lista de Movimentações */
.list { list-style: none; }
.list-item { background: var(--card-bg); padding: 15px; border-radius: 10px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 4px rgba(0,0,0,0.03); border-left: 4px solid var(--border); transition: opacity 0.3s; }
.list-item.paid { opacity: 0.6; border-left-color: var(--success); }
.list-item.paid .item-info strong { text-decoration: line-through; }

.item-info { display: flex; flex-direction: column; gap: 5px; }
.item-info strong { font-size: 1rem; }
.date { font-size: 0.8rem; color: var(--text-muted); }

.badge { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: bold; color: white; width: max-content; }
.badge-income { background: var(--success); }
.badge-fixed_bill, .badge-installment_bill { background: #f39c12; }
.badge-loan_received { background: #9b59b6; }
.badge-investment { background: var(--primary); }
.badge-daily_expense { background: var(--danger); }

.item-actions { display: flex; align-items: center; gap: 10px; }
.item-amount { font-weight: bold; font-size: 1.1rem; }

.btn-icon { background: none; border: none; font-size: 1.2rem; cursor: pointer; padding: 5px; border-radius: 5px; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; }
.btn-check { background: rgba(46, 204, 113, 0.1); color: var(--success); }
.btn-undo { background: rgba(141, 153, 174, 0.2); color: var(--text-muted); }
.btn-delete { background: rgba(231, 76, 60, 0.1); color: var(--danger); }