:root { --fondo: #0d0f0e; --panel: #171a19; --panel2: #1f2321; --linea: #2a2f2c; --tinta: #f2f4f2; --gris: #9aa39e;
  --acento: #3ee6a4; --sobre: #06130d; --gasto: #ff7a6e; --ingreso: #3ee6a4; --aviso: #ffc65c;
  --seg-arriba: env(safe-area-inset-top); --seg-abajo: env(safe-area-inset-bottom); }
[hidden] { display: none !important; }
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--fondo); color: var(--tinta); font: 16px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; }
body { padding: calc(var(--seg-arriba) + 14px) 16px calc(var(--seg-abajo) + 96px); min-height: 100vh; overscroll-behavior-y: none; }
h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; margin: 6px 0 14px; }
h2 { font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--gris); margin: 22px 4px 8px; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--tinta); background: var(--panel2); border: 1px solid var(--linea); border-radius: 12px; padding: 12px; width: 100%; }
textarea { min-height: 90px; resize: vertical; }
label { display: block; font-size: 13px; color: var(--gris); margin: 12px 2px 6px; }
.tarjeta { background: var(--panel); border: 1px solid var(--linea); border-radius: 20px; padding: 16px; margin-bottom: 12px; }
.fila { display: flex; align-items: center; gap: 12px; }
.fila > .crece { flex: 1; min-width: 0; }
.entre { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.gris { color: var(--gris); } .peq { font-size: 13px; } .grande { font-size: 34px; font-weight: 800; letter-spacing: -1px; }
.gasto { color: var(--gasto); } .ingreso { color: var(--ingreso); } .avisoc { color: var(--aviso); }
.num { font-variant-numeric: tabular-nums; }
.tres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.tres div { background: var(--panel2); border-radius: 14px; padding: 10px; } .tres b { display: block; font-size: 17px; }
.barra { height: 8px; border-radius: 99px; background: var(--panel2); overflow: hidden; margin-top: 8px; }
.barra i { display: block; height: 100%; border-radius: 99px; background: var(--acento); }
.barra i.pasa { background: var(--gasto); } .barra i.cerca { background: var(--aviso); }
.mov { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--linea); }
.mov:last-child { border-bottom: 0; }
.ico { width: 40px; height: 40px; border-radius: 12px; background: var(--panel2); display: grid; place-items: center; font-size: 20px; flex: none; }
.mov .imp { font-weight: 700; white-space: nowrap; }
.dia { font-size: 13px; color: var(--gris); margin: 14px 4px 2px; }
.boton { display: block; width: 100%; text-align: center; background: var(--acento); color: var(--sobre); font-weight: 800; padding: 14px; border-radius: 14px; margin-top: 16px; }
.boton.sec { background: var(--panel2); color: var(--tinta); font-weight: 600; }
.boton.peligro { background: transparent; color: var(--gasto); border: 1px solid var(--linea); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 12px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--linea); font-size: 14px; }
.chip.si { background: var(--acento); color: var(--sobre); border-color: var(--acento); font-weight: 700; }
.selector { display: flex; background: var(--panel2); border-radius: 12px; padding: 4px; gap: 4px; }
.selector button { flex: 1; padding: 9px; border-radius: 9px; font-weight: 600; color: var(--gris); }
.selector button.si { background: var(--panel); color: var(--tinta); }
.importe { font-size: 44px; font-weight: 800; text-align: center; background: transparent; border: 0; padding: 6px; }
.mesnav { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.mesnav button { width: 40px; height: 40px; border-radius: 12px; background: var(--panel); font-size: 20px; }
.mesnav b { font-weight: 700; }
.vacio { text-align: center; color: var(--gris); padding: 26px 10px; }
.donut { display: flex; align-items: center; gap: 16px; }
.leyenda { flex: 1; font-size: 14px; } .leyenda div { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.leyenda i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.barras { display: flex; align-items: flex-end; gap: 8px; height: 120px; margin-top: 10px; }
.barras > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; font-size: 11px; color: var(--gris); }
.barras span { width: 100%; border-radius: 6px 6px 2px 2px; background: var(--gasto); min-height: 2px; }
.barras span.ing { background: var(--ingreso); }
.par { display: flex; gap: 3px; width: 100%; align-items: flex-end; height: 96px; }
.par span { flex: 1; width: auto; }
#barra { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: rgba(13,15,14,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--linea); padding: 6px 4px calc(var(--seg-abajo) + 6px); z-index: 5; }
#barra button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--gris); padding: 4px 0; }
#barra button span { font-size: 20px; line-height: 1; }
#barra button.activa { color: var(--acento); }
#mas { position: fixed; right: 18px; bottom: calc(var(--seg-abajo) + 78px); width: 60px; height: 60px; border-radius: 50%; background: var(--acento); color: var(--sobre);
  font-size: 34px; font-weight: 300; box-shadow: 0 10px 30px rgba(0,0,0,.5); z-index: 6; }
#hoja { position: fixed; inset: 0; z-index: 10; }
#hoja .fondo { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
#hoja .panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow-y: auto; background: var(--panel); border-radius: 24px 24px 0 0;
  padding: 18px 16px calc(var(--seg-abajo) + 18px); animation: sube .22s ease-out; }
@keyframes sube { from { transform: translateY(40px); opacity: .4; } }
.cabhoja { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.cabhoja b { font-size: 19px; } .cabhoja button { color: var(--gris); font-size: 15px; padding: 6px; }
#aviso { position: fixed; left: 16px; right: 16px; bottom: calc(var(--seg-abajo) + 90px); background: var(--panel2); border: 1px solid var(--linea); padding: 12px 14px;
  border-radius: 14px; z-index: 20; text-align: center; font-size: 15px; }
#bloqueo { position: fixed; inset: 0; z-index: 50; background: var(--fondo); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 30px; }
.puntos { display: flex; gap: 14px; } .puntos i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--gris); }
.puntos i.si { background: var(--acento); border-color: var(--acento); }
.teclado { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px; }
.teclado button { height: 76px; border-radius: 50%; background: var(--panel); font-size: 28px; font-weight: 500; }
.codigo { font: 700 24px ui-monospace, Menlo, monospace; letter-spacing: 2px; text-align: center; background: var(--panel2); border-radius: 14px; padding: 16px; user-select: all; -webkit-user-select: all; }
.pildora { font-size: 12px; padding: 3px 8px; border-radius: 99px; background: var(--panel2); color: var(--gris); }
.check { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--linea); flex: none; display: grid; place-items: center; font-size: 14px; }
.check.si { background: var(--acento); border-color: var(--acento); color: var(--sobre); }
