:root {
  --bg: #050605;
  --header: linear-gradient(160deg, #0c3a22 0%, #07170f 100%);
  --card: #111412;
  --card-2: #1a1e1b;
  --sub: #0b1a12;
  --text: #eef3ef;
  --muted: #8e9891;
  --line: #222824;
  --accent: #1fff7a;
  --accent-dim: #12b857;
  --glow: 0 0 18px rgba(31,255,122,.45);
  --fab: #1fff7a;
  --expense: #ff5c6c;
  --income: #1fff7a;
  --chip: #1d2320;
  --radius: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; overflow-x: hidden; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.4 Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
  min-height: 100vh;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.expense { color: var(--expense); }
.soon { color: #4da3ff; }
.income { color: var(--income); }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; }
.card { background: var(--card); border-radius: var(--radius); }
.pad { padding: 16px; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 4px 8px; font-weight: 600; }

/* ---------- Encabezado verde ---------- */
.hero {
  background: var(--header);
  border-bottom: 1px solid rgba(31,255,122,.18);
  border-radius: 0 0 28px 28px;
  padding: calc(env(safe-area-inset-top) + 4px) 0 44px;
}
.hero-top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; }
.icon-btn { width: 44px; height: 40px; display: grid; place-items: center; font-size: 26px; }
.icon-btn svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.acct-picker { position: relative; color: inherit; display: flex; justify-content: center; align-items: center; gap: 6px; font-size: 19px; font-weight: 600; min-width: 0; }
.acct-picker .caret { font-size: 14px; color: var(--accent); }
.hero-balance { display: block; width: 100%; color: inherit; text-align: center; font-size: 30px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.type-tabs { display: flex; margin-top: 2px; }
.type-tabs button { flex: 1; padding: 6px 0 7px; font-size: 17px; font-weight: 600; letter-spacing: .03em; color: #b9c2b8; position: relative; }
.type-tabs button.active { color: #fff; }
.type-tabs button.active::after { content: ''; position: absolute; left: 22%; right: 22%; bottom: 0; height: 3px; background: var(--accent); border-radius: 2px; box-shadow: var(--glow); }

.page-head { border-bottom: 1px solid rgba(31,255,122,.18); background: var(--header); padding: calc(env(safe-area-inset-top) + 8px) 0 14px; border-radius: 0 0 22px 22px; }
.page-head .hero-top h1 { margin: 0; font-size: 20px; text-align: center; font-weight: 600; }

/* ---------- Tarjeta del gráfico ---------- */
.chart-card { position: relative; margin-top: -34px; padding: 2px 10px 10px; touch-action: pan-y; }
.period-tabs { display: flex; justify-content: space-between; }
.period-tabs button { flex: 1; padding: 10px 0 8px; font-size: 15px; color: #c9cabf; position: relative; white-space: nowrap; }
.period-tabs button.active { color: var(--accent); font-weight: 600; }
.period-tabs button.active::after { content: ''; position: absolute; left: 12%; right: 12%; bottom: 0; height: 3px; background: var(--accent); border-radius: 2px; box-shadow: var(--glow); }
.period-nav { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; margin: 4px 0 0; }
.period-nav .arrow { height: 38px; font-size: 26px; color: #c9cabf; font-weight: 300; }
.period-nav .arrow:disabled { visibility: hidden; }
.period-nav .label { text-align: center; text-decoration: underline; text-underline-offset: 4px; font-size: 16px; }
.period-nav .label:first-letter { text-transform: uppercase; }

.donut-wrap { position: relative; width: 230px; max-width: 64vw; aspect-ratio: 1; margin: 6px auto 2px; }
.donut-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.donut-center .t { font-size: 22px; font-weight: 500; }

.fab {
  width: 56px; height: 56px; border-radius: 50%; background: var(--fab); color: #111;
  display: grid; place-items: center; box-shadow: 0 0 22px rgba(31,255,122,.5), 0 6px 18px rgba(0,0,0,.5);
}
.fab svg { width: 26px; height: 26px; stroke: #111; stroke-width: 2.2; }
.chart-card .fab { position: absolute; right: 10px; bottom: 10px; }
.fab.floating { position: fixed; right: 20px; bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 20; }

/* Mini barra fija al hacer scroll */
.mini {
  position: fixed; top: 0; left: 0; right: 0; z-index: 25;
  background: var(--card); border-radius: 0 0 18px 18px; box-shadow: 0 6px 20px rgba(0,0,0,.4);
  padding: calc(env(safe-area-inset-top) + 10px) 0 12px;
  transform: translateY(-110%); transition: transform .2s ease;
}
.mini.show { transform: none; }
.mini .inner { max-width: 640px; margin: 0 auto; padding: 0 16px; display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; }
.mini .label { grid-column: 1 / -1; text-align: center; font-size: 14px; color: var(--muted); }
.mini .fab { width: 48px; height: 48px; grid-row: span 2; }
.mini .fab svg { width: 24px; height: 24px; }
.mini .total { text-align: center; font-size: 22px; }
.hbar { display: flex; height: 30px; border-radius: 15px; overflow: hidden; gap: 1.5px; background: var(--bg); }
.hbar i { display: block; height: 100%; min-width: 1.5px; }

/* ---------- Filas de categorías ---------- */
.cat-list { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.cat-row { background: var(--card); border-radius: var(--radius); overflow: hidden; }
.cat-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 10px; width: 100%; text-align: left; }
.cat-head .name { flex: 1; min-width: 0; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-head .pct { color: var(--muted); font-size: 14px; white-space: nowrap; }
.cat-head .amt { font-size: 15px; white-space: nowrap; }
.sec-head { display: flex; align-items: center; gap: 8px; width: 100%; font: inherit; letter-spacing: inherit; text-transform: inherit; text-align: left; }
.chev { width: 26px; height: 26px; border-radius: 50%; background: #0b1a12; display: grid; place-items: center; flex: none; }
.chev svg { width: 14px; height: 14px; stroke: var(--accent); stroke-width: 2.4; fill: none; transition: transform .15s; }
.cat-row.open .chev svg { transform: rotate(180deg); }
.cat-sub { background: var(--sub); padding: 6px 0; }
.cat-sub button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 8px 18px 8px 26px; text-align: left; font-size: 15px; }
.cat-sub .hash { color: var(--muted); width: 16px; font-size: 20px; }
.cat-sub .see { color: var(--accent); justify-content: center; font-size: 14px; padding: 12px; }

.icon {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 19px; color: #fff;
}
.icon.sm { width: 38px; height: 38px; font-size: 18px; }
.bar { height: 4px; background: var(--chip); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 2px; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }

/* ---------- Listas genéricas ---------- */
.list > * + * { border-top: 1px solid var(--line); }
.item { display: flex; align-items: center; gap: 12px; padding: 9px 14px; width: 100%; text-align: left; }
.item:active { background: var(--card-2); }
.day-head { display: flex; justify-content: space-between; padding: 16px 4px 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.day-head span:first-child:first-letter { text-transform: uppercase; }
.tag { display: inline-block; font-size: 11px; background: var(--chip); color: #d6d7cf; padding: 1px 7px; border-radius: 999px; margin-right: 4px; }
.search { width: 100%; padding: 12px 14px; border-radius: 12px; border: 0; background: var(--card); outline: none; margin-top: 14px; }
.chip-row { display: flex; flex-wrap: wrap; align-items: center; }
.chip-balance { order: 9; margin: 10px 0 0 auto; font-size: 24px; font-weight: 700; white-space: nowrap; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--chip); padding: 6px 12px; border-radius: 999px; font-size: 13px; margin: 10px 6px 0 0; }
.list-period { margin-top: 12px; padding: 0 8px 8px; }

.btn { display: block; width: 100%; padding: 14px; border-radius: 14px; font-weight: 600; background: var(--accent); color: #03140a; text-align: center; }
.btn.secondary { background: var(--card); color: var(--text); }
.btn.danger { background: transparent; color: var(--expense); }
.btn-row { display: flex; gap: 10px; margin-top: 12px; }
.btn-row .btn { flex: 1; }

/* ---------- Menú lateral ---------- */
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; width: min(300px, 82vw); z-index: 55;
  background: var(--card); padding: calc(env(safe-area-inset-top) + 20px) 0 20px;
  animation: slide .2s ease-out; overflow-y: auto;
}
@keyframes slide { from { transform: translateX(-100%); } }
.drawer .brand { padding: 0 20px 18px; font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.drawer .brand img { width: 36px; height: 36px; border-radius: 9px; }
.drawer button { display: flex; align-items: center; gap: 16px; width: 100%; padding: 14px 22px; font-size: 17px; text-align: left; }
.drawer button.active { color: var(--accent); background: rgba(31,255,122,.08); }
.drawer button span { width: 26px; text-align: center; font-size: 20px; }

/* ---------- Hoja inferior ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 40; }
.backdrop.over { z-index: 54; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  max-width: 640px; margin: 0 auto; max-height: 92vh; overflow-y: auto; overflow-x: hidden;
  background: var(--bg); border-radius: 20px 20px 0 0;
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
  animation: up .22s ease-out;
}
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
.sheet .grip { width: 38px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet-head h3 { margin: 0; font-size: 18px; }
.sheet-head button { color: var(--accent); font-weight: 600; padding: 6px; }

.segmented { display: flex; background: var(--card); border-radius: 12px; padding: 3px; gap: 3px; }
.segmented button { flex: 1; padding: 9px 6px; border-radius: 9px; font-size: 15px; font-weight: 500; color: var(--muted); }
.segmented button.active { background: var(--card-2); color: var(--text); }
.segmented.type button.active[data-v="expense"] { color: var(--expense); }
.segmented.type button.active[data-v="income"] { color: var(--income); }

.amount-input { width: 100%; border: 0; background: transparent; outline: none; font-size: 40px; font-weight: 700; text-align: center; padding: 10px 0; }
.amount-input.expense { color: var(--expense); }
.amount-input.income { color: var(--income); }

.field { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.field label { width: 96px; flex: none; color: var(--muted); font-size: 14px; }
.field input, .field select, .field textarea { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; text-align: right; }
.field select option { background: var(--card); }
.field input[type="checkbox"] { flex: none; width: 22px; height: 22px; accent-color: var(--accent); }

.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 12px 8px; }
.cat-grid button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px; border-radius: 12px; font-size: 11px; }
.cat-grid button .ellipsis { max-width: 100%; }
.cat-grid button.sel { background: var(--card-2); font-weight: 600; }
.cat-grid button.sel .icon { outline: 3px solid var(--accent); outline-offset: 2px; }

.icon-letter { font-weight: 800; color: #fff; font-size: 1.15em; line-height: 1; font-family: -apple-system, system-ui, sans-serif; }
.icon-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; padding: 10px; }
.icon-grid button { font-size: 22px; padding: 6px 0; border-radius: 10px; }
.icon-grid button.sel { background: var(--card-2); }
.color-grid { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
.color-grid button { width: 30px; height: 30px; border-radius: 50%; }
.color-grid button.sel { outline: 3px solid var(--text); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.chips button { background: var(--chip); padding: 5px 11px; border-radius: 999px; font-size: 13px; }
.chips button.on { background: var(--accent); color: #03140a; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(150px + env(safe-area-inset-bottom));
  background: #f1f1ea; color: #111; padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 60; max-width: 90vw;
}
.mini .label:first-letter { text-transform: uppercase; }

/* ---------- Barra de pestañas inferior ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; background: color-mix(in srgb, var(--card) 94%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tabbar button { flex: 1; padding: 8px 0 10px; font-size: 11px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tabbar button span { font-size: 20px; line-height: 1.2; }
.tabbar button.active { color: var(--accent); }

.tabbar button.active span { text-shadow: 0 0 12px rgba(31,255,122,.7); }
.hero-balance { text-shadow: 0 0 24px rgba(31,255,122,.25); }

/* ---------- Diálogo de selección de cuenta ---------- */
.dialog-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 70; display: flex; align-items: center; justify-content: center; padding: 24px; animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } }
.dialog {
  width: 100%; max-width: 420px; min-width: 0; max-height: 82vh; display: flex; flex-direction: column;
  background: #0c100d; border: 1px solid rgba(31,255,122,.22); border-radius: 22px;
  box-shadow: 0 0 40px rgba(31,255,122,.12), 0 20px 50px rgba(0,0,0,.6);
  animation: pop .18s ease-out;
}
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.dialog h3 { margin: 0; padding: 26px 26px 12px; font-size: 26px; font-weight: 400; line-height: 1.2; }
.dialog .opts { overflow-y: auto; padding: 4px 10px; }
.dialog .opt .grow { min-width: 0; }
.dialog .opt { display: flex; align-items: center; gap: 16px; width: 100%; padding: 12px 14px; border-radius: 12px; text-align: left; }
.dialog .opt.sel { background: rgba(31,255,122,.07); }
.dialog .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #8e9891; flex: none; display: grid; place-items: center; }
.dialog .opt.sel .radio { border-color: var(--accent); box-shadow: var(--glow); }
.dialog .opt.sel .radio::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.dialog .icon { width: 50px; height: 50px; font-size: 24px; }
.dialog .opt .name { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dialog .opt .bal { font-size: 15px; color: var(--muted); margin-top: 1px; }
.dialog .opt .bal.neg { color: var(--expense); }
.dialog .actions { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0 16px; border-top: 1px solid var(--line); }
.dialog .actions button { color: var(--accent); font-weight: 600; letter-spacing: .06em; padding: 12px 24px; font-size: 16px; }


/* ---------- Movimiento (como la app original) ---------- */
.tx { display: block; width: 100%; text-align: left; padding: 12px 14px; }
.tx:active { background: var(--card-2); }
.tx-main { display: flex; align-items: center; gap: 12px; }
.tx-icon { position: relative; flex: none; }
.tx-icon .badge { position: absolute; right: -4px; bottom: -3px; width: 20px; height: 20px; border-radius: 50%; background: var(--card-2); border: 2px solid var(--card); font-size: 10px; display: grid; place-items: center; }
.tx-cat { flex: 1; min-width: 0; font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-amt { font-weight: 700; font-size: 16px; white-space: nowrap; }
.tx-amt.expense { color: var(--text); }
.tx-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tx-tags span { background: var(--chip); color: var(--text); font-size: 15px; padding: 4px 11px; border-radius: 9px; border: 1px solid rgba(31,255,122,.15); }
.tx-note { color: var(--muted); font-size: 15px; margin-top: 8px; word-break: break-word; }
.tx-acc { color: var(--muted); font-size: 12px; margin-top: 6px; }
.day-head { font-size: 15px; }

/* Categorías grandes en "Nuevo movimiento" */
.cat-grid.big { gap: 10px 6px; padding: 14px 8px 6px; }
.cat-grid.big button { font-size: 12.5px; gap: 6px; }
.cat-grid.big .icon { width: 60px; height: 60px; font-size: 30px; }
.see-all { display: block; width: 100%; padding: 10px 0 14px; color: var(--accent); font-size: 14px; font-weight: 600; }
.save-btn { margin-top: 16px; padding: 16px; font-size: 17px; box-shadow: 0 0 20px rgba(31,255,122,.35); }

/* ---------- Fotos ---------- */
.photo-strip { display: flex; gap: 10px; padding: 12px; overflow-x: auto; }
.thumb { flex: none; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; background: var(--card-2); padding: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 24px; cursor: pointer;
  border: 1.5px dashed rgba(31,255,122,.45); color: var(--accent); }
.thumb.add span { font-size: 11px; font-weight: 600; }
.photo-viewer { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.94); display: flex; align-items: center; justify-content: center;
  padding: calc(env(safe-area-inset-top) + 10px) 10px calc(env(safe-area-inset-bottom) + 70px); }
.photo-viewer img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.pv-bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 14px 20px calc(env(safe-area-inset-bottom) + 14px); }
.pv-bar button { color: var(--accent); font-weight: 600; font-size: 16px; padding: 10px 14px; }
.pv-bar button[data-a="del"] { color: var(--expense); }

/* ---------- Inicio de sesión ---------- */
.login-screen { position: fixed; inset: 0; z-index: 90; background: radial-gradient(120% 80% at 50% 0%, #0c3a22 0%, var(--bg) 60%);
  display: flex; align-items: center; justify-content: center; padding: 24px; overflow-y: auto; }
.login-box { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 12px; }
.login-logo { width: 84px; height: 84px; border-radius: 20px; margin: 0 auto; box-shadow: 0 0 30px rgba(31,255,122,.35); }
.login-title { text-align: center; margin: 6px 0 0; font-size: 28px; color: var(--text); text-transform: none; letter-spacing: 0; }
.login-input { width: 100%; padding: 15px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 17px; outline: none; }
.login-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,255,122,.15); }
.login-msg { min-height: 20px; color: var(--expense); font-size: 14px; text-align: center; }
.login-skip { color: var(--muted); font-size: 14px; padding: 10px; }

/* ---------- Editar saldo ---------- */
.hero-balance .pencil { font-size: 15px; vertical-align: middle; opacity: .75; }
.balance-edit { display: flex; align-items: center; justify-content: center; gap: 8px; }
.balance-edit .amount-input { width: auto; flex: 1; max-width: 260px; }
.sign-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--card); color: var(--income); font-size: 26px; font-weight: 700; flex: none; }
.sign-btn.neg { color: var(--expense); }

/* ---------- Nuevo movimiento (estilo app original) ---------- */
.amt-row { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0 6px; }
.amount-big { width: 190px; text-align: center; font-size: 44px; font-weight: 400; background: transparent; border: 0; outline: none; color: var(--text);
  border-bottom: 2px solid var(--line); padding: 2px 0 6px; }
.amount-big:focus { border-bottom-color: var(--accent); }
.amount-big.income { color: var(--income); }
.amt-cur { color: var(--accent); font-size: 26px; font-weight: 500; }
.calc-btn { font-size: 26px; width: 44px; height: 44px; border-radius: 10px; opacity: .8; }
.calc-btn.on { background: rgba(31,255,122,.15); opacity: 1; }
.calc { background: var(--card); border-radius: 16px; padding: 10px; margin-bottom: 8px; }
.calc-display { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 8px 10px; gap: 10px; }
.calc-expr { font-size: 20px; word-break: break-all; }
.calc-res { color: var(--accent); font-size: 15px; white-space: nowrap; }
.calc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.calc-keys button { padding: 13px 0; border-radius: 12px; background: var(--card-2); font-size: 20px; }
.calc-keys button.op { color: var(--accent); font-weight: 600; }
.calc-keys button.fn { color: var(--muted); }
.mv-label { color: var(--muted); font-size: 14px; margin: 16px 2px 4px; display: flex; align-items: center; justify-content: space-between; }
.mv-value { position: relative; display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 19px; padding: 2px; }
.mv-value .caret { font-size: 12px; opacity: .8; }
.overlay-select { position: absolute; inset: 0; opacity: 0; width: 100%; font-size: 16px; }
.date-chips { display: flex; align-items: stretch; gap: 8px; margin-top: 18px; }
.dchip { flex: 1; max-width: 96px; display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 10px; color: var(--text); line-height: 1.2; }
.dchip b { font-size: 17px; font-weight: 500; }
.dchip span { font-size: 15px; color: var(--muted); }
.dchip.sel { background: #5fbf8f; color: #04140a; }
.dchip.sel span { color: #04140a; }
.cal-btn { position: relative; margin-left: auto; display: grid; place-items: center; width: 52px; font-size: 26px; cursor: pointer; }
.cal-btn input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; }
.search-btn { font-size: 20px; padding: 2px 6px; border-radius: 8px; }
.search-btn.on { background: rgba(31,255,122,.15); }
.mv-input { width: 100%; background: transparent; border: 0; border-bottom: 2px solid var(--line); color: var(--text); font-size: 17px; padding: 8px 2px; outline: none; margin-bottom: 8px; }
.mv-input:focus { border-bottom-color: var(--accent); }
.chips.outline { padding: 4px 0 4px; }
.chips.outline button { background: transparent; border: 1.5px solid #5fbf8f; color: var(--text); font-size: 15px; padding: 6px 11px; border-radius: 9px; }
.chips.outline button.on { background: #5fbf8f; color: #04140a; }

/* Íconos de línea (calculadora, calendario, lupa) */
.line-ico { width: 30px; height: 30px; fill: none; stroke: #7fd6a8; stroke-width: 1.6; stroke-linejoin: round; }
.calc-btn, .cal-btn, .search-btn { display: grid; place-items: center; color: inherit; }
.calc-btn { opacity: 1; }
.calc-btn.on .line-ico, .search-btn.on .line-ico { stroke: var(--accent); }
.search-btn .line-ico { width: 24px; height: 24px; }

/* Grupo desplegable de tarjetas */
.chev.up svg { transform: rotate(180deg); }
.item.group .chev, .opt.group .chev { margin-left: 4px; }
.dialog .group-items { margin-left: 18px; border-left: 2px solid rgba(31,255,122,.25); padding-left: 4px; }
.dialog .group-items .icon { width: 42px; height: 42px; font-size: 20px; }
.dialog .group-items .name { font-size: 17px; }

.group-body[hidden], .group-items[hidden] { display: none; }
.card.list > .group-body > * + * { border-top: 1px solid var(--line); }
.card.list > .group-body { border-top: 1px solid var(--line); }

/* Inversiones */
.num.invest { color: #7fd6ff; }
.invest-box { padding: 12px 16px; }
.invest-box .row { padding: 4px 0; font-size: 15px; }
.invest-box .row.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; font-weight: 700; color: #7fd6ff; }

/* Buscador de categorías */
.cat-search { display: flex; align-items: center; gap: 8px; margin: 12px 12px 0; padding: 0 12px; background: var(--card-2); border-radius: 12px; }
.cat-search .line-ico { width: 18px; height: 18px; }
.cat-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--text); font-size: 16px; padding: 11px 0; }
.cat-grid button[hidden] { display: none; }
