:root {
  --ink: #0e1e26;
  --muted: #5e676d;
  --primary: #0f766e;
  --primary-dark: #0b5e57;
  --line: #e4e0d6;
  --soft: #f1f5f3;
  --good: #18714e;
  --bad: #b13242;
  /* Código de color de montos (contraste AA sobre papel y blanco). */
  --income: #18714e;
  --expense: #9a5500;
  --negative: #b13242;
  --balance: #1d5fa8;
  --radius: 12px;
  font-family:
    Inter,
    "Avenir Next",
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--ink);
  background: #fff;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: var(--primary-dark);
  text-underline-offset: 3px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
:focus-visible {
  outline: 3px solid #0b5e57;
  outline-offset: 4px;
}
svg.icon {
  height: 22px;
  width: 22px;
  flex-shrink: 0;
  fill: currentColor;
}
.topbar {
  max-width: 1440px;
  margin: auto;
  padding: 40px 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  min-height: 44px;
  font-size: 25px;
  letter-spacing: -0.7px;
  font-weight: 750;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
}
.brand svg {
  width: 36px;
  height: 30px;
  fill: var(--primary);
}
#headerActions {
  font-size: 15px;
  color: var(--muted);
}
#headerActions a {
  font-weight: 650;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.welcome {
  max-width: 1440px;
  margin: 28px auto 0;
  padding: 0 58px 36px;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 70px;
}
.apply {
  border-left: 1px solid var(--line);
  padding-left: 70px;
}
.apply h2 {
  font-size: 43px;
  letter-spacing: -1.6px;
  line-height: 1.15;
  margin: 9px 0 12px;
}
.lede {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 24px;
}
form {
  display: grid;
  gap: 19px;
}
label {
  display: grid;
  gap: 8px;
  font-size: 15px;
  font-weight: 650;
}
.input-wrap {
  position: relative;
}
.input-wrap svg {
  position: absolute;
  left: 16px;
  top: 15px;
  color: var(--muted);
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.input-wrap input {
  padding-left: 48px;
}
input,
select {
  width: 100%;
  min-height: 52px;
  padding: 12px 15px;
  border: 1px solid #d6d2c8;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 16px;
}
input::placeholder {
  color: #5e676d;
}
input[aria-invalid="true"] {
  border-color: var(--bad);
}
.phone {
  display: grid;
  grid-template-columns: 125px 1fr;
  gap: 10px;
}
.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-weight: 400;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  margin-top: 3px;
}
.consent input {
  width: 20px;
  height: 20px;
  min-height: 20px;
  flex-shrink: 0;
  margin: 2px 0;
  accent-color: var(--primary);
}
.primary,
.secondary,
.danger {
  border: 0;
  border-radius: 8px;
  min-height: 48px;
  padding: 13px 22px;
  font-weight: 650;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
}
.primary {
  background: var(--primary);
  color: #fff;
}
.primary:hover {
  background: var(--primary-dark);
}
.secondary {
  background: var(--soft);
  color: var(--ink);
}
.danger {
  background: #fff0f1;
  color: var(--bad);
}
.steps {
  list-style: none;
  margin: 25px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  text-align: center;
}
.steps li {
  font-size: 14px;
}
.steps .step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e3efeb;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  margin: 0 auto 12px;
  color: var(--primary);
}
.steps small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 5px;
}
.error {
  color: var(--bad);
  background: #fff2f3;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.error:empty {
  display: none;
}
.quiet {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.center-page {
  max-width: 560px;
  margin: 60px auto;
  padding: 0 24px 60px;
}
.center-page h1 {
  font-size: 36px;
  letter-spacing: -1px;
}
.center-page .primary {
  width: 100%;
}
.status-icon {
  width: 60px;
  height: 60px;
  background: var(--soft);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--primary);
}
.status-icon svg {
  width: 28px;
  height: 28px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.status-list {
  padding: 20px;
  background: var(--soft);
  border-radius: 12px;
  line-height: 2;
}
.workspace {
  max-width: 1360px;
  margin: 10px auto 50px;
  padding: 0 38px;
}
.workspace-top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}
.workspace h1 {
  font-size: 36px;
  letter-spacing: -1.2px;
  margin: 15px 0 5px;
}
.workspace nav {
  display: flex;
  gap: 28px;
  margin: 28px 0;
  border-bottom: 1px solid var(--line);
  overflow: auto;
}
.workspace nav a {
  padding: 12px 0;
  text-decoration: none;
  color: var(--muted);
  white-space: nowrap;
}
.workspace nav a.active {
  color: var(--primary-dark);
  border-bottom: 3px solid var(--primary);
  font-weight: 700;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 25px 0 34px;
  border-bottom: 1px solid var(--line);
}
.metric small {
  display: block;
  color: var(--muted);
  margin-bottom: 9px;
}
.metric strong {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
}
.metric .quiet {
  margin: 6px 0 0;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 28px 0 20px;
}
.section-title h2 {
  font-size: 21px;
  margin: 0;
}
.month {
  width: auto;
  min-width: 160px;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
th {
  text-align: left;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 18px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
td:first-child {
  font-weight: 600;
}
.amount {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.positive,
.amt-income {
  color: var(--income);
}
.amt-expense {
  color: var(--expense);
}
.amt-negative {
  color: var(--negative);
}
.amt-balance {
  color: var(--balance);
}
.empty {
  padding: 55px 24px;
  text-align: center;
  background: #f7f8f5;
  border-radius: 12px;
}
.empty h2 {
  font-size: 22px;
}
.empty p {
  color: var(--muted);
  line-height: 1.6;
  max-width: 460px;
  margin: 12px auto 22px;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.account-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.account {
  padding: 24px;
  background: var(--soft);
  border-radius: 12px;
}
.account strong {
  font-size: 26px;
  display: block;
  margin-top: 18px;
}
.pill {
  display: inline-block;
  border-radius: 20px;
  padding: 5px 11px;
  background: #e3efeb;
  color: var(--primary-dark);
  font-size: 12px;
}
.bar {
  height: 9px;
  accent-color: var(--income);
  width: 100%;
}
.bar.warn {
  accent-color: var(--expense);
}
.bar.over {
  accent-color: var(--negative);
}
.budget-row {
  margin: 20px 0;
}
.budget-row header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 10px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.wide {
  grid-column: 1/-1;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  max-width: 560px;
  width: calc(100% - 32px);
  max-height: 90vh;
  color: var(--ink);
}
dialog::backdrop {
  background: #0e1e2666;
}
dialog h2 {
  margin: 12px 0 10px;
}
.close {
  float: right;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 14px;
  padding: 8px;
}
#modalContent {
  clear: both;
  padding-top: 4px;
}
.privacy p,
.privacy li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}
.privacy h3 {
  font-size: 17px;
}
#notice:not(:empty) {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  padding: 16px 24px;
  z-index: 10;
  max-width: 90vw;
  box-shadow: 0 5px 22px #0e1e2622;
}
.skip {
  position: fixed;
  top: -100px;
  left: 12px;
  padding: 12px;
  background: white;
  z-index: 20;
}
.skip:focus {
  top: 8px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.link-button {
  border: 0;
  background: none;
  color: var(--primary-dark);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font: inherit;
}
.loading {
  padding: 80px 24px;
  text-align: center;
  color: var(--muted);
}
@media (min-width: 1500px) {
  .welcome {
    margin-top: 40px;
  }
}
@media (max-width: 1100px) {
  .topbar {
    padding: 28px 32px;
  }
  .welcome {
    padding: 0 32px 32px;
    gap: 36px;
  }
  .apply {
    padding-left: 36px;
  }
  .apply h2 {
    font-size: 34px;
  }
  .lede {
    font-size: 16px;
  }
  .brand {
    font-size: 22px;
  }
}
@media (max-width: 760px) {
  .topbar {
    padding: 24px 20px;
    align-items: flex-start;
  }
  .brand {
    font-size: 19px;
    gap: 8px;
  }
  .brand svg {
    width: 27px;
    height: 24px;
  }
  #headerActions {
    font-size: 13px;
    text-align: right;
  }
  #headerActions span {
    display: none;
  }
  .welcome {
    display: flex;
    flex-direction: column;
    margin: 16px auto 0;
    padding: 0 24px 36px;
    gap: 28px;
  }
  .apply {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 24px 0 0;
  }
  .apply h2 {
    font-size: 30px;
    margin-top: 0;
  }
  .lede {
    font-size: 16px;
  }
  .steps {
    gap: 8px;
  }
  .steps small {
    font-size: 11px;
  }
  .phone {
    grid-template-columns: 112px 1fr;
  }
  .center-page {
    margin-top: 35px;
  }
  .workspace {
    padding: 0 20px;
  }
  .workspace-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  .workspace h1 {
    font-size: 29px;
  }
  .workspace nav {
    gap: 22px;
  }
  .metrics {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .metric strong {
    font-size: 29px;
  }
  .two-col,
  .account-list {
    grid-template-columns: 1fr;
  }
  .section-title {
    flex-wrap: wrap;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .wide {
    grid-column: auto;
  }
  td,
  th {
    padding: 14px 8px;
  }
  dialog {
    padding: 20px;
  }
  .topbar .actions {
    gap: 8px;
  }
}
/* Local fonts and reference-aligned registration rhythm. */
@font-face {
  font-family: Inter;
  src: url("../assets/inter-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("../assets/inter-bold.woff2") format("woff2");
  font-weight: 600 900;
  font-display: swap;
}
input,
select {
  font-weight: 400;
}
.apply form {
  gap: 22px;
}
.apply label {
  font-size: 16px;
}
.apply .consent {
  font-size: 15px;
}
.apply input,
.apply select {
  min-height: 55px;
}
.apply .consent input {
  min-height: 20px;
}
.apply .primary {
  min-height: 56px;
}
.apply .lede {
  margin-bottom: 28px;
}
@media (min-width: 1101px) {
  .apply h2 {
    font-size: 44px;
  }
}
@media (min-width: 1101px) {
  .welcome {
    grid-template-columns: 1fr 1fr;
  }
  .apply {
    padding-left: 86px;
  }
  .apply h2 {
    font-size: 46px;
    margin-top: 15px;
  }
  .apply form {
    gap: 25px;
  }
}
.sr-only {
  top: 0;
  left: 0;
}
.table-wrap,
.workspace nav {
  position: relative;
}
@media (min-width: 1101px) {
  .apply .lede {
    max-width: 500px;
  }
}
@media (max-width: 760px) {
  .transactions,
  .transactions tbody {
    display: block;
    width: 100%;
  }
  .transactions thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    top: 0;
    left: 0;
  }
  .transactions tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 12px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
  }
  .transactions td {
    border: 0;
    padding: 0;
    overflow-wrap: anywhere;
    font-size: 12px;
    color: var(--muted);
  }
  .transactions td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    font-size: 15px;
    color: var(--ink);
  }
  .transactions td:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }
  .transactions td:nth-child(3) {
    grid-column: 1;
    grid-row: 3;
  }
  .transactions td:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
    text-align: right;
  }
  .transactions td:nth-child(5) {
    grid-column: 2;
    grid-row: 1;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
  }
  .transactions td:nth-child(5).positive {
    color: var(--good);
  }
  .transactions td:nth-child(6) {
    grid-column: 2;
    grid-row: 3;
    text-align: right;
  }
}
@media (max-width: 760px) {
  .phone {
    grid-template-columns: 124px 1fr;
  }
}
textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #d6d2c8;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font:
    400 16px Inter,
    system-ui,
    sans-serif;
  resize: vertical;
  line-height: 1.5;
}
.settings-page {
  max-width: 720px;
}

