:root {
  --background: #f2f6f8;
  --foreground: #142235;
  --card: #ffffff;
  --card-foreground: #142235;
  --popover: #ffffff;
  --popover-foreground: #142235;
  --primary: #0f9f92;
  --primary-foreground: #ffffff;
  --secondary: #e8f5f3;
  --secondary-foreground: #0d6e66;
  --muted: #edf2f5;
  --muted-foreground: #647386;
  --accent: #e1f4f1;
  --accent-foreground: #0d6e66;
  --destructive: #e95757;
  --border: #dfe7eb;
  --input: #d8e2e7;
  --ring: #4bc5b9;
  --chart-1: #12a594;
  --chart-2: #f0b53b;
  --chart-3: #2f80ed;
  --chart-4: #8b5cf6;
  --chart-5: #ef6262;
  --radius: 0.9rem;
  --sidebar: #0c1d2e;
  --sidebar-foreground: #e8f2f5;
  --sidebar-primary: #18b8a8;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #163247;
  --sidebar-accent-foreground: #ffffff;
  --sidebar-border: #21384b;
  --sidebar-ring: #18b8a8;
}

[data-theme="dark"] {
  --background: #05080d;
  --foreground: #f4f7f9;
  --card: #10141c;
  --card-foreground: #f4f7f9;
  --popover: #151a23;
  --popover-foreground: #f4f7f9;
  --muted: #191f29;
  --muted-foreground: #929dad;
  --accent: #10332f;
  --accent-foreground: #69dfd1;
  --border: #252c37;
  --input: #343d49;
  --sidebar: #080c12;
}

