/* MiFinanzas Pro - Styles */
:root {
    --bg-primary: #0a0f1a;
    --bg-secondary: #141c2e;
    --bg-tertiary: #1e293b;
    --bg-card: #141c2e;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #1e293b;
    --priority-1: #22c55e;
    --priority-2: #eab308;
    --priority-3: #06b6d4;
    --priority-4: #3b82f6;
    --priority-5: #6b7280;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --accent-blue: #3b82f6;
    --accent-yellow: #eab308;
    --accent-purple: #8b5cf6;
    --accent-cyan: #06b6d4;
    --accent-orange: #f97316;
    --gradient-green: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    --gradient-red: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --gradient-blue: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    --shadow-glow-blue: 0 0 30px rgba(59,130,246,0.2);
    --safe-top: env(safe-area-inset-top);
    --safe-bottom: env(safe-area-inset-bottom);
    --transition: 200ms ease;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body { font-family: 'DM Sans', -apple-system, sans-serif; background: var(--bg-primary); color: var(--text-primary); min-height: 100vh; min-height: 100dvh; line-height: 1.5; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: 'Space Grotesk', sans-serif; font-weight: 600; }
input, select, button { font-family: inherit; }
#app { min-height: 100vh; min-height: 100dvh; max-width: 430px; margin: 0 auto; position: relative; background: var(--bg-primary); }
.screen { display: none; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding-top: var(--safe-top); padding-bottom: calc(80px + var(--safe-bottom)); }
.screen.active { display: flex; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02); } }
@keyframes spin { to { transform: rotate(360deg); } }
.header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; background: var(--bg-primary); position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--border-color); }
.header-greeting { font-size: 0.8rem; color: var(--text-muted); }
.header-title { font-size: 1.25rem; font-weight: 600; }
.header-actions { display: flex; gap: 0.5rem; }
.header-action { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--bg-secondary); color: var(--text-primary); border: none; cursor: pointer; transition: var(--transition); }
.header-action:active { transform: scale(0.95); }
.content { flex: 1; padding: 1rem 1.25rem; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.card { background: var(--bg-card); border-radius: 16px; padding: 1rem; margin-bottom: 1rem; border: 1px solid var(--border-color); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.card-title { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.card-action { font-size: 0.7rem; color: var(--accent-blue); cursor: pointer; }
.wealth-card { background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%); border: 1px solid rgba(139,92,246,0.3); position: relative; overflow: hidden; }
.wealth-card::before { content: ''; position: absolute; top: -50%; right: -50%; width: 100%; height: 100%; background: radial-gradient(circle, rgba(139,92,246,0.1) 0%, transparent 70%); pointer-events: none; }
.wealth-label { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.25rem; }
.wealth-amount { font-family: 'Space Grotesk', sans-serif; font-size: 2.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.wealth-amount.positive { color: var(--accent-green); }
.wealth-amount.negative { color: var(--accent-red); }
.wealth-breakdown { display: flex; gap: 1.5rem; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid rgba(255,255,255,0.1); }
.wealth-item { flex: 1; }
.wealth-item-label { font-size: 0.7rem; color: var(--text-muted); }
.wealth-item-value { font-family: 'Space Grotesk'; font-weight: 600; font-size: 1rem; }
.wealth-item-value.green { color: var(--accent-green); }
.wealth-item-value.red { color: var(--accent-red); }
.flow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1rem; }
.flow-card { padding: 1rem; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--border-color); }
.flow-card.income { border-left: 3px solid var(--accent-green); }
.flow-card.expense { border-left: 3px solid var(--accent-red); }
.flow-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 0.5rem; }
.flow-card.income .flow-icon { background: rgba(34,197,94,0.15); color: var(--accent-green); }
.flow-card.expense .flow-icon { background: rgba(239,68,68,0.15); color: var(--accent-red); }
.flow-label { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.flow-value { font-family: 'Space Grotesk'; font-size: 1.1rem; font-weight: 600; }
.flow-card.income .flow-value { color: var(--accent-green); }
.flow-card.expense .flow-value { color: var(--accent-red); }
.flow-compare { font-size: 0.65rem; color: var(--text-muted); margin-top: 0.25rem; }
.flow-compare .over { color: var(--accent-red); }
.flow-compare .under { color: var(--accent-green); }
.cashflow-section { text-align: center; padding: 0.5rem 0; }
.cashflow-bar { height: 8px; background: var(--bg-tertiary); border-radius: 100px; overflow: hidden; margin: 0.5rem 0; }
.cashflow-fill { height: 100%; border-radius: 100px; transition: width 0.5s ease; }
.cashflow-fill.positive { background: var(--gradient-green); }
.cashflow-fill.negative { background: var(--gradient-red); }
.cashflow-amount { font-family: 'Space Grotesk'; font-size: 1.5rem; font-weight: 700; }
.cashflow-amount.positive { color: var(--accent-green); }
.cashflow-amount.negative { color: var(--accent-red); }
.priority-legend { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.priority-tag { display: flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.6rem; border-radius: 6px; font-size: 0.65rem; font-weight: 500; background: var(--bg-secondary); }
.priority-dot { width: 8px; height: 8px; border-radius: 50%; }
.priority-1 .priority-dot { background: var(--priority-1); }
.priority-2 .priority-dot { background: var(--priority-2); }
.priority-3 .priority-dot { background: var(--priority-3); }
.priority-4 .priority-dot { background: var(--priority-4); }
.priority-5 .priority-dot { background: var(--priority-5); }
.priority-selector { display: flex; gap: 0.4rem; }
.priority-option { flex: 1; padding: 0.5rem 0.25rem; background: var(--bg-secondary); border: 2px solid transparent; border-radius: 10px; text-align: center; cursor: pointer; transition: var(--transition); }
.priority-option:hover { border-color: var(--border-color); }
.priority-option.selected { border-color: var(--accent-blue); background: rgba(59,130,246,0.1); }
.priority-option .num { font-weight: 700; font-size: 1rem; margin-bottom: 0.125rem; }
.priority-option .label { font-size: 0.55rem; color: var(--text-muted); }
.priority-option.p1 .num { color: var(--priority-1); }
.priority-option.p2 .num { color: var(--priority-2); }
.priority-option.p3 .num { color: var(--priority-3); }
.priority-option.p4 .num { color: var(--priority-4); }
.priority-option.p5 .num { color: var(--priority-5); }
.budget-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; margin-bottom: 0.5rem; background: var(--bg-secondary); border-radius: 12px; border-left: 3px solid var(--priority-5); }
.budget-item.p1 { border-left-color: var(--priority-1); }
.budget-item.p2 { border-left-color: var(--priority-2); }
.budget-item.p3 { border-left-color: var(--priority-3); }
.budget-item.p4 { border-left-color: var(--priority-4); }
.budget-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--bg-tertiary); color: var(--text-secondary); flex-shrink: 0; }
.budget-info { flex: 1; min-width: 0; }
.budget-name { font-weight: 500; font-size: 0.9rem; margin-bottom: 0.25rem; }
.budget-progress { height: 4px; background: var(--bg-tertiary); border-radius: 2px; overflow: hidden; }
.budget-progress-fill { height: 100%; border-radius: 2px; background: var(--accent-blue); transition: width 0.3s ease; }
.budget-progress-fill.over { background: var(--accent-red); }
.budget-amounts { text-align: right; }
.budget-real { font-family: 'Space Grotesk'; font-weight: 600; font-size: 0.9rem; }
.budget-projected { font-size: 0.7rem; color: var(--text-muted); }
.transaction-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem; margin-bottom: 0.5rem; background: var(--bg-card); border-radius: 12px; border: 1px solid var(--border-color); cursor: pointer; transition: var(--transition); }
.transaction-item:active { transform: scale(0.99); background: var(--bg-tertiary); }
.transaction-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.transaction-info { flex: 1; min-width: 0; }
.transaction-name { font-weight: 500; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.transaction-meta { font-size: 0.7rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.5rem; }
.transaction-priority { width: 6px; height: 6px; border-radius: 50%; }
.transaction-right { text-align: right; }
.transaction-amount { font-family: 'Space Grotesk'; font-weight: 600; }
.transaction-amount.income { color: var(--accent-green); }
.transaction-amount.expense { color: var(--accent-red); }
.transaction-date { font-size: 0.65rem; color: var(--text-muted); }
.pasivo-item, .activo-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem; margin-bottom: 0.5rem; background: var(--bg-secondary); border-radius: 12px; }
.pasivo-icon, .activo-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pasivo-info, .activo-info { flex: 1; min-width: 0; }
.pasivo-name, .activo-name { font-weight: 500; font-size: 0.9rem; }
.pasivo-details { font-size: 0.7rem; color: var(--text-muted); display: flex; gap: 0.75rem; margin-top: 0.125rem; }
.activo-type { font-size: 0.7rem; color: var(--text-muted); }
.pasivo-amounts, .activo-value { text-align: right; }
.pasivo-pending { font-family: 'Space Grotesk'; font-weight: 600; font-size: 0.95rem; color: var(--accent-red); }
.pasivo-payment { font-size: 0.7rem; color: var(--text-muted); }
.activo-value { font-family: 'Space Grotesk'; font-weight: 600; font-size: 0.95rem; color: var(--accent-green); }
.rule-card { background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%); border: 1px solid rgba(139,92,246,0.3); }
.rule-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.75rem; color: var(--accent-purple); }
.rule-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; background: rgba(0,0,0,0.2); border-radius: 10px; margin-bottom: 0.5rem; }
.rule-number { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; flex-shrink: 0; color: white; }
.rule-number.r1 { background: var(--accent-red); }
.rule-number.r2 { background: var(--accent-green); }
.rule-number.r3 { background: var(--accent-blue); }
.rule-info { flex: 1; }
.rule-name { font-weight: 500; font-size: 0.85rem; }
.rule-desc { font-size: 0.7rem; color: var(--text-muted); }
.rule-amount { font-family: 'Space Grotesk'; font-weight: 600; }
.bank-cards { display: flex; gap: 0.75rem; overflow-x: auto; padding: 0.25rem 0; }
.bank-cards::-webkit-scrollbar { display: none; }
.bank-card { flex-shrink: 0; width: 140px; padding: 0.875rem; background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%); border-radius: 12px; border: 1px solid rgba(59,130,246,0.3); }
.bank-name { font-size: 0.7rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.bank-balance { font-family: 'Space Grotesky'; font-size: 1rem; font-weight: 600; }
.bank-limit { font-size: 0.65rem; color: var(--text-muted); margin-top: 0.25rem; }
.accounts-scroll { display: flex; gap: 0.75rem; overflow-x: auto; padding: 0.25rem 0; }
.accounts-scroll::-webkit-scrollbar { display: none; }
.account-chip { flex-shrink: 0; display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; background: var(--bg-secondary); border-radius: 12px; border: 1px solid var(--border-color); min-width: 150px; }
.account-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: white; }
.account-info { flex: 1; }
.account-name { font-size: 0.8rem; font-weight: 500; }
.account-balance { font-family: 'Space Grotesk'; font-size: 0.75rem; color: var(--text-secondary); }
.chart-container { position: relative; height: 200px; margin: 0.75rem 0; }
.alert-item { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.75rem; background: var(--bg-secondary); border-radius: 10px; margin-bottom: 0.5rem; }
.alert-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.alert-icon.error { background: rgba(239,68,68,0.15); color: var(--accent-red); }
.alert-icon.warning { background: rgba(245,158,11,0.15); color: var(--accent-orange); }
.alert-icon.info { background: rgba(59,130,246,0.15); color: var(--accent-blue); }
.alert-message { font-size: 0.85rem; line-height: 1.4; }
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; display: flex; justify-content: space-around; align-items: center; padding: 0.5rem 0.5rem calc(0.5rem + var(--safe-bottom)); background: rgba(20,28,46,0.95); backdrop-filter: blur(20px); border-top: 1px solid var(--border-color); z-index: 1000; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 0.4rem 0.5rem; color: var(--text-muted); cursor: pointer; background: none; border: none; font-family: inherit; transition: color 0.2s ease; }
.nav-item.active { color: var(--accent-blue); }
.nav-item span { font-size: 0.6rem; font-weight: 500; }
.nav-add { width: 50px; height: 50px; border-radius: 50%; background: var(--gradient-blue); color: white; display: flex; align-items: center; justify-content: center; border: none; cursor: pointer; transform: translateY(-10px); box-shadow: 0 4px 20px rgba(59,130,246,0.4); }
.nav-add:active { transform: translateY(-10px) scale(0.95); }
.search-bar { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; margin: 0 1.25rem 1rem; background: var(--bg-secondary); border-radius: 12px; border: 1px solid var(--border-color); color: var(--text-muted); }
.search-bar input { flex: 1; background: none; border: none; color: var(--text-primary); font-size: 0.9rem; outline: none; }
.search-bar input::placeholder { color: var(--text-muted); }
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.4rem; font-weight: 500; }
.form-input { width: 100%; padding: 0.875rem 1rem; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 12px; color: var(--text-primary); font-size: 1rem; transition: var(--transition); }
.form-input:focus { outline: none; border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.form-input::placeholder { color: var(--text-muted); }
.form-input-lg { font-family: 'Space Grotesk'; font-size: 2.5rem; font-weight: 600; text-align: center; background: transparent; border: none; padding: 0.5rem; color: var(--accent-red); }
.form-input-lg:focus { box-shadow: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.checkbox-label { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent-blue); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.875rem 1.5rem; border-radius: 12px; font-size: 0.95rem; font-weight: 600; cursor: pointer; border: none; transition: var(--transition); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--gradient-blue); color: white; box-shadow: 0 4px 15px rgba(59,130,246,0.3); }
.btn-success { background: var(--gradient-green); color: white; }
.btn-danger { background: var(--gradient-red); color: white; }
.btn-secondary { background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-full { width: 100%; }
.toggle-group { display: flex; background: var(--bg-secondary); border-radius: 12px; padding: 0.2rem; margin-bottom: 1rem; }
.toggle-btn { flex: 1; padding: 0.75rem; border: none; background: transparent; color: var(--text-secondary); font-family: inherit; font-size: 0.9rem; font-weight: 500; border-radius: 10px; cursor: pointer; transition: var(--transition); }
.toggle-btn.active { color: white; }
.toggle-btn.expense.active { background: var(--accent-red); }
.toggle-btn.income.active { background: var(--accent-green); }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(4px); z-index: 2000; display: none; align-items: flex-end; justify-content: center; }
.modal-overlay.active { display: flex; animation: fadeIn 0.2s ease; }
.modal { background: var(--bg-primary); border-radius: 20px 20px 0 0; width: 100%; max-width: 430px; max-height: 90vh; overflow-y: auto; padding: 1.25rem; padding-bottom: calc(1.25rem + var(--safe-bottom)); animation: slideUp 0.3s ease; }
.modal-handle { width: 36px; height: 4px; background: var(--border-color); border-radius: 2px; margin: 0 auto 1rem; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.modal-title { font-size: 1.15rem; font-weight: 600; }
.modal-close { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-secondary); border: none; color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.login-container { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; text-align: center; }
.login-logo { width: 90px; height: 90px; background: var(--gradient-blue); border-radius: 24px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; box-shadow: var(--shadow-glow-blue); animation: pulse 2s ease infinite; }
.login-title { font-size: 1.75rem; margin-bottom: 0.5rem; }
.login-subtitle { color: var(--text-secondary); margin-bottom: 2rem; }
.user-select { display: flex; flex-direction: column; gap: 0.75rem; width: 100%; max-width: 320px; margin-bottom: 1.5rem; }
.user-option { display: flex; align-items: center; gap: 1rem; padding: 1rem; background: var(--bg-card); border: 2px solid var(--border-color); border-radius: 14px; cursor: pointer; transition: var(--transition); }
.user-option:hover, .user-option:active { border-color: var(--accent-blue); background: rgba(59,130,246,0.05); }
.user-avatar { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 1.25rem; }
.user-name { flex: 1; text-align: left; font-weight: 500; }
.divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; color: var(--text-muted); font-size: 0.85rem; width: 100%; max-width: 320px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border-color); }
.pin-title { font-size: 1.25rem; margin-bottom: 0.5rem; }
.pin-subtitle { color: var(--text-secondary); margin-bottom: 1.5rem; }
.pin-input-group { display: flex; gap: 0.75rem; justify-content: center; margin-bottom: 1.5rem; }
.pin-digit { width: 55px; height: 65px; background: var(--bg-secondary); border: 2px solid var(--border-color); border-radius: 14px; font-family: 'Space Grotesk'; font-size: 1.5rem; font-weight: 600; color: var(--text-primary); text-align: center; transition: var(--transition); }
.pin-digit:focus { outline: none; border-color: var(--accent-blue); }
.pin-digit.filled { background: var(--accent-blue); border-color: var(--accent-blue); color: white; }
.pin-digit.error { border-color: var(--accent-red); }
.pin-error { color: var(--accent-red); font-size: 0.85rem; margin-bottom: 1rem; }
.settings-section { margin-bottom: 1.5rem; }
.settings-title { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.5rem; padding-left: 0.25rem; }
.settings-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem; background: var(--bg-card); border-radius: 12px; margin-bottom: 0.5rem; cursor: pointer; border: 1px solid var(--border-color); }
.settings-item:active { background: var(--bg-tertiary); }
.settings-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--bg-secondary); color: var(--text-secondary); }
.settings-label { flex: 1; }
.app-version { text-align: center; font-size: 0.75rem; color: var(--text-muted); margin-top: 2rem; }
.ai-hint { color: var(--accent-cyan); font-weight: normal; }
.ai-advice-box { background: linear-gradient(135deg, rgba(139,92,246,0.1), rgba(6,182,212,0.1)); border: 1px solid rgba(139,92,246,0.3); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; }
.ai-advice-header { display: flex; align-items: center; gap: 0.5rem; color: var(--accent-purple); font-weight: 600; font-size: 0.85rem; margin-bottom: 0.5rem; }
.ai-advice-box p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }
.ai-modal-content { text-align: center; padding: 1rem 0; }
.ai-avatar { width: 64px; height: 64px; background: var(--gradient-purple); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; color: white; }
.ai-message { font-size: 1rem; line-height: 1.6; color: var(--text-primary); }
.ai-context-buttons { display: flex; gap: 0.5rem; margin-top: 1rem; }
.ai-context-buttons .btn { flex: 1; font-size: 0.8rem; padding: 0.75rem; }
.toast-container { position: fixed; top: calc(1rem + var(--safe-top)); left: 50%; transform: translateX(-50%); z-index: 3000; width: 90%; max-width: 380px; display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none; }
.toast { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 1rem; display: flex; align-items: center; gap: 0.75rem; box-shadow: 0 10px 40px rgba(0,0,0,0.3); animation: slideUp 0.3s ease; pointer-events: auto; }
.toast.success { border-left: 3px solid var(--accent-green); }
.toast.error { border-left: 3px solid var(--accent-red); }
.toast.info { border-left: 3px solid var(--accent-blue); }
.toast-icon { flex-shrink: 0; }
.toast.success .toast-icon { color: var(--accent-green); }
.toast.error .toast-icon { color: var(--accent-red); }
.toast.info .toast-icon { color: var(--accent-blue); }
.toast-message { flex: 1; font-size: 0.9rem; }
.loading-overlay { position: fixed; inset: 0; background: rgba(10,15,26,0.9); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.spinner { width: 48px; height: 48px; border: 3px solid var(--border-color); border-top-color: var(--accent-blue); border-radius: 50%; animation: spin 0.8s linear infinite; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.date-header { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; margin: 1rem 0 0.5rem; padding-left: 0.25rem; }
.empty-state { text-align: center; padding: 3rem 2rem; color: var(--text-secondary); }
.empty-icon { width: 80px; height: 80px; background: var(--bg-secondary); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; color: var(--text-muted); }
.empty-title { font-weight: 600; color: var(--text-primary); margin-bottom: 0.5rem; }
.empty-text { font-size: 0.9rem; }

/* Sección de Cuentas */
.accounts-list { display: flex; flex-direction: column; gap: 0.75rem; }
.account-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; background: var(--bg-secondary); border-radius: 12px; }
.account-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.account-info { flex: 1; }
.account-name { font-weight: 600; font-size: 0.95rem; color: var(--text-primary); }
.account-type { font-size: 0.75rem; color: var(--text-muted); text-transform: capitalize; }
.account-balance { font-weight: 700; font-size: 1rem; }
.account-balance.positive { color: var(--accent-green); }
.account-balance.negative { color: var(--accent-red); }
.card-subtitle { font-size: 1rem; font-weight: 700; color: var(--accent-green); }

/* Sección Libertad Financiera */
.freedom-card { background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%); border: 1px solid rgba(139, 92, 246, 0.3); }
.freedom-badge { padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.freedom-badge.start { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.freedom-badge.progress { background: rgba(234, 179, 8, 0.2); color: #eab308; }
.freedom-badge.achieved { background: rgba(34, 197, 94, 0.2); color: #22c55e; }

.freedom-progress { margin: 1rem 0; }
.freedom-bar { height: 12px; background: var(--bg-secondary); border-radius: 6px; overflow: hidden; }
.freedom-fill { height: 100%; background: linear-gradient(90deg, #8b5cf6, #06b6d4); border-radius: 6px; transition: width 0.5s ease; }
.freedom-labels { display: flex; justify-content: space-between; font-size: 0.65rem; color: var(--text-muted); margin-top: 0.25rem; }

.freedom-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin: 1rem 0; }
.freedom-stat { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem; background: rgba(255,255,255,0.03); border-radius: 8px; }
.freedom-stat-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.freedom-stat-info { flex: 1; }
.freedom-stat-value { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1rem; color: var(--text-primary); }
.freedom-stat-label { font-size: 0.65rem; color: var(--text-muted); }

.freedom-tip { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.75rem; background: rgba(234, 179, 8, 0.1); border-radius: 8px; font-size: 0.8rem; color: var(--text-secondary); line-height: 1.4; }
.freedom-tip i { flex-shrink: 0; margin-top: 2px; }

/* Sección de Metas */
.goal-item { margin-bottom: 1rem; }
.goal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.25rem; }
.goal-name { font-size: 0.85rem; color: var(--text-secondary); }
.goal-values { font-size: 0.75rem; color: var(--text-muted); font-family: 'Space Grotesk', sans-serif; }
.goal-bar { height: 8px; background: var(--bg-secondary); border-radius: 4px; overflow: hidden; }
.goal-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.goal-fill.achieved { animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
.goal-footer { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--text-muted); margin-top: 0.25rem; }

.empty-goals { text-align: center; padding: 1rem; color: var(--text-muted); }
.empty-goals p { margin-bottom: 0.75rem; font-size: 0.9rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.8rem; }

.form-hint { display: block; font-size: 0.7rem; color: var(--text-muted); margin-top: 0.25rem; }