.topbar {
  gap: 16px;
  flex-wrap: wrap;
}

/* Portada (sistema Cauce, docs/ulua-money/mockups/v2/README.md). */
@font-face {
  font-family: "Instrument Serif";
  src: url("../assets/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
:root:has(.landing) #headerActions {
  color: #5e676d;
}
:root:has(.landing) #headerActions a {
  color: #0b5e57;
}
:root:has(.landing) .brand svg {
  fill: #0f766e;
}
.landing {
  --paper: #f4f2ec;
  --teal: #0f766e;
  --mute: #5e676d;
  max-width: 1200px;
  margin: 8px auto 0;
  padding: 0 58px 56px;
  color: #0e1e26;
}
.hero {
  display: grid;
  grid-template-columns: 1fr minmax(0, 560px);
  grid-template-areas: "title card" "text card" "actions card";
  grid-template-rows: auto auto 1fr;
  column-gap: 72px;
  align-items: start;
}
.hero h1 {
  grid-area: title;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: 84px;
  line-height: 1;
  letter-spacing: -1px;
  margin: 24px 0 20px;
}
.hero > p {
  grid-area: text;
  font-size: 20px;
  line-height: 1.5;
  color: var(--mute);
  max-width: 480px;
  margin: 0;
}
.hero-actions {
  grid-area: actions;
  margin-top: 36px;
  display: grid;
  gap: 14px;
  justify-items: start;
}
.hero-actions .primary {
  background: var(--teal);
  min-height: 56px;
  min-width: 44px;
  padding: 14px 28px;
  border-radius: 16px;
  font-size: 17px;
}
.hero-actions .primary:hover {
  background: #0b5e57;
}
.hero-actions .quiet {
  color: var(--mute);
  font-size: 15px;
  margin: 0;
}
.hero-actions h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: 36px;
  margin: 0;
}
.hero-actions .lede {
  color: var(--mute);
  margin: 0;
}
.hero-art {
  grid-area: card;
  display: block;
  width: 100%;
  height: auto;
}
.apply-page {
  grid-template-columns: minmax(0, 640px);
  justify-content: center;
}
.apply-page .apply {
  border: 0;
  padding: 0;
}
/* El título recibe el foco al abrir la solicitud; no es un control. */
#applyTitle:focus {
  outline: none;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 650;
  text-decoration: none;
}
@media (max-width: 1100px) {
  .landing {
    padding: 0 32px 40px;
  }
  .hero {
    column-gap: 40px;
  }
  .hero h1 {
    font-size: 64px;
  }
}
@media (max-width: 760px) {
  .landing {
    padding: 0 20px 32px;
    margin-top: 0;
  }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "title" "text" "card" "actions";
  }
  .hero h1 {
    font-size: 46px;
    margin: 4px 0 10px;
  }
  .hero > p {
    font-size: 16px;
  }
  .hero-art {
    margin-top: 8px;
  }
  .hero-actions {
    margin-top: 20px;
    justify-items: stretch;
    text-align: center;
  }
  .apply-page .apply {
    border-top: 0;
    padding-top: 0;
  }
}

