:root {
    --bg-main: #f4f6f8;
    --bg-card: #ffffff;
    --text-primary: #1c1c1e;
    --text-muted: #8e8e93;
    --primary: #000000;
    --success: #34c759;
    --danger: #ff3b30;
    --border: #e5e5ea;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Roboto', sans-serif; }
body { background: var(--bg-main); color: var(--text-primary); -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
.mt-10 { margin-top: 10px; } .mt-20 { margin-top: 20px; } .mb-10 { margin-bottom: 10px; } .mb-20 { margin-bottom: 20px; }
.text-sm { font-size: 14px; } .text-muted { color: var(--text-muted); } .text-red { color: var(--danger); }
.text-center { text-align: center; }
.box-shadow { box-shadow: 0 4px 12px rgba(0,0,0,0.05); border-radius: 16px; background: var(--bg-card); padding: 20px; }

.screen { min-height: 100vh; display: flex; flex-direction: column; }
.brand { font-size: 32px; font-weight: 700; letter-spacing: -1px; margin-bottom: 5px; }
.brand-small { font-size: 20px; font-weight: 700; }
.subtitle { color: var(--text-muted); margin-bottom: 30px; font-weight: 300; }

/* Buttons & Inputs */
input, textarea { width: 100%; padding: 14px; background: #f9f9f9; border: 1px solid var(--border); border-radius: 12px; font-size: 16px; outline: none; margin-bottom: 15px; transition: 0.2s; }
input:focus, textarea:focus { border-color: var(--primary); background: #fff; }
textarea { resize: vertical; min-height: 80px; }

.btn-primary { width: 100%; padding: 16px; background: var(--primary); color: #fff; border: none; border-radius: 12px; font-size: 16px; font-weight: 500; cursor: pointer; transition: 0.2s; }
.btn-primary:active { transform: scale(0.98); }
.btn-secondary { width: 100%; padding: 16px; background: transparent; color: var(--primary); border: 1px solid var(--primary); border-radius: 12px; font-size: 16px; font-weight: 500; cursor: pointer; }
.btn-danger { width: 100%; padding: 16px; background: #fee2e2; color: var(--danger); border: none; border-radius: 12px; font-size: 16px; font-weight: 500; cursor: pointer; }
.btn-icon { background: none; border: none; font-size: 24px; cursor: pointer; }

/* Auth */
#auth-screen { justify-content: center; align-items: center; padding: 20px; }
.auth-box { width: 100%; max-width: 360px; text-align: center; background: var(--bg-card); padding: 40px 20px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.error { background: #fee2e2; color: var(--danger); padding: 12px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }

/* App Layout */
.app-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; background: var(--bg-card); position: sticky; top: 0; z-index: 10; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.content-area { flex: 1; padding: 20px; max-width: 600px; margin: 0 auto; width: 100%; }

/* Balance Card */
.balance-card { background: var(--primary); color: #fff; padding: 30px 20px; border-radius: 24px; text-align: center; box-shadow: 0 10px 25px rgba(0,0,0,0.15); }
.balance-label { font-size: 14px; opacity: 0.8; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.balance-amount { font-size: 48px; font-weight: 700; letter-spacing: -2px; }
.balance-stats { display: flex; justify-content: space-between; background: rgba(255,255,255,0.1); padding: 12px; border-radius: 12px; font-size: 13px; }

/* Chart */
.chart-container { position: relative; height: 250px; display: flex; justify-content: center; align-items: center; }

/* Magic Box */
.magic-box { background: linear-gradient(145deg, #ffffff, #f0f4f8); border: 1px solid var(--border); }
.spinner { width: 24px; height: 24px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Transactions */
.tx-list { display: flex; flex-direction: column; gap: 10px; padding-bottom: 40px; }
.tx-item { display: flex; justify-content: space-between; align-items: center; padding: 16px; background: var(--bg-card); border-radius: 16px; border: 1px solid var(--border); }
.tx-info h4 { font-size: 16px; margin-bottom: 4px; }
.tx-info span { font-size: 12px; color: var(--text-muted); background: var(--bg-main); padding: 4px 8px; border-radius: 4px; }
.tx-amount { font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 10px; }
.btn-del-tx { background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; }
.btn-del-tx:hover { color: var(--danger); }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-end; z-index: 100; }
.modal-content { background: var(--bg-card); width: 100%; max-width: 600px; padding: 30px; border-top-left-radius: 24px; border-top-right-radius: 24px; animation: slideUp 0.3s ease; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 5px; }

/* Botón "probar sin cuenta" */
.btn-ghost{background:transparent;border:none;color:#8b95a5;font-size:.92rem;font-weight:600;cursor:pointer;padding:8px;opacity:.85}
.btn-ghost:hover{opacity:1;text-decoration:underline}
