/* Bloques propios de las vistas: home, resumen, progreso, dólar y selector de themes. */
/* ---- buscador rápido del home ---- */
.home-search{ position:relative; margin-bottom:12px; }
.home-search .inp{ padding-left:40px; }
.home-search .hs-ic{ position:absolute; left:15px; top:50%; transform:translateY(-50%); color:var(--muted); font-size:14px; pointer-events:none; }

/* ---- meses en grilla (máx 3 columnas) ---- */
.month-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:12px; }
@media (max-width:359px){ .month-grid{ grid-template-columns:repeat(2,1fr); } }
.month-card{
  position:relative; text-align:left; cursor:pointer;
  background:var(--cream2); border:2.5px solid var(--lav-light); border-radius:16px;
  padding:11px 12px; font-family:var(--font); color:var(--ink);
}
.month-card .mc-name{ font-size:11.5px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--purple); }
.month-card .mc-val{ font-family:var(--font-display); font-weight:800; font-size:17px; margin-top:3px; color:var(--mint-dark); line-height:1.15; }
.month-card .mc-val.neg{ color:var(--red-dark); }
.month-card .mc-lbl{ font-size:11px; font-weight:700; color:var(--muted); margin-top:1px; }
.month-card.active{ background:var(--lav); border-color:var(--lav); }
.month-card.active .mc-name{ color:rgba(255,255,255,.85); }
.month-card.active .mc-val,
.month-card.active .mc-val.neg{ color:#fff; }
.month-card.active .mc-lbl{ color:rgba(255,255,255,.8); }
.month-card .mc-del{
  position:absolute; top:-8px; right:-6px; width:23px; height:23px; border-radius:50%;
  border:none; background:var(--pink-dark); color:#fff; font-size:12px; font-weight:800;
  display:none; align-items:center; justify-content:center; cursor:pointer; z-index:2;
}
.month-card.active .mc-del,
.month-grid:hover .mc-del{ display:flex; }
.month-card.add{
  border-style:dashed; background:transparent; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:2px; color:var(--purple);
  font-weight:800; font-size:13px; min-height:74px;
}
.month-card.add .plus{ font-size:18px; line-height:1; }

/* ---- nota del mes ---- */
.mes-nota{
  width:100%; font-family:var(--font); font-weight:600; font-size:14px; color:var(--ink);
  background:transparent; border:2px dashed var(--lav-light); border-radius:16px;
  padding:13px 15px; resize:vertical; min-height:52px; margin-bottom:12px; display:block;
}
.mes-nota::placeholder{ color:var(--muted); }
.mes-nota:focus{ outline:none; border-color:var(--lav); border-style:solid; }

/* ---- accesos rápidos del home ---- */
.quick-actions{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:16px; }
.quick-actions .qa{
  background:var(--pink-soft); border:2px solid var(--lav-light); border-radius:16px;
  padding:14px 10px; font-family:var(--font); font-weight:800; font-size:14px; color:var(--purple-dark);
  cursor:pointer; display:flex; align-items:center; justify-content:center; gap:7px;
}
.quick-actions .qa.wide{ grid-column:1 / -1; }
.quick-actions .qa:active{ transform:translateY(1px); }

/* ---- hero "te queda" summary ---- */
.summary-cards{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:9px; margin-bottom:14px; }
.sum-card{ background:var(--lav-soft); border:2px solid transparent; border-radius:16px; padding:11px 8px; text-align:center; }
.sum-card .val{ font-family:var(--font-display); font-size:17px; font-weight:800; color:var(--ink); }
.sum-card .lbl2{ font-size:10.5px; margin-bottom:3px; color:var(--muted); font-weight:800; }
.sum-card.is-gastos{ background:var(--red); border-color:var(--red); }
.sum-card.is-gastos .val,.sum-card.is-gastos .lbl2{ color:var(--red-dark); }
.sum-card.is-pend{ background:var(--peach); border-color:var(--peach); }
.sum-card.is-pend .val,.sum-card.is-pend .lbl2{ color:var(--peach-dark); }
.sum-card.is-queda{ background:var(--blue-soft); border-color:var(--blue-soft); }
.sum-card.is-queda .val,.sum-card.is-queda .lbl2{ color:var(--purple); }
.sum-card.is-queda .val.neg{ color:var(--red-dark); }

/* ---- progreso del mes ---- */
.prog-card{ background:var(--cream); border:var(--win-border) solid var(--lav-light); border-radius:var(--radius);
  padding:15px 16px; margin-bottom:16px; box-shadow:var(--shadow); }
.prog-card .pc-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:9px; }
.prog-card .pc-lbl{ font-size:13px; font-weight:800; color:var(--purple); }
.prog-card .pc-pct{ font-family:var(--font-display); font-size:14.5px; font-weight:800; color:var(--purple-dark); }
.prog-card .pc-legend{ display:flex; gap:14px; flex-wrap:wrap; margin-top:9px; font-size:12px; font-weight:700; color:var(--purple); }
.prog-card .pc-legend i{ width:9px; height:9px; border-radius:50%; display:inline-block; margin-right:5px; }
.hero{ background:var(--cream); border:var(--win-border) solid var(--lav-light); border-radius:var(--radius);
  padding:22px; margin-bottom:16px; box-shadow:var(--shadow); }