/* Hidden fields must remain hidden even when form labels use display:grid. */
[hidden] {
  display: none !important;
}
/* Cuenta con el sistema Cauce (docs/ulua-money/mockups/v2/README.md): Inicio, Movimientos, Cuentas, Más. */
@font-face {
  font-family: "DM Mono";
  src: url("../assets/dm-mono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
:root:has(.app-v2),
:root:has(.app-v2) body {
  background: #f4f2ec;
}
:root:has(.app-v2) .topbar {
  background: transparent;
}
.app-v2 {
  max-width: 1080px;
  margin: 0 auto;
  padding: 4px 24px 140px;
}
.app-v2 .eyebrow,
.app-v2 .day h2 {
  font-family: "DM Mono", ui-monospace, monospace;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5e676d;
  margin: 0;
}
.app-v2 .greet,
.app-v2 .page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin: 20px 0 22px;
}
.app-v2 h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: 52px;
  line-height: 1.05;
  letter-spacing: -0.5px;
  margin: 6px 0 0;
}
.app-v2 .page-tools {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e4e0d6;
  color: #0e1e26;
  padding: 0;
  cursor: pointer;
}
.icon-btn.small {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #5e676d;
}
.icon-btn:hover {
  border-color: #c9c4b8;
}
.month-btn input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  min-height: 0;
  padding: 0;
  border: 0;
}
.month-btn:focus-within {
  outline: 3px solid #0b5e57;
  outline-offset: 3px;
}
.vault {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 26px 26px 20px;
  color: #fff;
  background-color: #0d3b38;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='240' fill='none' stroke='%238FE3C6' stroke-opacity='.13' stroke-width='1'%3E%3Cpath d='M0 30c60-14 120 12 200-2s140 10 200-4'/%3E%3Cpath d='M0 70c70-16 130 14 210 0s130 12 190-2'/%3E%3Cpath d='M0 110c60-10 140 16 220 2s120 8 180-6'/%3E%3Cpath d='M0 150c80-18 130 12 200 0s150 14 200 0'/%3E%3Cpath d='M0 190c60-12 140 14 210 2s130 10 190-4'/%3E%3Cpath d='M0 230c70-14 120 10 200 0s140 12 200-2'/%3E%3C/svg%3E");
  background-size: 400px 240px;
}
.vault .eyebrow {
  color: #9cc3be;
}
.vault-total {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 68px;
  line-height: 1;
  letter-spacing: -1px;
  margin: 16px 0 12px;
  font-variant-numeric: tabular-nums;
}
.vault-total small {
  font-size: 0.55em;
  color: #9cc3be;
}
.vault-total.pos {
  color: #a9cfff;
}
.vault-total.neg {
  color: #ff9e9e;
}
.vault-sub {
  margin: 0;
  color: #d4e5e2;
}
.vault-sub strong {
  color: #fff;
}
.vault-flow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 22px 0 6px;
}
.vault-flow > div + div {
  border-left: 1px solid rgba(143, 227, 198, 0.3);
  padding-left: 22px;
}
.vault-flow strong {
  display: block;
  font-size: 26px;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}