* { box-sizing: border-box; }
html { background: var(--background); }
body { margin: 0; background: var(--background); color: var(--foreground); font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 18px; color: #627387; }
.loading-screen > svg { color: #13a99a; width: 30px; height: 30px; }

.brand-logo { width: 68px; height: 68px; flex: 0 0 auto; border-radius: 22px; position: relative; overflow: hidden; background: #071725; box-shadow: 0 15px 35px #03a8992b, inset 0 0 0 1px #ffffff24; }
.brand-logo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.small-logo { width: 44px; height: 44px; border-radius: 14px; }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.1fr) minmax(420px, .9fr); background: #f7fafb; }
.auth-visual { min-height: 100vh; padding: 48px clamp(42px, 7vw, 104px); color: #fff; background: radial-gradient(circle at 77% 25%, #16ad9d30 0 20%, transparent 52%), linear-gradient(145deg, #071725 0%, #0c2638 58%, #0d3947 100%); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-visual::after { content: ""; width: 430px; height: 430px; border: 1px solid #45cdbf33; border-radius: 50%; position: absolute; right: -180px; bottom: -160px; box-shadow: 0 0 0 55px #45cdbf0d, 0 0 0 110px #45cdbf09; }
.auth-brand { display: flex; gap: 16px; align-items: center; position: relative; z-index: 1; }
.auth-brand strong { display: block; font-size: 24px; letter-spacing: -.4px; }
.auth-brand span { display: block; color: #9cb0bd; font-size: 13px; margin-top: 3px; }
.auth-copy { max-width: 650px; position: relative; z-index: 1; }
.eyebrow { color: #18b8a8; font-size: 12px; font-weight: 800; letter-spacing: .18em; }
.auth-copy h1 { font-size: clamp(42px, 5vw, 72px); line-height: 1.03; letter-spacing: -.055em; margin: 18px 0 24px; font-weight: 720; }
.auth-copy p { font-size: 19px; line-height: 1.7; color: #b7c7d1; max-width: 560px; }
.auth-benefits { display: flex; flex-wrap: wrap; gap: 20px 28px; position: relative; z-index: 1; color: #c7d6dd; font-size: 13px; }
.auth-benefits span { display: flex; align-items: center; gap: 8px; }
.auth-benefits svg { color: #35c8b9; width: 18px; }
.auth-panel { display: grid; place-items: center; padding: 40px; }
.auth-card { width: min(430px, 100%); }
.auth-card h2 { font-size: 36px; margin: 11px 0 8px; letter-spacing: -.04em; }
.auth-card > p { color: #718092; margin: 0 0 30px; }
.auth-form { display: grid; gap: 18px; }
.auth-form label, .form-grid label, .settings-card label { display: grid; gap: 7px; color: #405064; font-size: 13px; font-weight: 700; }
.auth-form input, .form-grid input, .settings-card input { height: 46px; border-radius: 12px; background: #fff; }
.auth-form button { height: 48px; margin-top: 4px; border-radius: 13px; }
.auth-links { margin-top: 22px; display: flex; justify-content: space-between; gap: 16px; }
.auth-links button { border: 0; padding: 0; background: transparent; color: #0b8f84; font-weight: 700; font-size: 13px; }
.form-alert { padding: 11px 13px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.form-alert.error { background: #fff0f0; color: #b33a3a; }
.form-alert.success { background: #eaf9f6; color: #12796f; }
.auth-mobile-brand { display: none; }

.app-shell { min-height: 100vh; background: #f3f6f8; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 272px; padding: 22px 17px 18px; background: linear-gradient(180deg, #0b1d2d, #091824); color: #dce9ee; display: flex; flex-direction: column; z-index: 40; overflow-y: auto; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 6px 23px; border-bottom: 1px solid #ffffff12; }
.sidebar-brand strong { display: block; font-size: 17px; }
.sidebar-brand span { display: block; color: #7f98a7; font-size: 11px; margin-top: 2px; }
.sidebar-close { display: none; margin-left: auto; width: 34px; height: 34px; border: 1px solid #ffffff18; border-radius: 11px; color: #dce9ee; background: #ffffff0c; place-items: center; }
.sidebar-close svg { width: 17px; }
.sidebar nav { flex: 1; padding: 12px 0; }
.nav-group { display: grid; gap: 3px; margin-bottom: 15px; }
.nav-group > span { color: #5f7a89; font-size: 9px; letter-spacing: .14em; font-weight: 800; padding: 10px 12px 5px; }
.nav-group button { display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 11px; background: transparent; color: #9bb0bc; font-size: 13px; text-align: left; transition: .18s ease; }
.nav-group button:hover { background: #ffffff0b; color: #dce9ee; }
.nav-group button.active { color: #fff; background: linear-gradient(90deg, #16aa9a35, #173b4e); box-shadow: inset 3px 0 #18b8a8; }
.nav-group button svg { width: 18px; height: 18px; }
.nav-group button svg:last-child { margin-left: auto; width: 14px; color: #5dd5c9; }
.license-mini { border: 1px solid #244052; background: #10293b; color: #dce9ee; border-radius: 13px; padding: 12px; display: flex; gap: 9px; align-items: center; text-align: left; }
.license-mini div { flex: 1; min-width: 0; }
.license-mini strong, .license-mini span { display: block; }
.license-mini strong { font-size: 12px; }
.license-mini div span { color: #7893a2; font-size: 10px; margin-top: 2px; }
.license-mini svg { width: 14px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #25cf9d; box-shadow: 0 0 10px #25cf9d; }
.status-dot.expired { background: #ef6262; box-shadow: 0 0 10px #ef6262; }
.user-mini { margin-top: 12px; padding: 12px 5px 0; border-top: 1px solid #ffffff0f; display: flex; align-items: center; gap: 9px; }
.avatar { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #07252c; background: #54d6c9; font-weight: 800; }
.avatar.large { width: 48px; height: 48px; border-radius: 15px; font-size: 18px; }
.user-mini > div:nth-child(2) { flex: 1; min-width: 0; }
.user-mini strong, .user-mini span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-mini strong { font-size: 11px; }
.user-mini span { color: #708998; font-size: 9px; margin-top: 2px; }
.user-mini button { border: 0; background: transparent; color: #78909e; padding: 5px; }
.user-mini svg { width: 16px; }
.app-main { min-height: 100vh; margin-left: 272px; }
.app-header { height: 92px; padding: 0 clamp(24px, 4vw, 56px); display: flex; align-items: center; gap: 18px; background: #f8fafb; border-bottom: 1px solid #e3e9ed; position: sticky; top: 0; z-index: 20; }
.app-header > div:nth-child(2) { flex: 1; }
.app-header h1 { margin: 0; font-size: 24px; letter-spacing: -.035em; }
.app-header p { margin: 3px 0 0; color: #7a8999; font-size: 12px; }
.sync-pill { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #d8e6e4; background: #eef8f6; color: #26776f; border-radius: 999px; font-size: 10px; font-weight: 700; }
.sync-pill svg { width: 14px; height: 14px; }
.sync-pill.offline { color: #b14a4a; background: #fff0f0; border-color: #f1d6d6; }
.page-content { padding: 28px clamp(22px, 4vw, 54px) 54px; max-width: 1500px; margin: 0 auto; }
.mobile-menu-button, .mobile-nav, .mobile-overlay { display: none; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr); gap: 18px; }
.hero-balance { grid-column: 1 / -1; min-height: 205px; padding: 34px 38px; color: #fff; background: linear-gradient(115deg, #0c2537, #0d4450); border-radius: 23px; box-shadow: 0 17px 42px #15354a26; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; }
.hero-balance > div:first-child { position: relative; z-index: 2; }
.hero-balance span { font-size: 10px; letter-spacing: .17em; color: #88aebb; font-weight: 800; }
.hero-balance strong { display: block; font-size: clamp(36px, 4vw, 55px); letter-spacing: -.05em; margin: 8px 0 4px; }
.hero-balance p { color: #9eb6c0; font-size: 12px; margin: 0; }
.hero-balance button { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; border: 1px solid #4dd0c2; color: #fff; background: #18b8a8; padding: 13px 18px; border-radius: 13px; font-weight: 800; font-size: 12px; box-shadow: 0 10px 30px #05a39440; }
.hero-balance button svg { width: 17px; }
.hero-orb { position: absolute; width: 330px; height: 330px; border-radius: 50%; right: -70px; top: -170px; background: radial-gradient(circle, #4be2d652, transparent 68%); box-shadow: 0 0 0 60px #47dedc08, 0 0 0 120px #47dedc05; }
.metric-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.metric-card { padding: 20px; display: flex; flex-direction: row; gap: 14px; align-items: center; border: 1px solid #e1e8ec; box-shadow: 0 4px 18px #1934470a; }
.metric-card span, .account-label, .debt-card [data-slot="card-content"] > span { color: #748394; font-size: 11px; }
.metric-card strong { display: block; font-size: 20px; margin-top: 3px; letter-spacing: -.03em; }
.metric-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; }
.metric-icon svg { width: 20px; }
.metric-icon.green { color: #0e8f76; background: #e6f7f2; }
.metric-icon.red { color: #dd5555; background: #fff0ef; }
.metric-icon.gold { color: #a87308; background: #fff8e4; }
.panel { border: 1px solid #e1e8ec; box-shadow: 0 4px 20px #17394b0a; }
.panel [data-slot="card-header"] { display: flex; grid-template-columns: none; flex-direction: row; justify-content: space-between; padding: 22px 24px 14px; }
.panel [data-slot="card-title"] { font-size: 15px; }
.panel [data-slot="card-description"] { font-size: 11px; margin-top: 5px; }
.panel [data-slot="card-content"] { padding: 0 24px 22px; }
.movement-list { display: grid; }
.movement-row { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid #edf1f3; }
.movement-row:last-child { border-bottom: 0; }
.movement-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; }
.movement-icon svg { width: 18px; }
.movement-icon.ingreso { color: #0c997e; background: #e6f7f2; }
.movement-icon.gasto { color: #df5656; background: #fff0ef; }
.movement-icon.transferencia { color: #2f70ca; background: #eaf2ff; }
.movement-row strong, .movement-row span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.movement-row strong { font-size: 12px; }
.movement-row span { color: #82909e; font-size: 10px; margin-top: 4px; }
.movement-row > b { font-size: 12px; color: #506173; }
.movement-row > b.income { color: #0d967c; }
.movement-row > b.expense { color: #df5656; }
.movement-action { display: flex; align-items: center; border-bottom: 1px solid #edf1f3; }
.movement-action .movement-row { flex: 1; border: 0; }
.category-bars { display: grid; gap: 14px; }
.category-bars > div { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; }
.category-bars span, .category-bars strong { font-size: 10px; }
.category-bars span { color: #506173; }
.category-bars strong { color: #354658; }
.category-bars i { grid-column: 1 / -1; height: 7px; border-radius: 10px; background: #edf2f4; overflow: hidden; }
.category-bars b { display: block; height: 100%; border-radius: inherit; }
.empty-state { min-height: 260px; display: grid; place-content: center; justify-items: center; text-align: center; color: #718092; padding: 30px; }
.empty-state > div { width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center; color: #16a697; background: #e5f6f3; margin-bottom: 14px; }
.empty-state > div svg { width: 28px; }
.empty-state strong { color: #26384a; font-size: 15px; }
.empty-state p { max-width: 380px; margin: 7px 0 16px; font-size: 12px; line-height: 1.6; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.money-overview { min-height: 145px; margin-bottom: 18px; padding: 25px 28px; color: #fff; background: linear-gradient(115deg, #0c2537, #0d4450); border-radius: 21px; display: flex; align-items: center; justify-content: space-between; gap: 22px; box-shadow: 0 14px 34px #15354a20; }
.money-overview > div:first-child > span { color: #86aeba; font-size: 9px; letter-spacing: .16em; font-weight: 800; }
.money-overview > div:first-child > strong { display: block; margin-top: 5px; font-size: 34px; letter-spacing: -.045em; }
.money-overview p { margin: 2px 0 0; color: #9eb6c0; font-size: 10px; }
.money-currencies { min-width: 290px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.money-currencies span { padding: 12px 14px; color: #a9c1ca; background: #ffffff0d; border: 1px solid #ffffff13; border-radius: 13px; font-size: 9px; }
.money-currencies b { display: block; margin-top: 4px; color: #fff; font-size: 15px; }
.toolbar > button { border-radius: 11px; }
.search-box { width: min(380px, 100%); position: relative; display: block; }
.search-box > svg { position: absolute; left: 13px; top: 11px; width: 16px; color: #81909e; z-index: 1; }
.search-box input { padding-left: 38px; background: #fff; border-radius: 11px; }
.list-panel [data-slot="card-content"] { padding-top: 6px; }
.account-grid, .budget-grid, .debt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.account-card { border-top: 4px solid; box-shadow: 0 5px 22px #1836480d; }
.account-card [data-slot="card-header"], .budget-card [data-slot="card-header"], .debt-card [data-slot="card-header"] { padding: 20px 20px 12px; }
.account-card [data-slot="card-content"], .budget-card [data-slot="card-content"], .debt-card [data-slot="card-content"] { padding: 0 20px 20px; }
.account-heading { display: flex; align-items: center; gap: 12px; }
.account-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; }
.account-icon svg { width: 20px; }
.account-balance { display: block; font-size: 24px; letter-spacing: -.04em; margin: 5px 0 14px; }
.card-actions { display: flex; align-items: center; gap: 5px; }
.credit-card-panel { color: #fff; border: 0; box-shadow: 0 15px 30px #12304026; }
.credit-card-panel [data-slot="card-header"] { padding: 22px 22px 10px; }
.credit-card-panel [data-slot="card-content"] { padding: 0 22px 22px; }
.credit-card-panel [data-slot="card-title"] { margin-top: 14px; font-size: 18px; }
.credit-card-top { display: flex; justify-content: space-between; }
.credit-card-panel [data-slot="card-content"] > span { color: #bad0d7; font-size: 10px; }
.credit-card-panel [data-slot="card-content"] > strong { display: block; font-size: 25px; margin: 4px 0 13px; }
.credit-progress i { display: block; height: 6px; background: #ffffff24; border-radius: 10px; overflow: hidden; }
.credit-progress b { display: block; height: 100%; background: #ffc142; }
.credit-progress span { display: block; font-size: 9px; color: #c9d8de; margin-top: 6px; }
.credit-dates { display: flex; gap: 15px; align-items: center; margin-top: 17px; }
.credit-dates span { font-size: 9px; color: #b8cbd2; }
.credit-dates span b { display: block; color: #fff; font-size: 13px; margin-top: 2px; }
.credit-dates button { margin-left: auto; }
.credit-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.credit-detail-card { overflow: hidden; border: 1px solid #dfe7eb; box-shadow: 0 8px 28px #17394b12; }
.credit-detail-card [data-slot="card-header"] { display: flex; grid-template-columns: none; flex-direction: row; align-items: flex-start; justify-content: space-between; padding: 22px 22px 14px; border-bottom: 1px solid #edf1f3; }
.credit-detail-card [data-slot="card-title"] { font-size: 17px; }
.credit-detail-card [data-slot="card-content"] { padding: 18px 22px 22px; }
.credit-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.credit-columns > div { padding: 13px; border-radius: 13px; background: #e9f8f5; }
.credit-columns.used { margin-top: 10px; }
.credit-columns.used > div { background: #f3f5f7; }
.credit-columns span, .credit-columns strong { display: block; }
.credit-columns span { color: #708292; font-size: 10px; }
.credit-columns strong { margin-top: 4px; color: #102f3c; font-size: 19px; letter-spacing: -.03em; }
.credit-columns.used strong { color: #435466; }
.credit-over { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding: 11px 13px; color: #b43f3f; background: #fff0ef; border-radius: 12px; font-size: 11px; }
.credit-detail-card .credit-progress { margin-top: 17px; }
.credit-detail-card .credit-progress i { background: #e7ecef; }
.credit-detail-card .credit-progress span { color: #718292; font-size: 9px; }
.credit-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 17px; }
.credit-meta span { color: #7a8998; font-size: 9px; }
.credit-meta b { display: block; color: #314355; font-size: 11px; margin-top: 3px; }
.credit-meta b.ok { color: #0b9279; }
.credit-meta b.danger { color: #cf4747; }
.pay-card-button { width: 100%; height: 43px; margin-top: 18px; border-radius: 13px; background: #12b9c5; }
.budget-card [data-slot="card-header"], .debt-card [data-slot="card-header"] { display: flex; grid-template-columns: none; flex-direction: row; justify-content: space-between; }
.budget-card [data-slot="card-header"] > svg, .debt-card [data-slot="card-header"] > svg { color: #15a596; background: #e7f7f4; padding: 9px; width: 40px; height: 40px; border-radius: 13px; }
.budget-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; }
.budget-footer > span { color: #748394; font-size: 10px; }
.budget-footer > div { display: flex; }
.over [data-slot="progress-indicator"] { background: #e95757; }
.fixed-list { display: grid; }
.fixed-list > div { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid #edf1f3; }
.fixed-check { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #405366; background: #edf2f4; font-weight: 800; font-size: 11px; }
.fixed-check.paid { color: #fff; background: #16a996; }
.fixed-list strong, .fixed-list span { display: block; }
.fixed-list strong { font-size: 12px; }
.fixed-list span { color: #81909e; font-size: 10px; margin-top: 4px; }
.fixed-list > div > b { font-size: 12px; }
.inline-actions { display: flex; gap: 4px; }
.debt-card [data-slot="card-content"] > strong { display: block; font-size: 24px; margin: 4px 0 14px; }
.debt-details { display: flex; justify-content: space-between; color: #7b8a99; font-size: 10px; margin: 10px 0 16px; }
.reports-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 18px; }
.bar-chart { height: 300px; display: flex; align-items: stretch; justify-content: space-around; gap: 14px; border-bottom: 1px solid #dfe7eb; padding: 20px 5px 0; }
.bar-chart > div { flex: 1; max-width: 80px; display: grid; grid-template-rows: 1fr 28px; align-items: end; text-align: center; }
.bars { height: 100%; display: flex; align-items: end; justify-content: center; gap: 5px; }
.bars i, .bars b { width: 18px; border-radius: 6px 6px 2px 2px; }
.bars i { background: #16aa99; }
.bars b { background: #f0b53b; }
.bar-chart span { color: #7a8998; font-size: 10px; text-transform: capitalize; padding-top: 8px; }
.chart-legend { display: flex; justify-content: center; gap: 20px; margin-top: 14px; font-size: 10px; color: #6f8090; }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 3px; background: #16aa99; }
.chart-legend span:last-child i { background: #f0b53b; }
.export-panel [data-slot="card-content"] { display: grid; gap: 10px; }
.export-panel [data-slot="card-content"] > button { border: 1px solid #e1e8ec; background: #fff; border-radius: 13px; padding: 14px; display: grid; grid-template-columns: 35px 1fr auto; align-items: center; gap: 10px; text-align: left; color: #0e9c8e; }
.export-panel button div strong, .export-panel button div span { display: block; color: #26384a; }
.export-panel button div strong { font-size: 11px; }
.export-panel button div span { color: #7e8c99; font-size: 9px; margin-top: 3px; }

.subscription-page { max-width: 980px; margin: 0 auto; }
.license-card { margin-bottom: 20px; background: linear-gradient(135deg, #eefaf8, #fff); border-color: #ccebe6; }
.license-card [data-slot="card-content"] { padding: 22px; }
.license-status { display: flex; align-items: center; gap: 16px; }
.license-status > svg { width: 46px; height: 46px; padding: 11px; border-radius: 15px; color: #0c9587; background: #dff5f1; }
.license-status > div { flex: 1; }
.license-status span, .license-status strong, .license-status p { display: block; }
.license-status span { color: #6b7f8b; font-size: 9px; letter-spacing: .12em; font-weight: 800; }
.license-status strong { font-size: 16px; margin-top: 3px; }
.license-status p { color: #708190; font-size: 11px; margin: 3px 0 0; }
.plans-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.plan-card { position: relative; overflow: hidden; }
.plan-card.recommended { border: 2px solid #17ab9c; box-shadow: 0 14px 35px #0e9b8e1c; }
.recommended-label { position: absolute; top: 0; right: 0; color: #fff; background: #13a798; padding: 6px 13px; font-size: 8px; letter-spacing: .1em; font-weight: 800; border-radius: 0 0 0 10px; }
.saving-badge { width: fit-content; color: #987010; background: #fff5d6; border-radius: 999px; padding: 4px 8px; font-size: 9px; font-weight: 800; }
.plan-price { font-size: 37px; font-weight: 800; letter-spacing: -.05em; margin-top: 8px; }
.plan-price small { font-size: 10px; font-weight: 500; color: #778797; margin-left: 6px; letter-spacing: 0; }
.plan-card ul { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.plan-card li { display: flex; align-items: center; gap: 8px; color: #526475; font-size: 11px; }
.plan-card li svg { width: 15px; color: #12a291; }
.plan-card [data-slot="card-content"] { display: grid; gap: 9px; }
.payment-note { display: flex; gap: 14px; align-items: flex-start; padding: 17px 19px; margin-top: 18px; border: 1px solid #e6dcbd; background: #fffaf0; border-radius: 14px; }
.payment-note > svg { color: #ae7d12; }
.payment-note strong { font-size: 12px; }
.payment-note p { color: #766d58; font-size: 10px; line-height: 1.6; margin: 4px 0 0; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.settings-card.wide { grid-column: 1 / -1; }
.setting-row { display: flex; align-items: center; gap: 12px; }
.setting-row strong, .setting-row span { display: block; }
.setting-row strong { font-size: 13px; }
.setting-row span { color: #7a8998; font-size: 10px; margin-top: 3px; }
.backup-actions { display: flex; gap: 10px; }
.privacy-note { display: flex; align-items: flex-start; gap: 10px; color: #5c6f80; font-size: 11px; line-height: 1.55; }
.privacy-note svg { width: 20px; flex: 0 0 auto; color: #0f9f92; }
.category-create { display: flex; gap: 9px; }
.category-create input { flex: 1; min-width: 0; }
.custom-category-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.custom-category-list > span { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 8px 6px 12px; color: #176f67; background: #e5f6f3; border: 1px solid #ccebe6; border-radius: 999px; font-size: 11px; font-weight: 700; }
.custom-category-list button { width: 23px; height: 23px; padding: 0; display: grid; place-items: center; color: #287e76; background: #ffffffa8; border: 0; border-radius: 50%; }
.custom-category-list button:disabled { opacity: .35; cursor: not-allowed; }
.custom-category-list svg { width: 13px; height: 13px; }

.more-page { width: min(720px, 100%); margin: 0 auto; display: grid; gap: 22px; }
.more-brand { display: flex; align-items: center; gap: 15px; padding: 17px; color: #fff; background: linear-gradient(135deg, #0b1f30, #0e3c47); border: 1px solid #184557; border-radius: 20px; box-shadow: 0 12px 34px #102b3a20; }
.more-brand strong, .more-brand span { display: block; }
.more-brand strong { font-size: 19px; }
.more-brand span { color: #92aab6; font-size: 11px; margin-top: 3px; }
.developer-credit { display: grid; justify-items: center; gap: 3px; padding: 2px 16px 18px; color: #728394; text-align: center; }
.developer-credit strong { color: #465a6c; font-size: 12px; }
.developer-credit span { font-size: 11px; }
.more-group h2 { margin: 0 0 9px 5px; color: #738290; font-size: 9px; letter-spacing: .16em; font-weight: 800; }
.more-group > div { overflow: hidden; border: 1px solid #dfe7eb; border-radius: 17px; background: #fff; box-shadow: 0 5px 20px #17394b0a; }
.more-group button { width: 100%; min-height: 67px; padding: 11px 15px; border: 0; border-bottom: 1px solid #edf1f3; color: #213346; background: transparent; display: grid; grid-template-columns: 40px minmax(0, 1fr) 18px; align-items: center; gap: 12px; text-align: left; }
.more-group button:last-child { border-bottom: 0; }
.more-group button > i { width: 40px; height: 40px; display: grid; place-items: center; color: #12a293; background: #e5f6f3; border-radius: 13px; font-style: normal; }
.more-group button > i svg { width: 19px; }
.more-group button > span { min-width: 0; }
.more-group button strong, .more-group button small { display: block; }
.more-group button strong { font-size: 13px; }
.more-group button small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #80909f; font-size: 10px; margin-top: 3px; }
.more-group button > svg { width: 16px; color: #91a1ae; }
.more-user { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 15px; border: 1px solid #dfe7eb; border-radius: 17px; background: #fff; }
.more-user strong, .more-user span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more-user strong { font-size: 12px; }
.more-user span { color: #7c8b99; font-size: 10px; margin-top: 2px; }

[data-theme="dark"] body, [data-theme="dark"] .app-shell { background: #05080d; color: #f4f7f9; }
[data-theme="dark"] .app-header { background: #090d13; border-color: #222934; }
[data-theme="dark"] .app-header p { color: #8e99a8; }
[data-theme="dark"] .page-content { color: #f4f7f9; }
[data-theme="dark"] [data-slot="card"], [data-theme="dark"] .more-group > div, [data-theme="dark"] .more-user { color: #f4f7f9; background: #10141c; border-color: #272e39; }
[data-theme="dark"] [data-slot="card-description"], [data-theme="dark"] .metric-card span, [data-theme="dark"] .account-label, [data-theme="dark"] .setting-row span, [data-theme="dark"] .more-user span { color: #8f9aa9; }
[data-theme="dark"] .movement-row, [data-theme="dark"] .movement-action, [data-theme="dark"] .fixed-list > div, [data-theme="dark"] .credit-detail-card [data-slot="card-header"], [data-theme="dark"] .more-group button { border-color: #272e39; }
[data-theme="dark"] .movement-row strong, [data-theme="dark"] .movement-row > b, [data-theme="dark"] .category-bars strong, [data-theme="dark"] .category-bars span, [data-theme="dark"] .empty-state strong { color: #edf2f5; }
[data-theme="dark"] .movement-row span, [data-theme="dark"] .fixed-list span, [data-theme="dark"] .credit-detail-card .credit-progress span { color: #8b97a6; }
[data-theme="dark"] .more-group button { color: #edf2f5; background: #10141c; }
[data-theme="dark"] .more-group button > i { color: #55d8cb; background: #14322f; }
[data-theme="dark"] .more-group h2 { color: #727f8f; }
[data-theme="dark"] .credit-columns > div { background: #12322f; }
[data-theme="dark"] .credit-columns.used > div { background: #1a2029; }
[data-theme="dark"] .credit-columns strong { color: #f3f7f8; }
[data-theme="dark"] .credit-columns span, [data-theme="dark"] .credit-meta span { color: #909baa; }
[data-theme="dark"] .credit-meta b { color: #e9eef2; }
[data-theme="dark"] .credit-over { background: #391d21; color: #ff9292; }
[data-theme="dark"] .payment-summary { color: #edf6f5; background: #12322f; }
[data-theme="dark"] .payment-summary span, [data-theme="dark"] .form-help { color: #93a1ad; }
[data-theme="dark"] .developer-credit { color: #758797; }
[data-theme="dark"] .developer-credit strong { color: #a6b6c2; }
[data-theme="dark"] .custom-category-list > span { color: #70e0d4; background: #12322f; border-color: #26514c; }
[data-theme="dark"] .custom-category-list button { color: #7ce3d8; background: #ffffff12; }
[data-theme="dark"] .credit-detail-card .credit-progress i, [data-theme="dark"] .category-bars i { background: #272f39; }
[data-theme="dark"] .form-grid select, [data-theme="dark"] .form-grid input, [data-theme="dark"] .settings-card input, [data-theme="dark"] .search-box input { color: #edf2f5; background: #151a23; border-color: #343d49; }
[data-theme="dark"] .form-dialog { background: #11161e; border-color: #303844; }
[data-theme="dark"] .toolbar button[variant="outline"], [data-theme="dark"] .export-panel [data-slot="card-content"] > button { background: #151a23; border-color: #2b333e; }
[data-theme="dark"] .license-card { background: linear-gradient(135deg, #102722, #10141c); }
[data-theme="dark"] .payment-note { background: #261f12; border-color: #59461f; }

.form-dialog { max-height: min(88vh, 760px); overflow-y: auto; border-radius: 18px; }
.form-grid { display: grid; gap: 14px; }
.payment-summary { padding: 14px 15px; color: #143346; background: #e7f7f4; border-radius: 13px; }
.payment-summary span, .payment-summary strong, .payment-summary small { display: block; }
.payment-summary span { color: #67808c; font-size: 10px; }
.payment-summary strong { margin-top: 4px; font-size: 17px; }
.payment-summary small { margin-top: 4px; color: #c34747; font-size: 9px; }
.form-help { margin: -3px 0 0; color: #758595; font-size: 10px; line-height: 1.55; }
.form-grid select { width: 100%; height: 43px; border: 1px solid var(--input); border-radius: 11px; padding: 0 11px; background: #fff; color: #243649; outline: none; }
.form-grid select:focus { border-color: var(--ring); box-shadow: 0 0 0 3px #4bc5b92b; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 7px; }
.color-picker { display: flex; gap: 9px; }
.color-picker > label { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; color: #fff; cursor: pointer; }
.color-picker input { display: none; }
.color-picker svg { opacity: 0; width: 15px; }
.color-picker input:checked + svg { opacity: 1; }
.toast { position: fixed; z-index: 100; left: calc(50% + 136px); bottom: 26px; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; padding: 11px 15px; color: #fff; background: #0d2434; border: 1px solid #294354; box-shadow: 0 12px 35px #09192538; border-radius: 12px; font-size: 11px; font-weight: 700; }
.toast svg { width: 16px; color: #49d6c8; }

@media (max-width: 1100px) {
  .account-grid, .budget-grid, .debt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .credit-list { grid-template-columns: 1fr; }
  .reports-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-panel { min-height: 100vh; padding: 22px 18px; background: radial-gradient(circle at 50% -10%, #3ac6b51e, transparent 38%), #f7fafb; }
  .auth-mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
  .sidebar, .mobile-overlay { display: none; }
  .app-main { margin-left: 0; padding-bottom: 82px; }
  .app-header { height: 66px; padding: 0 13px; gap: 11px; }
  .mobile-menu-button { display: none; }
  .app-header h1 { font-size: 19px; }
  .app-header p { display: none; }
  .sync-pill span { display: none; }
  .page-content { padding: 14px 12px 26px; }
  .mobile-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; position: fixed; z-index: 30; bottom: 0; left: 0; right: 0; height: calc(70px + env(safe-area-inset-bottom)); padding: 7px 2px env(safe-area-inset-bottom); background: #0b1d2d; box-shadow: 0 -8px 28px #0c1c282e; }
  .mobile-nav button { height: 50px; border: 0; background: transparent; color: #748c9a; display: grid; place-items: center; align-content: center; gap: 2px; font-size: 8px; }
  .mobile-nav button svg { width: 19px; }
  .mobile-nav button.active { color: #55d8cb; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .hero-balance { padding: 21px; min-height: 0; align-items: stretch; flex-direction: column; gap: 18px; }
  .hero-balance strong { font-size: clamp(31px, 9vw, 42px); }
  .hero-balance button { position: relative; left: auto; bottom: auto; width: fit-content; padding: 10px 13px; }
  .money-overview { min-height: 0; padding: 20px; flex-direction: column; align-items: stretch; gap: 15px; }
  .money-overview > div:first-child > strong { font-size: 30px; }
  .money-currencies { min-width: 0; }
  .metric-grid { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .metric-grid::-webkit-scrollbar { display: none; }
  .metric-card { min-width: 172px; padding: 13px; }
  .metric-card:nth-child(3) { grid-column: auto; }
  .metric-card strong { font-size: 16px; }
  .metric-icon { width: 36px; height: 36px; }
  .movements-panel, .category-panel { grid-column: 1; }
  .account-grid, .budget-grid, .debt-grid, .plans-grid, .settings-grid { grid-template-columns: 1fr; }
  .settings-card.wide { grid-column: auto; }
  .more-page { gap: 20px; }
  .more-brand { padding: 16px; }
  .more-group button { min-height: 64px; }
  .fixed-list > div { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .fixed-list .inline-actions { grid-column: 2 / -1; justify-content: flex-end; }
  .toast { left: 50%; bottom: 88px; width: max-content; max-width: 90%; }
}

@media (max-width: 520px) {
  .auth-card { width: 100%; }
  .auth-card h2 { font-size: 30px; }
  .auth-card > p { margin-bottom: 22px; }
  .auth-form { gap: 14px; }
  .app-header h1 { font-size: 18px; }
  .sync-pill { padding: 6px 8px; }
  .dashboard-grid { gap: 11px; }
  .panel [data-slot="card-header"] { padding: 17px 16px 10px; }
  .panel [data-slot="card-content"] { padding: 0 16px 17px; }
  .hero-balance { border-radius: 18px; }
  .toolbar { align-items: stretch; }
  .toolbar .search-box { flex: 1; }
  .toolbar > button { width: 42px; padding: 0; }
  .toolbar > button svg { margin: 0; }
  .toolbar > button { font-size: 0; }
  .movement-row { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 9px; }
  .movement-row > b { font-size: 10px; }
  .two-fields { grid-template-columns: 1fr; }
  .license-status { align-items: flex-start; flex-wrap: wrap; }
  .license-status > div { min-width: calc(100% - 70px); }
  .license-status button { width: 100%; }
  .license-card [data-slot="card-content"] { padding: 17px; }
  .plan-card [data-slot="card-header"] { padding: 19px 18px 10px; }
  .plan-card [data-slot="card-content"] { padding: 0 18px 18px; }
  .plan-price { font-size: 32px; }
  .payment-note { margin-top: 12px; padding: 14px; }
  .backup-actions { flex-direction: column; }
  .category-create { flex-direction: column; }
  .credit-columns strong { font-size: 16px; }
  .credit-detail-card [data-slot="card-header"] { padding: 18px 17px 13px; }
  .credit-detail-card [data-slot="card-content"] { padding: 15px 17px 18px; }
}

/* Política de privacidad pública */
.privacy-link { display: inline-flex; justify-content: center; margin-top: 8px; color: #4a6a7d; font-size: 11px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.settings-privacy-link { display: inline-flex; margin-top: 12px; color: #118f83; font-size: 11px; font-weight: 800; text-decoration: none; }
.settings-privacy-link:hover, .privacy-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.privacy-page { min-height: 100vh; padding: 34px 18px 54px; color: #183044; background: radial-gradient(circle at 50% -12%, #35c6b521, transparent 34%), #f6f9fa; }
.privacy-shell { width: min(860px, 100%); margin: 0 auto; }
.privacy-header { padding: 28px 30px 24px; margin-bottom: 16px; background: linear-gradient(145deg, #0c2637, #123b45); color: #fff; border-radius: 24px; box-shadow: 0 18px 54px #0b22351f; }
.privacy-back { display: inline-flex; margin-bottom: 22px; color: #a7dfda; font-size: 11px; font-weight: 800; text-decoration: none; }
.privacy-brand-row { display: flex; align-items: center; gap: 13px; margin-bottom: 24px; }
.privacy-brand-row img { border-radius: 15px; box-shadow: 0 8px 28px #00151c38; }
.privacy-brand-row strong, .privacy-brand-row span { display: block; }
.privacy-brand-row strong { font-size: 15px; }
.privacy-brand-row span { margin-top: 2px; color: #a7c3cc; font-size: 10px; }
.privacy-kicker { margin: 0 0 8px; color: #55d8cb; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.privacy-header h1 { margin: 0; font-size: clamp(31px, 6vw, 48px); line-height: 1.04; letter-spacing: -.035em; }
.privacy-lead { max-width: 700px; margin: 15px 0 0; color: #d0dde2; font-size: 13px; line-height: 1.7; }
.privacy-date { margin: 18px 0 0; color: #8fb1bb; font-size: 10px; }
.privacy-card { margin-top: 12px; padding: 22px 24px; background: #fff; border: 1px solid #dfe8ec; border-radius: 18px; box-shadow: 0 8px 26px #1832440a; }
.privacy-card h2 { margin: 0 0 10px; color: #15384b; font-size: 16px; }
.privacy-card p, .privacy-card li { color: #5c7080; font-size: 12px; line-height: 1.75; }
.privacy-card p { margin: 0; }
.privacy-card p + p { margin-top: 10px; }
.privacy-card ul { margin: 10px 0 0; padding-left: 21px; }
.privacy-card li + li { margin-top: 5px; }
.privacy-card a, .privacy-footer a { color: #118f83; font-weight: 800; }
.privacy-footer { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: center; padding: 25px 12px 6px; color: #778b98; font-size: 10px; text-align: center; }
.privacy-footer strong { color: #405765; }

@media (max-width: 620px) {
  .privacy-page { padding: 0 0 34px; background: #f6f9fa; }
  .privacy-shell { width: 100%; }
  .privacy-header { padding: 24px 19px 25px; border-radius: 0 0 24px 24px; }
  .privacy-card { margin: 11px 12px 0; padding: 19px 18px; border-radius: 16px; }
  .privacy-card h2 { font-size: 15px; }
}


/* Componentes base para la edición estática de Cloudflare (sin proceso de compilación). */
[data-slot="button"] {
  appearance:none; border:1px solid transparent; background:var(--primary); color:var(--primary-foreground);
  min-height:36px; padding:0 14px; border-radius:10px; display:inline-flex; align-items:center; justify-content:center;
  gap:8px; font-weight:750; font-size:13px; line-height:1; transition:.16s ease; box-shadow:none;
}
[data-slot="button"]:hover { filter:brightness(.97); transform:translateY(-1px); }
[data-slot="button"]:disabled { opacity:.52; cursor:not-allowed; transform:none; }
[data-slot="button"][data-variant="outline"] { background:var(--card); color:var(--foreground); border-color:var(--border); }
[data-slot="button"][data-variant="ghost"] { background:transparent; color:inherit; border-color:transparent; }
[data-slot="button"][data-size="lg"] { min-height:44px; padding:0 18px; border-radius:12px; }
[data-slot="button"][data-size="sm"] { min-height:32px; padding:0 11px; font-size:12px; }
[data-slot="button"][data-size="icon-sm"] { width:32px; min-width:32px; height:32px; min-height:32px; padding:0; border-radius:9px; }
[data-slot="button"] svg { width:16px; height:16px; flex:0 0 auto; }
[data-slot="card"] { background:var(--card); color:var(--card-foreground); border-radius:var(--radius); }
[data-slot="card-header"] { padding:22px 22px 0; }
[data-slot="card-title"] { font-size:16px; font-weight:800; letter-spacing:-.02em; }
[data-slot="card-description"] { color:var(--muted-foreground); font-size:12px; line-height:1.5; margin-top:5px; }
[data-slot="card-content"] { padding:20px 22px 22px; }
[data-slot="input"] { width:100%; min-width:0; border:1px solid var(--input); background:var(--card); color:var(--foreground); padding:0 12px; outline:none; transition:.15s ease; }
[data-slot="input"]:focus { border-color:var(--ring); box-shadow:0 0 0 3px color-mix(in srgb, var(--ring) 16%, transparent); }
[data-slot="progress"] { position:relative; width:100%; height:8px; overflow:hidden; border-radius:999px; background:var(--muted); }
[data-slot="progress-indicator"] { height:100%; border-radius:inherit; background:var(--primary); transition:width .25s ease; }
.dialog-static-root { position:fixed; inset:0; z-index:120; }
[data-slot="dialog-overlay"] { position:absolute; inset:0; background:rgba(3,11,18,.58); backdrop-filter:blur(4px); }
[data-slot="dialog-content"] { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:min(560px,calc(100vw - 28px)); max-height:calc(100vh - 36px); overflow:auto; background:var(--card); color:var(--foreground); border:1px solid var(--border); border-radius:18px; padding:24px; box-shadow:0 28px 80px rgba(0,0,0,.24); }
[data-slot="dialog-header"] { padding-right:34px; margin-bottom:18px; }
[data-slot="dialog-title"] { margin:0; font-size:20px; font-weight:850; letter-spacing:-.025em; }
[data-slot="dialog-description"] { margin:5px 0 0; color:var(--muted-foreground); font-size:12px; line-height:1.5; }
.dialog-static-close { position:absolute; top:15px; right:15px; width:32px; height:32px; border:0; border-radius:9px; background:var(--muted); color:var(--foreground); display:grid; place-items:center; }
.dialog-static-close svg { width:16px; height:16px; }
.lucide-fallback { display:inline-grid; place-items:center; width:1em; height:1em; font-size:1em; line-height:1; font-style:normal; }
.bootstrap-error { max-width:720px; margin:12vh auto; padding:28px; border:1px solid #efb6b6; background:#fff6f6; color:#8c2525; border-radius:18px; font-family:system-ui,sans-serif; line-height:1.55; }