.hero .hero-top{ display:flex; justify-content:space-between; align-items:baseline; }
.hero .hero-lbl{ font-size:12px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); }
.hero .hero-sub{ font-size:12.5px; font-weight:700; color:var(--purple); }
.hero .hero-val{ font-family:var(--font-display); font-weight:800; font-size:42px; line-height:1; margin:10px 0 12px; }
.hero .hero-val .spark{ font-size:24px; color:var(--lav); }
.hero .hero-mini{ display:flex; gap:10px; margin-top:14px; }
.hero .hero-mini>div{ flex:1; background:var(--lav-soft); border-radius:14px; padding:11px 12px; }
.hero .hero-mini .m-lbl{ font-size:10.5px; font-weight:800; color:var(--muted); text-transform:uppercase; }
.hero .hero-mini .m-val{ font-family:var(--font-display); font-weight:800; font-size:17px; }

/* ---- dolar ---- */
.dolar-widget{ display:flex; gap:9px; }
.dolar-chip{ flex:1; background:var(--blue-soft); border-radius:14px; padding:10px 12px; font-family:var(--font-display); font-size:16px; font-weight:800; }
.dolar-chip .t{ color:var(--purple); font-family:var(--font); font-size:10.5px; font-weight:800; text-transform:uppercase; display:block; margin-bottom:2px; }

/* ---- theme selector grid (config) ---- */
.theme-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(96px,1fr)); gap:14px 12px; }
.theme-card{ text-align:center; cursor:pointer; }
.theme-swatch{
  position:relative; width:100%; aspect-ratio:1/1; overflow:hidden;
  border-radius:18px; border:2.5px solid var(--lav-light);
  /* hairline extra: los themes claros necesitan contorno propio sobre la card */
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.10);
  transition:border-color .15s ease, transform .12s ease;
}
.theme-card:active .theme-swatch{ transform:scale(.97); }
.theme-card.active .theme-swatch{ border-color:var(--purple); border-width:3px; }
/* trama (grid o puntitos) recortada dentro del cuadrado */
.theme-swatch .tpat{ position:absolute; inset:0; }
/* bolitas de acento abajo */
.theme-swatch .tdots{ position:absolute; left:0; right:0; bottom:8px; display:flex; justify-content:center; gap:6px; }
.theme-swatch .tdots i{ width:12px; height:12px; border-radius:50%; display:block;
  box-shadow:0 0 0 1.5px rgba(255,255,255,.8), 0 0 0 2.6px rgba(0,0,0,.12); }
/* tilde de seleccionado */
.theme-swatch .tcheck{
  position:absolute; top:7px; right:7px; width:24px; height:24px; border-radius:50%;
  background:var(--purple); color:#fff; font-size:13px; font-weight:900;
  display:none; align-items:center; justify-content:center;
}
.theme-card.active .theme-swatch .tcheck{ display:flex; }
/* el nombre siempre sobre el color de texto de la card (no --muted, que en
   varios themes queda casi ilegible); el activo va full opacidad */
.theme-card .tname{ font-size:12.5px; font-weight:800; margin-top:8px; color:var(--ink); opacity:.62; }
.theme-card.active .tname{ opacity:1; }
.theme-card .tdesc{ font-size:10px; color:var(--muted); font-weight:700; }
/* placeholder "próximamente" */
.theme-card.soon{ cursor:default; }
.theme-card.soon .theme-swatch{
  border:2.5px dashed var(--muted); background:transparent; box-shadow:none; opacity:.5;
  display:flex; align-items:center; justify-content:center;
  font-size:22px; color:var(--ink); font-weight:400;
}