.vault-flow .in {
  color: #8fe3c6;
}
.vault-flow .out {
  color: #f5c878;
}
.spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 64px;
  margin-top: 18px;
}
.spark i {
  flex: 1;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.4);
}
.spark i.zero {
  background: rgba(255, 255, 255, 0.18);
}
.spark i.future {
  background: rgba(255, 255, 255, 0.22);
}
.spark i.today {
  background: #8fe3c6;
}
.spark-axis {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #9cc3be;
}
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 28px;
  align-items: start;
}
.app-v2 .section-title {
  margin: 30px 0 14px;
}
.app-v2 .section-title h2 {
  font-size: 21px;
}
.app-v2 .section-title a {
  font-weight: 700;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.app-v2 .card {
  background: #fff;
  border-radius: 22px;
  padding: 6px 22px;
  margin: 0;
}
.card-empty {
  padding: 14px 0;
}
.mov-list,
.more-list {
  list-style: none;
}
.mov {
  display: grid;
  width: 100%;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #efece4;
}
li:last-child > .mov,
.more-list li:last-child .more-item {
  border-bottom: 0;
}
.mov-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #e3efeb;
  color: #0b5e57;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
}
.mov-text strong {
  display: block;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mov-text small {
  display: block;
  color: #5e676d;
  font-size: 13px;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mov-amt {
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.app-v2 .budget-row {
  margin: 0;
  padding: 16px 0;
  border-bottom: 1px solid #efece4;
}
.app-v2 .budget-row:last-child {
  border-bottom: 0;
}
.app-v2 .budget-row .quiet {
  margin: 8px 0 0;
}
.app-v2 .bar {
  appearance: none;
  height: 8px;
  border: 0;
  border-radius: 8px;
  background: #ece8de;
  overflow: hidden;
}
.app-v2 .bar::-webkit-progress-bar {
  background: #ece8de;
  border-radius: 8px;
}
.app-v2 .bar::-webkit-progress-value {
  background: var(--income);
  border-radius: 8px;
}
.app-v2 .bar::-moz-progress-bar {
  background: var(--income);
}
.app-v2 .bar.warn::-webkit-progress-value {
  background: var(--expense);
}
.app-v2 .bar.warn::-moz-progress-bar {
  background: var(--expense);
}
.app-v2 .bar.over::-webkit-progress-value {
  background: var(--negative);
}
.app-v2 .bar.over::-moz-progress-bar {
  background: var(--negative);
}
.month-sum {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-weight: 600;
  margin: 0 0 6px;
}
.app-v2 .day h2 {
  margin: 22px 0 10px;
}
.app-v2 .account-list {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.app-v2 .account.card {
  padding: 22px;
}
.app-v2 .account h2 {
  margin: 14px 0 0;
  font-size: 19px;
}
.account-balance {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 40px;
  margin: 10px 0 4px;
}
.profile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 22px !important;
  margin-bottom: 16px !important;
}
.more-list {
  padding: 4px 0 !important;
}
.more-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 60px;
  padding: 0 22px;
  background: none;
  border: 0;
  border-bottom: 1px solid #efece4;
  color: #0e1e26;
  font-size: 16px;
  text-decoration: none;
  text-align: left;
}
.more-item span {
  flex: 1;
}
.more-item svg:last-child {
  color: #8e959a;
  width: 16px;
}
.app-v2 .empty {
  background: #fff;
  border-radius: 22px;
}
.tabbar {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 32px));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  background: #fff;
  border: 1px solid #e4e0d6;
  border-radius: 24px;
  padding: 6px 8px;
  box-shadow: 0 10px 30px rgba(14, 30, 38, 0.1);
}
.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 56px;
  font-size: 12px;
  color: #5e676d;
  text-decoration: none;
}
.tabbar a[aria-current] {
  color: #0b5e57;
  font-weight: 700;
}
.fab {
  justify-self: center;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-top: -26px;
  border: 0;
  border-radius: 22px;
  background: #0f766e;
  color: #fff;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.35);
}
.fab:hover {
  background: #0b5e57;
}
.fab svg {
  width: 28px;
  height: 28px;
}
.fab-label {
  display: none;
}
@media (max-width: 900px) {
  .home-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
@media (max-width: 760px) {
  :root:has(.app-v2) .topbar {
    display: none;
  }
  .app-v2 {
    padding: 0 20px 130px;
  }
  .app-v2 h1 {
    font-size: 44px;
  }
  .app-v2 .greet,
  .app-v2 .page-head {
    margin-top: 28px;
  }
  .app-v2 .page-head {
    flex-wrap: wrap;
  }
  .vault {
    padding: 22px 20px 18px;
  }
  .vault-total {
    font-size: 54px;
  }
  .vault-flow strong {
    font-size: 22px;
  }
  .app-v2 .card {
    padding: 4px 18px;
  }
  .mov {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 12px;
  }
  .mov-icon {
    width: 44px;
    height: 44px;
  }
  .tabbar {
    left: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    border-radius: 0;
    border-width: 1px 0 0;
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
    box-shadow: none;
  }
}
.spark-today {
  position: absolute;
  transform: translateX(-50%);
}
button.mov {
  cursor: pointer;
  min-height: 72px;
}
button.mov:hover .mov-text strong {
  text-decoration: underline;
}
.app-v2 .budget-row header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}
.app-v2 .budget-row header strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-v2 .budget-row header > span {
  white-space: nowrap;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.vault-flow > div {
  min-width: 0;
}
.vault-flow strong {
  font-size: clamp(16px, 4.4vw, 26px);
  white-space: nowrap;
}
/* Registrar como hoja inferior (mockup v2, registrar.png). */
dialog.sheet {
  background: #f4f2ec;
  border: 0;
  border-radius: 28px;
  max-width: 520px;
  padding: 18px 22px 22px;
}
dialog.sheet .close {
  min-height: 44px;
}
.reg-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.reg-form .eyebrow {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5e676d;
}
.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 5px;
  margin: 0;
  border: 0;
  border-radius: 16px;
  background: #e8e4da;
}
.segmented label {
  position: relative;
  display: block;
}
.segmented input,
.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.segmented span {
  display: grid;
  place-items: center;
  min-height: 46px;
  border-radius: 12px;
  font-weight: 700;
  color: #5e676d;
}
.segmented input:checked + span {
  background: #fff;
  color: #0e1e26;
  box-shadow: 0 1px 3px rgba(14, 30, 38, 0.12);
}
.segmented input:focus-visible + span,
.chip input:focus-visible + span {
  outline: 3px solid #0b5e57;
  outline-offset: 2px;
}
.amount-field {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 6px 0 0;
}
.amount-field input {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: center;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 76px;
  line-height: 1.1;
  padding: 0;
  min-height: 0;
  color: #0e1e26;
  caret-color: #0f766e;
  font-variant-numeric: tabular-nums;
}
.amount-field input::placeholder {
  color: #b9b4a8;
}
.amount-field input:focus {
  outline: none;
}
.amount-field:focus-within input {
  box-shadow: inset 0 -3px 0 #0f766e;
}
.reg-form[data-kind="income"] .amount-field input {
  color: var(--income);
}
.reg-form[data-kind="expense"] .amount-field input {
  color: var(--expense);
}
.desc-field input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #d6d2c8;
  border-radius: 0;
  background: transparent;
  text-align: center;
  font-size: 17px;
  color: #0e1e26;
  min-height: 48px;
}
.desc-field input:focus {
  outline: none;
  border-bottom-color: #0f766e;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}
.chips legend {
  margin-bottom: 12px;
  padding: 0;
}
.chip {
  position: relative;
  display: inline-flex;
}
.chip[hidden] {
  display: none;
}
.chip > span,
button.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid #e4e0d6;
  background: #fff;
  font-weight: 700;
  font-size: 15px;
  color: #0e1e26;
}
.chip input:checked + span {
  background: #0e1e26;
  border-color: #0e1e26;
  color: #fff;
}
.reg-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.reg-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  border-radius: 18px;
  background: #fff;
}
.reg-box[hidden] {
  display: none;
}
.reg-box select,
.reg-box input {
  border: 0;
  padding: 0;
  min-height: 32px;
  background: transparent;
  font-weight: 700;
  font-size: 16px;
  color: #0e1e26;
  width: 100%;
}
.reg-box:focus-within {
  outline: 3px solid #0b5e57;
  outline-offset: 2px;
}
.reg-box select:focus,
.reg-box input:focus {
  outline: none;
}
.reg-save {
  min-height: 58px;
  border-radius: 18px;
  font-size: 18px;
}
@media (max-width: 760px) {
  dialog.sheet {
    margin: auto 0 0;
    width: 100%;
    max-width: none;
    max-height: 94vh;
    border-radius: 28px 28px 0 0;
    padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
  }
  .amount-field input {
    font-size: 64px;
  }
  .reg-pair:has(#destinationField:not([hidden])) {
    grid-template-columns: 1fr 1fr;
  }
}
/* Botones del encabezado de la cuenta: 44 px (mínimo táctil), íconos de 20 px. */
.app-v2 .page-tools .icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}
.app-v2 .page-tools .icon-btn svg.icon {
  width: 20px;
  height: 20px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  background: none;
  color: #0b5e57;
  font-weight: 700;
  font-size: 15px;
}
.share-btn svg.icon {
  width: 18px;
  height: 18px;
}
/* Regla de diseño (Osman, 2026-10-12): los contenedores no cambian de alto según los datos. La lista de
   Registrar mide lo mismo en Gasto, Ingreso y Transferir y se desplaza por dentro. */
.picker {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.picker[hidden] {
  display: none;
}
.picker legend {
  padding: 0;
  margin-bottom: 10px;
}
.picker-list {
  height: 196px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  border-radius: 18px;
  padding: 4px;
}
.pick {
  position: relative;
  display: block;
}
.pick input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.pick > span {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 47px;
  padding: 0 14px;
  border-radius: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pick input:checked + span {
  background: #0e1e26;
  color: #fff;
}
.pick input:focus-visible + span {
  outline: 3px solid #0b5e57;
  outline-offset: -3px;
}
.pick-emoji {
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}
/* El mensaje de error reserva su espacio: la hoja no salta al aparecer. */
.reg-form .error {
  display: block;
  min-height: 46px;
  margin: 0;
}
.reg-form .error:empty {
  visibility: hidden;
}
