/* jordiaz — noche de aurora: violeta, coral Spartan, ámbar y turquesa de Bali */
:root {
  --noche: #120E2A;
  --noche-2: #1B1640;
  --violeta: #7C5CFF;
  --coral: #FF6B5A;
  --ambar: #FFB547;
  --turquesa: #2DD4BF;
  --texto: #EDEBFF;
  --suave: #A9A3D6;
  --cristal: rgba(255, 255, 255, 0.07);
  --cristal-borde: rgba(255, 255, 255, 0.14);
  --positivo: #4ADE9B;
  --negativo: #FF7A8A;
  --aviso: var(--ambar);
  --acento: var(--violeta);
  --borde: rgba(255, 255, 255, 0.10);
  --radio-grande: 28px;
  --radio: 18px;
  --sombra: 0 20px 60px -20px rgba(8, 4, 30, 0.8);
  --p-hoy: #FFE9A0;
  --p-dinero: #B5EBCB;
  --p-casa: #FFD3A6;
  --p-papeles: #BDD6FF;
  --p-familia: #FFC2DA;
  --p-crecer: #D9C6FF;
  --sobre-pastel: #241B4D;
  --g-fondo: 30%;
  --g-texto: 100%;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --noche: #F1EEFF;
    --noche-2: #E6E0FF;
    --texto: #1C1640;
    --suave: #5E5794;
    --cristal: rgba(255, 255, 255, 0.62);
    --cristal-borde: rgba(124, 92, 255, 0.22);
    --positivo: #0F9D63;
    --negativo: #D93A50;
    --borde: rgba(28, 22, 64, 0.10);
    --sombra: 0 20px 50px -24px rgba(60, 40, 160, 0.35);
    --g-fondo: 62%;
    --g-texto: 0%;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--noche);
  color: var(--texto);
  font: 16px/1.55 "Manrope", system-ui, sans-serif;
  overflow-x: hidden;
}
a { color: var(--turquesa); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--ambar); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: "Bricolage Grotesque", "Manrope", sans-serif; line-height: 1.05; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: 1.35rem; font-weight: 700; }
small { display: block; color: var(--suave); font-size: .82rem; }
code { background: var(--cristal); padding: 2px 7px; border-radius: 8px; }

/* ---------- fondo vivo ---------- */
.fondo { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(120% 80% at 50% 0%, var(--noche-2) 0%, var(--noche) 60%); }
.mancha { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; will-change: transform; }
.m1 { width: 46vmax; height: 46vmax; background: var(--violeta); top: -14vmax; left: -10vmax; animation: deriva1 26s ease-in-out infinite alternate; }
.m2 { width: 36vmax; height: 36vmax; background: var(--coral); top: 30vh; right: -14vmax; opacity: .42; animation: deriva2 31s ease-in-out infinite alternate; }
.m3 { width: 30vmax; height: 30vmax; background: var(--turquesa); bottom: -12vmax; left: 18vw; opacity: .35; animation: deriva3 23s ease-in-out infinite alternate; }
.m4 { width: 22vmax; height: 22vmax; background: var(--ambar); top: 8vh; right: 22vw; opacity: .28; animation: deriva1 35s ease-in-out infinite alternate-reverse; }
@keyframes deriva1 { to { transform: translate(18vw, 14vh) scale(1.15); } }
@keyframes deriva2 { to { transform: translate(-22vw, -10vh) scale(.9); } }
@keyframes deriva3 { to { transform: translate(14vw, -18vh) scale(1.2); } }
#estrellas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- cabecera ---------- */
.cabecera {
  position: relative; max-width: 1180px; margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 16px 10px;
  display: flex; align-items: center; gap: 18px;
}
.retrato { position: relative; flex: none; width: 72px; height: 72px; border-radius: 50%; }
.cabecera.grande .retrato { width: 132px; height: 132px; }
.retrato img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; border-radius: 50%; border: 3px solid var(--noche); }
.aro {
  position: absolute; inset: -5px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--violeta), var(--coral), var(--ambar), var(--turquesa), var(--violeta));
  animation: girar 6s linear infinite;
}
.aro::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; background: inherit; filter: blur(16px); opacity: .55; }
@keyframes girar { to { transform: rotate(1turn); } }
.saludo { min-width: 0; }
.hola { margin: 0 0 4px; color: var(--suave); font-weight: 700; }
.ola { display: inline-block; transform-origin: 70% 80%; animation: saludar 2.4s ease-in-out 1s 2; }
@keyframes saludar { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-8deg); } }
.titulo {
  font-size: clamp(2rem, 7vw, 3.4rem); font-weight: 800;
  background: linear-gradient(100deg, var(--texto) 20%, var(--ambar) 45%, var(--coral) 55%, var(--texto) 80%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: brillo 7s ease-in-out infinite;
}
.cabecera.grande .titulo { font-size: clamp(2.6rem, 10vw, 4.6rem); }
@keyframes brillo { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.hoy { margin: 6px 0 0; color: var(--suave); font-size: .92rem; }
.salir { margin-left: auto; align-self: flex-start; }
.salir button {
  width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer;
  background: var(--cristal); border: 1px solid var(--cristal-borde); border-radius: 14px; color: var(--texto);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: transform .2s, background .2s;
}
.salir button:hover { transform: rotate(-8deg) scale(1.06); background: rgba(255, 107, 90, .25); }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- navegación: barra inferior en móvil, píldora arriba en escritorio ---------- */
/* ---------- contenido ---------- */
.contenido {
  max-width: 1180px; margin: 0 auto;
  padding: 18px 16px calc(120px + env(safe-area-inset-bottom));
  display: grid; gap: 18px;
}
.contenido > * { animation: subir .7s cubic-bezier(.2, .8, .2, 1) both; }
.contenido > *:nth-child(2) { animation-delay: .08s; }
.contenido > *:nth-child(3) { animation-delay: .16s; }
.contenido > *:nth-child(4) { animation-delay: .24s; }
.contenido > *:nth-child(n+5) { animation-delay: .32s; }
@keyframes subir { from { opacity: 0; transform: translateY(26px) scale(.98); } }

.tarjetas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 14px; }
.tarjeta, .panel {
  position: relative; overflow: hidden;
  background: var(--cristal); border: 1px solid var(--cristal-borde); border-radius: var(--radio-grande);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: var(--sombra);
}
.tarjeta { padding: 20px; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.tarjeta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 181, 71, .22), transparent 60%);
}
.tarjeta:hover { transform: translateY(-4px) rotate(-.4deg); }
.tarjeta:hover::before { opacity: 1; }
.tarjeta.destacada {
  background: linear-gradient(135deg, rgba(124, 92, 255, .55), rgba(255, 107, 90, .38) 55%, rgba(255, 181, 71, .30));
  border-color: rgba(255, 255, 255, .25);
}
.tarjeta.destacada::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent);
  animation: reflejo 5s ease-in-out 1.2s infinite;
}
@keyframes reflejo { 0% { left: -60%; } 40%, 100% { left: 130%; } }
.etq { margin: 0; color: var(--suave); font-size: .88rem; font-weight: 700; }
.tarjeta.destacada .etq, .tarjeta.destacada .nota { color: rgba(255, 255, 255, .85); }
.cifra {
  margin: 8px 0 0; font-family: "Bricolage Grotesque", sans-serif; font-weight: 800;
  font-size: clamp(1.8rem, 6.5vw, 2.6rem); letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.tarjeta.destacada .cifra { color: #fff; font-size: clamp(2.2rem, 8vw, 3.2rem); }
.positivo { color: var(--positivo); }
.negativo { color: var(--negativo); }
.nota { color: var(--suave); font-size: .82rem; margin: 6px 0 0; }

.panel { padding: 20px; }
.panel.alerta { border-color: rgba(255, 181, 71, .55); background: linear-gradient(135deg, rgba(255, 181, 71, .18), var(--cristal)); }
.panel.alerta ul { margin: 10px 0 0; padding-left: 20px; }
.cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.vacio { color: var(--suave); font-style: italic; }
#curva { max-height: 260px; }

/* listas de vencimientos */
.lista { list-style: none; margin: 0; padding: 0; }
.lista li {
  display: flex; align-items: center; gap: 12px; padding: 12px 10px; margin: 0 -10px;
  border-radius: 14px; transition: background .2s, transform .2s;
  animation: entrar .5s cubic-bezier(.2, .8, .2, 1) both;
}
.lista li:hover { background: var(--cristal); transform: translateX(4px); }
.lista li:nth-child(2) { animation-delay: .05s; } .lista li:nth-child(3) { animation-delay: .1s; }
.lista li:nth-child(4) { animation-delay: .15s; } .lista li:nth-child(5) { animation-delay: .2s; }
.lista li:nth-child(n+6) { animation-delay: .25s; }
@keyframes entrar { from { opacity: 0; transform: translateX(-18px); } }
.lista .fecha { flex: none; width: 92px; color: var(--suave); font-variant-numeric: tabular-nums; font-size: .88rem; }
.lista .txt { flex: 1; min-width: 0; }
.lista form { margin: 0; }
.chip { flex: none; display: inline-block; padding: 4px 11px; border-radius: 999px; background: var(--cristal); border: 1px solid var(--cristal-borde); font-size: .78rem; font-weight: 700; }
.chip.suave { color: var(--suave); }
.chip.ok { color: var(--positivo); }
.chip.mal { color: var(--negativo); animation: pulso 1.6s ease-in-out infinite; }
.lista li.pronto .chip { background: rgba(255, 181, 71, .2); color: var(--ambar); border-color: rgba(255, 181, 71, .4); }
.lista li.vencido .chip { background: rgba(255, 122, 138, .2); color: var(--negativo); border-color: rgba(255, 122, 138, .45); animation: pulso 1.6s ease-in-out infinite; }
@keyframes pulso { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 122, 138, .45); } 50% { box-shadow: 0 0 0 7px rgba(255, 122, 138, 0); } }
.lista.hecha .txt { color: var(--suave); text-decoration: line-through; }

/* tablas */
.tabla { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th { text-align: left; color: var(--suave); font-weight: 700; font-size: .82rem; padding: 8px 12px 10px 0; border-bottom: 1px solid var(--borde); white-space: nowrap; }
td { padding: 13px 12px 13px 0; border-bottom: 1px solid var(--borde); vertical-align: top; }
tbody tr { transition: background .2s; }
tbody tr:hover { background: var(--cristal); }
tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.corto { max-width: 220px; overflow-wrap: anywhere; font-size: .85rem; color: var(--suave); }
.barra { display: block; height: 6px; margin-top: 8px; border-radius: 99px; background: var(--borde); overflow: hidden; min-width: 90px; }
.barra i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--turquesa), var(--violeta)); transition: width 1.6s cubic-bezier(.2, .8, .2, 1); }

/* fichas de documentos */
.fichas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.ficha { background: var(--cristal); border: 1px solid var(--cristal-borde); border-radius: var(--radio); padding: 16px; transition: transform .3s, border-color .3s; }
.ficha:hover { transform: translateY(-3px); border-color: rgba(45, 212, 191, .5); }
.ficha h3 { margin: 4px 0 8px; font-size: 1.08rem; }
.ficha p { margin: 0 0 8px; font-size: .9rem; }
.ruta { color: var(--suave); font-size: .8rem !important; overflow-wrap: anywhere; }

/* botones y formularios */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
  background: linear-gradient(135deg, var(--violeta), var(--coral)); background-size: 160% 160%;
  color: #fff; border: 0; border-radius: 14px; padding: 13px 20px; font: inherit; font-weight: 700;
  box-shadow: 0 10px 28px -10px var(--coral); transition: transform .2s, background-position .5s, box-shadow .2s;
}
.boton:hover { text-decoration: none; transform: translateY(-2px); background-position: 100% 0; box-shadow: 0 14px 34px -10px var(--violeta); }
.boton:active { transform: scale(.97); }
.boton.peq { padding: 7px 13px; font-size: .85rem; border-radius: 11px; }
.boton.peligro { background: transparent; color: var(--negativo); border: 1px solid var(--negativo); box-shadow: none; }
.form { display: grid; gap: 14px; }
.form.ancho { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.form label { display: grid; gap: 6px; font-size: .88rem; color: var(--suave); font-weight: 700; }
.form label.recordar { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.form label.recordar input { width: 20px; height: 20px; min-height: 0; padding: 0; flex: none; accent-color: var(--violeta); }
.form input, .form select, .form textarea {
  width: 100%; background: var(--cristal); color: var(--texto); border: 1px solid var(--cristal-borde);
  border-radius: 12px; padding: 12px 13px; font: inherit; font-weight: 500; transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--violeta); box-shadow: 0 0 0 4px rgba(124, 92, 255, .25); }
.form select option { background: var(--noche); color: var(--texto); }
.form .acciones { grid-column: 1 / -1; }
.borrar { margin-top: 18px; }
.error { background: rgba(255, 122, 138, .16); color: var(--negativo); padding: 11px 13px; border-radius: 12px; border: 1px solid rgba(255, 122, 138, .35); animation: temblor .4s; }
@keyframes temblor { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- login y páginas simples ---------- */
body.simple { display: grid; place-items: center; padding: 16px; }
.caja {
  width: 100%; max-width: 420px; padding: 32px 24px;
  background: var(--cristal); border: 1px solid var(--cristal-borde); border-radius: 30px;
  backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: var(--sombra); animation: subir .8s cubic-bezier(.2, .8, .2, 1) both;
}
.caja h1 { font-size: 2rem; margin-bottom: 14px; }
.marca {
  margin: 0 0 22px; font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--violeta), var(--coral), var(--ambar), var(--turquesa), var(--violeta));
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: brillo 6s linear infinite;
}
.qr { background: #fff; padding: 12px; border-radius: 14px; width: max-content; }

@media (max-width: 600px) {
  .cabecera { gap: 14px; }
  .cabecera.grande { flex-wrap: wrap; }
  .cabecera.grande .retrato { width: 104px; height: 104px; }
  .lista .fecha { width: 76px; font-size: .8rem; }
  .tarjeta, .panel { padding: 16px; border-radius: 22px; }
  .tabla { margin: 0; padding: 0; overflow: visible; }
  .tarjetas { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tarjetas .tarjeta.destacada, .tarjetas .tarjeta:only-child { grid-column: 1 / -1; }
  .tarjeta .cifra { font-size: clamp(1.25rem, 6vw, 1.7rem); }
  /* En el móvil cada fila de tabla se convierte en una ficha. */
  .tabla thead { display: none; }
  .tabla table, .tabla tbody { display: block; }
  .tabla tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding: 14px 10px; margin: 0 -10px; border-bottom: 1px solid var(--borde); border-radius: 14px; }
  .tabla tr:last-child { border-bottom: 0; }
  .tabla td { border: 0; padding: 0; }
  .tabla td:first-child { flex: 1 0 100%; }
  .tabla td.num { text-align: left; font-weight: 700; }
  .tabla td:last-child a { font-weight: 700; }
  .barra { min-width: 140px; }
}

/* servicios contratados (Casa) */
.contador { display: inline-grid; place-items: center; min-width: 26px; height: 26px; margin-left: 6px; padding: 0 7px; border-radius: 99px; background: var(--cristal); border: 1px solid var(--cristal-borde); font: 700 .8rem "Manrope", sans-serif; color: var(--suave); vertical-align: middle; }
.servicios { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.servicio {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 20px; color: var(--texto);
  background: var(--cristal); border: 1px solid var(--cristal-borde);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-color .25s, box-shadow .25s;
}
.servicio:hover { text-decoration: none; transform: translateY(-3px); border-color: rgba(45, 212, 191, .55); box-shadow: 0 14px 30px -18px var(--turquesa); }
.logo { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: #fff; overflow: hidden; box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .6); }
.logo img { width: 70%; height: 70%; object-fit: contain; }
.logo img[src$=".svg"] { width: 88%; }
.logo.sin-logo { background: linear-gradient(135deg, var(--violeta), var(--turquesa)); color: #fff; font: 800 1.05rem "Bricolage Grotesque", sans-serif; letter-spacing: .02em; }
.logo.grande { width: 76px; height: 76px; border-radius: 22px; }
.logo.grande.sin-logo { font-size: 1.5rem; }
.serv-cuerpo { display: grid; gap: 1px; min-width: 0; }
.serv-tipo { font: 800 1.2rem/1.15 "Bricolage Grotesque", sans-serif; letter-spacing: -0.01em; }
.serv-compania { color: var(--suave); font-weight: 700; font-size: .9rem; }
.serv-dato { color: var(--suave); font-size: .82rem; overflow-wrap: anywhere; }
.tel { white-space: nowrap; font-variant-numeric: tabular-nums; }
.serv-precio { text-align: right; display: grid; justify-items: end; }
.serv-precio strong { font: 800 1.15rem "Bricolage Grotesque", sans-serif; white-space: nowrap; }
.serv-precio small { white-space: nowrap; }
.cifra-texto { font-size: clamp(1.2rem, 4vw, 1.6rem) !important; }
.volver { display: inline-block; font-weight: 700; color: var(--suave); }
.ficha-servicio { display: grid; gap: 18px; }
.fs-cab { display: flex; align-items: center; gap: 16px; }
.fs-tipo { font-size: clamp(1.8rem, 6vw, 2.6rem); font-weight: 800; }
.fs-compania { margin: 4px 0 0; color: var(--suave); font-weight: 700; }
.fs-datos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 10px; margin: 0; }
.fs-datos div { padding: 12px 14px; border-radius: 14px; background: var(--cristal); border: 1px solid var(--cristal-borde); }
.fs-datos dt { color: var(--suave); font-size: .82rem; font-weight: 700; }
.fs-datos dd { margin: 3px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.fs-sub { font-size: 1.1rem; }
.fs-acciones { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .servicio { grid-template-columns: auto 1fr; }
  .serv-precio { grid-column: 2; justify-items: start; text-align: left; display: flex; gap: 6px; align-items: baseline; }
}

/* notas en lista e incidencias */
.puntos { margin: 6px 0 0; padding-left: 18px; color: var(--suave); font-size: .86rem; }
.puntos li { margin: 2px 0; }
.lista .puntos li { display: list-item; padding: 0; margin: 2px 0; animation: none; background: none; transform: none; }
.puntos li.pend { color: var(--ambar); font-weight: 600; }
.incidencias { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.incidencias > li { padding: 14px 16px; border-radius: var(--radio); border: 1px solid var(--borde); border-left: 4px solid var(--suave); background: var(--cristal); }
.incidencias > li.nivel-urgente { border-left-color: var(--negativo); }
.incidencias > li.nivel-aviso { border-left-color: var(--ambar); }
.incidencias > li.nivel-standby { border-left-color: var(--violeta); }
.incidencias h3 { margin: 8px 0 4px; font-size: 1rem; }
.inc-cab { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.inc-motivo { margin: 4px 0 0; color: var(--suave); font-size: .92rem; }
.inc-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.inc-form input[name="motivo"]:not([type="hidden"]) { flex: 1 1 220px; min-width: 0; background: var(--cristal); color: var(--texto); border: 1px solid var(--cristal-borde); border-radius: 11px; padding: 7px 11px; font: inherit; font-size: .9rem; }
.boton.secundario { background: transparent; color: var(--texto); border: 1px solid var(--cristal-borde); box-shadow: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .barra i { transition: none; }
}

/* media de cada bloque, familias de servicios e historial de cargos */
.cab-resumen { margin: 2px 0 0; color: var(--suave); font-size: .86rem; font-weight: 700; }
.servicio.familia { grid-template-columns: auto 1fr; align-items: start; }
.servicio.familia:hover { transform: none; box-shadow: none; }
.fam-miembros { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); gap: 8px; }
.fam-miembro {
  display: grid; justify-items: center; text-align: center; gap: 4px; padding: 10px 8px; border-radius: 16px;
  color: var(--texto); background: var(--cristal); border: 1px solid var(--cristal-borde);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-color .25s;
}
.fam-miembro:hover { text-decoration: none; transform: translateY(-2px); border-color: rgba(45, 212, 191, .55); }
.logo.mini { width: 38px; height: 38px; border-radius: 12px; }
.logo.mini.sin-logo { font-size: .85rem; }
.fam-tipo { font-weight: 800; font-size: .86rem; line-height: 1.2; }
.fam-precio { display: grid; font-size: .82rem; }
.fam-precio small { color: var(--suave); }
.fs-familia { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fs-familia .fam-miembro { grid-auto-flow: column; padding: 6px 12px 6px 6px; }
.cargo-estado { margin: 0; padding: 10px 14px; border-radius: 14px; font-weight: 700; border: 1px solid var(--cristal-borde); }
.cargo-estado.activo { border-left: 4px solid var(--ambar); }
.cargo-estado.parado { border-left: 4px solid var(--positivo); }
.cargos-anio { border: 1px solid var(--cristal-borde); border-radius: 14px; background: var(--cristal); padding: 4px 14px; }
.cargos-anio summary { cursor: pointer; padding: 8px 0; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.cargos-anio summary span { color: var(--suave); font-size: .86rem; }
table.cargos td { padding: 8px 12px 8px 0; }
table.cargos tr.devolucion td { color: var(--positivo); }

/* última factura en cada tarjeta y gráfico de gasto */
.ultima { grid-column: 1 / -1; font-size: .8rem; font-weight: 700; color: var(--turquesa); padding-top: 8px; border-top: 1px dashed var(--borde); }
.ultima.sin { color: var(--suave); font-weight: 500; font-style: italic; }
.fam-miembro .ultima { border-top: 0; padding-top: 0; }
#gasto { max-height: 300px; }

/* familia: el servicio principal y, debajo, una línea desplegable con los demás */
.servicio.familia { display: grid; grid-template-columns: 1fr; gap: 10px; }
.fam-principal { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; color: var(--texto); }
.fam-principal:hover { text-decoration: none; }
.fam-principal:hover .serv-tipo { color: var(--turquesa); }
.fam-mas { border-top: 1px dashed var(--borde); padding-top: 8px; }
.fam-mas summary { cursor: pointer; font-size: .84rem; font-weight: 700; color: var(--suave); list-style-position: outside; }
.fam-mas summary:hover { color: var(--texto); }
.fam-total { display: block; font-weight: 500; font-size: .8rem; margin-top: 2px; }
.fam-mas[open] .fam-miembros { margin-top: 10px; }
@media (max-width: 600px) {
  .fam-principal { grid-template-columns: auto 1fr; }
  .fam-principal .serv-precio { grid-column: 2; justify-items: start; text-align: left; display: flex; gap: 6px; align-items: baseline; }
}
.fs-donde { margin: 2px 0 0; font-size: .86rem; font-weight: 700; color: var(--turquesa); }
.fs-inmueble { margin: 0 0 8px; padding: 10px 14px; border-radius: 14px; background: var(--cristal); border: 1px solid var(--cristal-borde); border-left: 4px solid var(--turquesa); }

/* servicios de baja */
.fam-miembro.de-baja, .fam-principal.de-baja { opacity: .55; filter: grayscale(.8); }
.fam-miembro.de-baja:hover { opacity: .85; }
.ultima.baja { color: var(--coral); font-weight: 800; text-transform: none; }
.aviso-baja { margin: 0; padding: 12px 16px; border-radius: 14px; font-weight: 800; color: var(--coral); background: var(--cristal); border: 1px solid var(--cristal-borde); border-left: 4px solid var(--coral); }
/* banda diagonal «De baja» que cruza la tarjeta */
.servicio.de-baja { position: relative; overflow: hidden; }
.servicio.de-baja > :not(.banda-baja) { opacity: .5; filter: grayscale(.8); }
.servicio.de-baja:hover > :not(.banda-baja) { opacity: .8; }
.banda-baja {
  position: absolute; left: -10%; right: -10%; top: 50%; transform: translateY(-50%) rotate(-12deg);
  padding: 6px 0; text-align: center; background: rgba(255, 122, 138, .35); color: #fff;
  font: 800 1rem "Bricolage Grotesque", sans-serif; letter-spacing: .12em; text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .45); pointer-events: none;
}

/* detalle de gastos de un mes (clic en el gráfico de Casa) */
.mes-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.mes-pasos { display: flex; gap: 8px; flex-wrap: wrap; }
.mes-filas { display: grid; gap: 8px; }
.mes-fila {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px;
  color: var(--texto); background: var(--cristal); border: 1px solid var(--cristal-borde); transition: border-color .25s, transform .25s;
}
.mes-fila:hover { text-decoration: none; transform: translateY(-2px); border-color: rgba(45, 212, 191, .55); }
.mes-fila small { color: var(--suave); }
.mes-importe { font: 800 1.05rem "Bricolage Grotesque", sans-serif; white-space: nowrap; text-align: right; }
.mes-fila.devolucion .mes-importe { color: var(--positivo); }

.mes-fila.dia-fila { grid-template-columns: 1fr auto; }

/* Casa: una pestaña por parte (casa, local, gastos personales), cada una con su total */
.casa-partes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.casa-parte {
  display: grid; gap: 2px; justify-items: center; text-align: center; padding: 14px 10px; border-radius: 20px; color: var(--texto);
  background: var(--cristal); border: 1px solid var(--cristal-borde); transition: border-color .25s, transform .25s;
}
.casa-parte:hover { text-decoration: none; transform: translateY(-2px); border-color: rgba(45, 212, 191, .55); }
.casa-parte.activa { background: linear-gradient(135deg, rgba(124, 92, 255, .55), rgba(255, 107, 90, .38) 55%, rgba(255, 181, 71, .30)); border-color: rgba(255, 255, 255, .25); }
.casa-parte-nombre { font-weight: 700; font-size: .86rem; }
.casa-parte strong { font: 800 clamp(1.1rem, 4.5vw, 1.6rem) "Bricolage Grotesque", sans-serif; font-variant-numeric: tabular-nums; }
.casa-parte small { color: var(--suave); }
.casa-parte.activa small { color: rgba(255, 255, 255, .85); }

/* patrimonio: tarjetas por grupo con icono o logo, datos de cada deuda y notas plegadas */
.servicio.pat:hover { transform: none; box-shadow: none; border-color: var(--cristal-borde); }
.logo.icono { background: linear-gradient(135deg, var(--violeta), var(--turquesa)); color: #fff; }
.logo.icono svg { width: 26px; height: 26px; stroke-width: 1.9; }
.logo.icono.t-inmueble { background: linear-gradient(135deg, var(--coral), var(--ambar)); }
.logo.icono.t-efectivo, .logo.icono.t-otro { background: linear-gradient(135deg, var(--turquesa), #0EA5E9); }
.logo.icono.t-cripto { background: linear-gradient(135deg, var(--ambar), #F59E0B); }
.logo.icono.t-deuda { background: linear-gradient(135deg, var(--negativo), var(--coral)); }
.logo.icono.t-prestamo { background: linear-gradient(135deg, var(--positivo), var(--turquesa)); }
.servicio.pat .serv-tipo { font-size: 1.08rem; }
.serv-dato.ingreso { color: var(--positivo); font-weight: 700; }
.deuda-datos { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.deuda-datos > span { padding: 4px 10px; border-radius: 99px; background: var(--cristal); border: 1px solid var(--cristal-borde); font-size: .82rem; color: var(--suave); }
.deuda-datos b { color: var(--texto); }
.deuda-parte { color: var(--ambar) !important; font-weight: 700; }
.deuda-progreso { grid-column: 1 / -1; display: grid; gap: 6px; }
.deuda-progreso .barra { margin: 0; height: 8px; }
.deuda-pct { font-size: .82rem; color: var(--suave); }
.deuda-pct b { color: var(--turquesa); }
.deuda-fin { font-size: .82rem; color: var(--suave); }
.deuda-fin b { color: var(--texto); }
.servicio.garante { border-style: dashed; }
.pat-pie { grid-column: 1 / -1; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px dashed var(--borde); }
.pat-notas { flex: 1; min-width: 0; }
.pat-notas summary { cursor: pointer; font-size: .84rem; font-weight: 700; color: var(--suave); }
.pat-notas summary:hover { color: var(--texto); }
.pat-notas .puntos { color: var(--texto); opacity: .85; }
.pat-editar { margin-left: auto; flex: none; font-size: .84rem; font-weight: 700; }

/* detalle de cada cargo en la ficha del servicio */
tr.fila-cargo { cursor: pointer; transition: background .2s; }
tr.fila-cargo:hover, tr.fila-cargo:focus-visible { background: var(--cristal); outline: none; }
tr.fila-cargo .flecha { color: var(--suave); font-weight: 800; transition: transform .2s; text-align: right; }
tr.fila-cargo[aria-expanded="true"] .flecha { transform: rotate(90deg); color: var(--turquesa); }
tr.cargo-detalle > td { padding: 4px 0 14px; }
.cd-datos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 8px; margin: 0; }
.cd-datos div { padding: 8px 12px; border-radius: 12px; background: var(--cristal); border: 1px solid var(--cristal-borde); }
.cd-datos dt { color: var(--suave); font-size: .76rem; font-weight: 700; }
.cd-datos dd { margin: 2px 0 0; font-weight: 700; font-size: .88rem; overflow-wrap: anywhere; }
/* factura de cada cargo: el importe con icono abre el PDF */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icono-factura { display: inline-block; width: .8em; height: 1em; margin-left: 6px; vertical-align: -.12em; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 15'%3E%3Cpath d='M0 1.5A1.5 1.5 0 0 1 1.5 0H8l4 4v9.5a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 0 13.5zM7.5 1v3.5H11M3 7.5h6M3 10h6M3 12.5h4' fill='none' stroke='black' stroke-width='1.3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 15'%3E%3Cpath d='M0 1.5A1.5 1.5 0 0 1 1.5 0H8l4 4v9.5a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 0 13.5zM7.5 1v3.5H11M3 7.5h6M3 10h6M3 12.5h4' fill='none' stroke='black' stroke-width='1.3'/%3E%3C/svg%3E") center / contain no-repeat; }
.nota .icono-factura { color: var(--turquesa); margin: 0 2px; }
a.ver-factura { color: var(--turquesa); font-weight: 800; text-decoration: underline dotted; text-underline-offset: 3px; }
a.ver-factura:hover, a.ver-factura:focus-visible { text-decoration-style: solid; }
.cd-factura { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.cd-factura small { color: var(--suave); }
.cd-factura form.en-linea { display: inline; margin: 0; }
.subir-factura { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--cristal-borde); background: var(--cristal); }
.subir-factura label { font-size: .84rem; font-weight: 700; color: var(--suave); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.subir-factura input[type=file] { font: inherit; color: var(--texto); max-width: 100%; }

/* ficha de inmueble (/inmueble/{id}) */
.pat-ficha { color: inherit; transition: color .2s; }
.pat-ficha span { display: inline-block; color: var(--turquesa); transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.pat-ficha:hover, .pat-ficha:focus { text-decoration: none; outline: none; }
/* toda la tarjeta es el enlace a la ficha, salvo el pie de notas y Editar */
.servicio.pat.con-ficha { position: relative; cursor: pointer; }
.servicio.pat.con-ficha .pat-ficha::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.servicio.pat.con-ficha .pat-pie { position: relative; z-index: 2; cursor: default; }
.servicio.pat.con-ficha:hover { transform: translateY(-3px); border-color: rgba(45, 212, 191, .55); box-shadow: 0 14px 30px -18px var(--turquesa); }
.servicio.pat.con-ficha:has(.pat-pie:hover) { transform: none; box-shadow: none; border-color: var(--cristal-borde); }
.servicio.pat.con-ficha:hover:not(:has(.pat-pie:hover)) .pat-ficha { color: var(--turquesa); }
.servicio.pat.con-ficha:hover:not(:has(.pat-pie:hover)) .pat-ficha span { transform: translateX(4px); }
.servicio.pat.con-ficha:has(.pat-ficha:focus-visible) { outline: 2px solid var(--turquesa); outline-offset: 3px; }
.inm-veredicto { display: grid; gap: 4px; padding: 16px 18px; border-radius: 18px; background: var(--cristal); border: 1px solid var(--cristal-borde); border-left: 6px solid var(--suave); }
.inm-veredicto strong { font: 800 1.35rem/1.2 "Bricolage Grotesque", sans-serif; }
.inm-veredicto span { color: var(--suave); }
.inm-veredicto.bien { border-left-color: var(--positivo); }
.inm-veredicto.bien strong { color: var(--positivo); }
.inm-veredicto.medio { border-left-color: var(--ambar); }
.inm-veredicto.medio strong { color: var(--ambar); }
.inm-veredicto.mal { border-left-color: var(--negativo); }
.inm-veredicto.mal strong { color: var(--negativo); }
.inm .fs-datos dd small, .inm-doc { display: block; margin-top: 3px; color: var(--suave); font-weight: 500; font-size: .82rem; }
.inm-pendiente { color: var(--ambar); font-weight: 700; }

/* valoración del inmueble */
.inm-veredicto .inm-cifra { margin: 2px 0 4px; font: 800 1.15rem/1.3 "Bricolage Grotesque", sans-serif; color: var(--texto); }
.inm-veredicto.medio .inm-cifra, .inm-veredicto.mal .inm-cifra { color: var(--negativo); }
.inm-veredicto.bien .inm-cifra { color: var(--positivo); }
.inm-hacer { margin: 10px 0 0; font-weight: 800; color: var(--texto); }
.inm-veredicto .puntos { color: var(--texto); font-size: .9rem; }

/* ficha de un préstamo dado */
.prest .inm-veredicto.medio .inm-cifra { color: var(--positivo); }
.prest-riesgos { color: var(--texto); font-size: .9rem; }
.prest-riesgos li::marker { color: var(--negativo); }

/* Documentos: buscador arriba y árbol de carpetas a la izquierda, como un explorador de archivos */
.explorador { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.exp-busca input { width: 100%; }
.exp-cabecera { display: flex; align-items: center; gap: 12px; padding: 12px 14px; position: sticky; top: 10px; z-index: 5; }
.exp-busca { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 4px 6px; }
.exp-busca svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--suave); stroke-width: 2; stroke-linecap: round; }
.exp-busca input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--texto); font: 500 1.05rem "Manrope", sans-serif; padding: 8px 0; }
.exp-busca input::placeholder { color: var(--suave); opacity: .8; }
.exp-busca:focus-within { box-shadow: 0 0 0 2px var(--turquesa); border-radius: 12px; }
.exp-busca kbd { font: 700 .78rem "Manrope", sans-serif; color: var(--suave); border: 1px solid var(--cristal-borde); border-radius: 6px; padding: 1px 7px; }
.exp-cuerpo { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 14px; align-items: start; }
.exp-arbol { padding: 12px 10px; position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow: auto; }
.exp-arbol ul { list-style: none; margin: 0; padding: 0; }
.exp-hijos { padding-left: 14px !important; border-left: 1px solid var(--borde); margin-left: 11px !important; }
.exp-nodo { display: flex; align-items: center; }
.exp-giro { flex: none; width: 22px; height: 30px; padding: 0; border: 0; background: none; color: var(--suave); cursor: pointer; }
.exp-giro::before { content: ""; display: block; width: 6px; height: 6px; margin: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .2s; }
.exp-giro[aria-expanded="true"]::before { transform: rotate(45deg); }
.vacio-giro::before { content: none; }
.exp-carpeta { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 6px 9px; border: 0; border-radius: 10px; background: none; color: var(--texto); font: 500 .92rem "Manrope", sans-serif; text-align: left; cursor: pointer; }
.exp-carpeta:hover { background: var(--cristal); }
.exp-carpeta.activa { background: rgba(124, 92, 255, .22); font-weight: 700; }
.exp-carpeta.sin { opacity: .4; }
.exp-todos { width: 100%; margin-bottom: 6px; }
.exp-nombre { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exp-n { flex: none; min-width: 22px; text-align: center; font-size: .78rem; font-weight: 700; color: var(--suave); background: var(--cristal); border-radius: 99px; padding: 1px 6px; }
.exp-lista { padding: 8px 18px 14px; min-width: 0; }
.exp-miga { margin: 8px 0 6px; color: var(--suave); font-size: .88rem; font-weight: 700; }
.exp-miga button { border: 0; background: none; padding: 0; color: var(--turquesa); font: inherit; cursor: pointer; }
.exp-miga button:hover { text-decoration: underline; }
.exp-doc { display: flex; gap: 14px; align-items: flex-start; padding: 14px 4px; border-top: 1px solid var(--borde); }
.exp-icono { flex: none; display: grid; place-items: center; width: 40px; height: 48px; border-radius: 8px; background: rgba(255, 107, 90, .18); color: var(--coral); font: 800 .66rem "Manrope", sans-serif; letter-spacing: .03em; }
.exp-icono.carpeta { height: 34px; margin-top: 7px; background: rgba(255, 181, 71, .2); border-radius: 4px 8px 8px 8px; }
.exp-texto { flex: 1; min-width: 0; }
.exp-texto h3 { margin: 0 0 3px; font-size: 1.02rem; }
.exp-texto p, .exp-texto ul { margin: 0 0 5px; font-size: .9rem; }
.exp-editar { flex: none; font-size: .86rem; font-weight: 700; }
@media (max-width: 760px) {
  .exp-cuerpo { grid-template-columns: minmax(0, 1fr); }
  .exp-arbol { position: static; max-height: 40vh; }
  .exp-busca kbd { display: none; }
  .exp-lista { padding: 6px 14px 10px; }
  .exp-doc { flex-wrap: wrap; }
}
.exp-doc[hidden], .exp-hijos[hidden] { display: none; }

/* Fondo de trazado de cada bloque: cuadrícula de plano + dibujo de líneas del tema arriba a la
   derecha. El dibujo es una máscara SVG pintada con el degradado del bloque, así sirve igual en
   tema oscuro y claro. Cada pestaña pone su dibujo en .fondo-<pestaña> (layout.php); los bloques
   de Patrimonio lo cambian con .seg-*. Los pseudo-elementos van con z-index -1 dentro de un
   contexto aislado: quedan sobre el fondo del panel y debajo de su contenido. */
.contenido { --seg-a: var(--violeta); --seg-b: var(--turquesa); }
.seg, .contenido .panel:not(.alerta, .exp-arbol, .exp-cabecera) { isolation: isolate; }
.seg::before, .seg::after,
.contenido .panel:not(.alerta, .exp-arbol, .exp-cabecera)::before,
.contenido .panel:not(.alerta, .exp-arbol, .exp-cabecera)::after { content: ""; position: absolute; pointer-events: none; z-index: -1; }
.seg::before, .contenido .panel:not(.alerta, .exp-arbol, .exp-cabecera)::before {
  inset: 0; opacity: .25;
  background:
    radial-gradient(70% 90% at 100% 0%, color-mix(in srgb, var(--seg-a) 16%, transparent), transparent 70%),
    linear-gradient(color-mix(in srgb, var(--seg-b) 14%, transparent) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, color-mix(in srgb, var(--seg-b) 14%, transparent) 1px, transparent 1px) 0 0 / 28px 28px;
  -webkit-mask: radial-gradient(90% 120% at 100% 0%, #000 20%, transparent 75%);
  mask: radial-gradient(90% 120% at 100% 0%, #000 20%, transparent 75%);
}
.seg::after, .contenido .panel:not(.alerta, .exp-arbol, .exp-cabecera)::after {
  top: 0; right: 0; width: min(560px, 100%); aspect-ratio: 600 / 260; opacity: .13;
  background: linear-gradient(135deg, var(--seg-a), var(--seg-b));
  -webkit-mask: var(--seg-dibujo) right top / contain no-repeat;
  mask: var(--seg-dibujo) right top / contain no-repeat;
  animation: seg-entra 1.4s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes seg-entra { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { .contenido .panel::after { animation: none; } }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .contenido .panel::after { opacity: .12; } }

/* Inmuebles: barrio en línea con cotas de plano */
.seg-inmuebles {
  --seg-a: var(--coral); --seg-b: var(--ambar);
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 250h570'/%3E%3Cpath d='M60 250V130h80v120M72 148h16M112 148h16M72 176h16M112 176h16M72 204h16M112 204h16'/%3E%3Cpath d='M160 250v-88l60-46 60 46v88M205 250v-38h30v38M240 128v-22h14v33'/%3E%3Ccircle cx='220' cy='152' r='9'/%3E%3Cpath d='M300 250V44h92v206M346 44V18M316 64h16M360 64h16M316 92h16M360 92h16M316 120h16M360 120h16M316 148h16M360 148h16M316 176h16M360 176h16M316 204h16M360 204h16'/%3E%3Cpath d='M412 250V104h70v146M426 124h42M426 150h42M426 176h42M426 202h42'/%3E%3Cpath d='M500 250v-70l45-36 45 36v70M532 250v-30h26v30'/%3E%3Cpath d='M300 30h92M300 24v12M392 24v12M404 44v206M398 44h12M398 250h12' stroke-dasharray='4 5'/%3E%3C/svg%3E");
}
/* Dinero y cuentas: monedas apiladas y ondas */
.seg-dinero {
  --seg-a: var(--turquesa); --seg-b: #0EA5E9;
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M0 214c80-34 160 34 240 0s160-34 240 0 120 0 120 0M0 236c80-34 160 34 240 0s160-34 240 0 120 0 120 0' stroke-dasharray='2 7'/%3E%3Cpath d='M300 226v-56M400 226v-56M300 226a50 13 0 0 0 100 0M300 212a50 13 0 0 0 100 0M300 198a50 13 0 0 0 100 0M300 184a50 13 0 0 0 100 0'/%3E%3Cellipse cx='350' cy='170' rx='50' ry='13'/%3E%3Cpath d='M420 226v-28M500 226v-28M420 226a40 11 0 0 0 80 0M420 212a40 11 0 0 0 80 0'/%3E%3Cellipse cx='460' cy='198' rx='40' ry='11'/%3E%3Ccircle cx='510' cy='84' r='58'/%3E%3Ccircle cx='510' cy='84' r='46' stroke-dasharray='3 5'/%3E%3Cpath d='M530 62a26 26 0 1 0 0 44M484 78h34M484 92h34'/%3E%3C/svg%3E");
}
/* Empresas y proyectos: red de nodos sobre gráfico de barras */
.seg-empresas {
  --seg-a: var(--violeta); --seg-b: var(--turquesa);
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M180 250h410'/%3E%3Cpath d='M200 250v-50h26v50M244 250v-80h26v80M288 250v-66h26v66M332 250v-110h26v110M376 250v-96h26v96'/%3E%3Cpath d='M213 186l44-30 44 14 44-44 44 12' stroke-dasharray='4 5'/%3E%3Cpath d='M440 50l80-22 58 62-62 66-76-24zM440 50l76 104M520 28l-4 126M578 90l-138 42'/%3E%3Ccircle cx='440' cy='50' r='7'/%3E%3Ccircle cx='520' cy='28' r='7'/%3E%3Ccircle cx='578' cy='90' r='7'/%3E%3Ccircle cx='516' cy='156' r='9'/%3E%3Ccircle cx='440' cy='132' r='7'/%3E%3C/svg%3E");
}
/* Deudas: gráfico en escalera que baja hasta cero */
.seg-deudas {
  --seg-a: var(--negativo); --seg-b: var(--coral);
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M200 16v232h390M194 60h6M194 110h6M194 160h6M194 210h6'/%3E%3Cpath d='M200 36h50v28h50v28h50v28h50v28h50v28h50v28h40'/%3E%3Cpath d='M200 36c120 10 260 120 390 196' stroke-dasharray='3 6'/%3E%3Ccircle cx='250' cy='64' r='4'/%3E%3Ccircle cx='350' cy='120' r='4'/%3E%3Ccircle cx='450' cy='176' r='4'/%3E%3Ccircle cx='550' cy='232' r='6'/%3E%3C/svg%3E");
}
/* Préstamos: flechas de ida y vuelta alrededor de una moneda */
.seg-prestamos {
  --seg-a: var(--positivo); --seg-b: var(--turquesa);
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M390 110a100 82 0 0 1 180-20M556 78l14 12 4-18'/%3E%3Cpath d='M570 160a100 82 0 0 1-180 20M404 192l-14-12-4 18'/%3E%3Ccircle cx='480' cy='135' r='34'/%3E%3Ccircle cx='480' cy='135' r='25' stroke-dasharray='3 5'/%3E%3Cpath d='M492 122a15 15 0 1 0 0 26M466 131h20M466 140h20'/%3E%3Cpath d='M180 236h400' stroke-dasharray='2 8'/%3E%3Ccircle cx='300' cy='236' r='4'/%3E%3Ccircle cx='400' cy='236' r='4'/%3E%3C/svg%3E");
}

/* Dibujo de cada pestaña (lo heredan sus paneles) */
/* Inicio: montañas con bandera y línea que sube */
.fondo-inicio { --seg-a: var(--violeta); --seg-b: var(--ambar);
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 250l150-130 70 60 120-130 110 110 50-40 70 130'/%3E%3Cpath d='M360 50V14h30l-8 9 8 9h-30'/%3E%3Ccircle cx='520' cy='50' r='22'/%3E%3Cpath d='M30 230c120-20 220-70 320-110s170-60 240-80' stroke-dasharray='4 7'/%3E%3C/svg%3E"); }
/* Casa: bombilla, gota, llama y wifi */
.fondo-casa { --seg-a: var(--ambar); --seg-b: var(--turquesa);
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 250h570' stroke-dasharray='3 8'/%3E%3Cpath d='M120 150a46 46 0 1 1 64 0c-8 8-12 16-12 26h-40c0-10-4-18-12-26zM140 190h24M142 202h20M152 64V48M104 88l-12-12M200 88l12-12'/%3E%3Cpath d='M290 60c30 40 48 70 48 96a48 48 0 0 1-96 0c0-26 18-56 48-96zM270 160a22 22 0 0 0 20 22'/%3E%3Cpath d='M420 230c-36 0-56-26-56-56 0-34 28-50 34-86 22 16 30 40 28 60 10-6 16-16 18-28 18 18 30 40 30 56 0 30-22 54-54 54z'/%3E%3Cpath d='M498 92a66 66 0 0 1 88 0M512 110a42 42 0 0 1 60 0M526 128a20 20 0 0 1 32 0'/%3E%3Ccircle cx='542' cy='146' r='4'/%3E%3C/svg%3E"); }
/* Vehículos: coche de perfil sobre carretera */
.fondo-vehiculos { --seg-a: var(--turquesa); --seg-b: #0EA5E9;
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 248h570' stroke-dasharray='18 12'/%3E%3Cpath d='M286 206h-60v-30q0-14 14-16l60-8 46-40q10-8 22-8h94q14 0 24 10l42 42 38 8q18 4 18 22v20h-36M484 206H350'/%3E%3Cpath d='M360 152l20-30h50v30zM444 152v-30h32l30 30z'/%3E%3Ccircle cx='318' cy='206' r='30'/%3E%3Ccircle cx='318' cy='206' r='11'/%3E%3Ccircle cx='516' cy='206' r='30'/%3E%3Ccircle cx='516' cy='206' r='11'/%3E%3Cpath d='M60 150h110M90 176h90M40 202h120'/%3E%3C/svg%3E"); }
/* Recordatorios: despertador y calendario */
.fondo-recordatorios { --seg-a: var(--coral); --seg-b: var(--violeta);
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='330' y='50' width='220' height='180' rx='12'/%3E%3Cpath d='M330 92h220M374 34v32M506 34v32M330 138h220M330 184h220M385 92v138M440 92v138M495 92v138M452 162l12 12 22-26'/%3E%3Ccircle cx='200' cy='150' r='56'/%3E%3Cpath d='M200 150v-36M200 150l26 16M152 98l-18-18M248 98l18-18M164 198l-14 18M236 198l14 18'/%3E%3C/svg%3E"); }
/* Documentos: carpeta con papeles */
.fondo-documentos { --seg-a: var(--ambar); --seg-b: var(--coral);
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M380 30h120l30 30v120H380zM500 30v30h30M400 70h100M400 92h100M400 114h70'/%3E%3Cpath d='M300 230V90q0-10 10-10h70l20 20h170q10 0 10 10v120z'/%3E%3Cpath d='M300 230l24-96h272l-16 96' /%3E%3C/svg%3E"); }
/* Incidencias: engranaje y llave inglesa */
.fondo-incidencias { --seg-a: var(--ambar); --seg-b: var(--negativo);
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='470' cy='120' r='46'/%3E%3Ccircle cx='470' cy='120' r='18'/%3E%3Cpath d='M470 74V52M470 166v22M424 120h-22M516 120h22M437 87l-16-16M503 153l16 16M503 87l16-16M437 153l-16 16'/%3E%3Cpath d='M250 226l100-100M266 242l100-100M250 226a11 11 0 0 0 16 16M350 126a36 36 0 1 1 16 16M362 104l18-18M382 124l18-18'/%3E%3C/svg%3E"); }
/* Webs: navegador y globo */
.fondo-webs { --seg-a: #0EA5E9; --seg-b: var(--violeta);
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='260' y='30' width='320' height='200' rx='12'/%3E%3Cpath d='M260 66h320M424 96h130M424 116h110M424 136h120M284 182h270M284 202h200'/%3E%3Ccircle cx='282' cy='48' r='5'/%3E%3Ccircle cx='300' cy='48' r='5'/%3E%3Ccircle cx='318' cy='48' r='5'/%3E%3Crect x='340' y='40' width='200' height='16' rx='8'/%3E%3Crect x='284' y='88' width='120' height='70' rx='6'/%3E%3Ccircle cx='150' cy='150' r='70'/%3E%3Cellipse cx='150' cy='150' rx='30' ry='70'/%3E%3Cpath d='M80 150h140M92 115h116M92 185h116'/%3E%3C/svg%3E"); }
.fondo-patrimonio { --seg-a: var(--coral); --seg-b: var(--ambar); }

/* Fondos de trazado del resto de apartados (Casa, Inicio, Vehículos, Recordatorios, Incidencias, Webs).
   Mismo sistema que los de Patrimonio: .seg + .seg-<bloque>. */
/* Casa, gasto por mes: barras y moneda de euro */
.seg-gasto {
  --seg-a: var(--turquesa); --seg-b: var(--violeta);
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M200 240h390'/%3E%3Cpath d='M230 240v-70h30v70M280 240v-96h30v96M330 240v-58h30v58M380 240v-120h30v120M430 240v-84h30v84M480 240v-104h30v104'/%3E%3Cpath d='M245 160l50-26 50 38 50-64 50 36 50-20' stroke-dasharray='4 5'/%3E%3Ccircle cx='548' cy='72' r='34'/%3E%3Ccircle cx='548' cy='72' r='26' stroke-dasharray='3 5'/%3E%3Cpath d='M560 58a17 17 0 1 0 0 28M532 67h22M532 77h22'/%3E%3C/svg%3E");
}
/* Suministros: rayo, gota y línea de pulso */
.seg-suministros {
  --seg-a: var(--ambar); --seg-b: var(--turquesa);
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M470 18l-48 100h40l-28 92 88-122h-44l32-70z'/%3E%3Cpath d='M330 92s-42 52-42 80a42 42 0 0 0 84 0c0-28-42-80-42-80z'/%3E%3Cpath d='M310 176a20 20 0 0 0 20 20' stroke-dasharray='3 5'/%3E%3Cpath d='M180 240h60l10-22 18 44 12-22h310' stroke-dasharray='5 6'/%3E%3Ccircle cx='560' cy='60' r='5'/%3E%3Ccircle cx='540' cy='110' r='3'/%3E%3C/svg%3E");
}
/* Seguros: escudo con visto y paraguas */
.seg-seguros {
  --seg-a: var(--violeta); --seg-b: var(--turquesa);
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M480 22l84 30v62c0 62-42 98-84 118-42-20-84-56-84-118V52z'/%3E%3Cpath d='M480 44l62 22v48c0 46-30 76-62 92-32-16-62-46-62-92V66z' stroke-dasharray='4 6'/%3E%3Cpath d='M446 122l24 24 48-52'/%3E%3Cpath d='M230 160a64 64 0 0 1 128 0c-11-10-32-10-43 0-10-10-32-10-42 0-11-10-32-10-43 0z'/%3E%3Cpath d='M294 160v64a10 10 0 0 1-20 0'/%3E%3Cpath d='M294 96v-8'/%3E%3C/svg%3E");
}
/* Impuestos y tasas: ayuntamiento con columnas */
.seg-impuestos {
  --seg-a: var(--coral); --seg-b: var(--violeta);
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M230 244h340M246 230h308M254 100l146-70 146 70z'/%3E%3Cpath d='M262 112h276'/%3E%3Cpath d='M284 124v100M334 124v100M384 124v100M434 124v100M484 124v100M524 124v100'/%3E%3Ccircle cx='400' cy='74' r='12'/%3E%3Cpath d='M180 244h30' stroke-dasharray='4 6'/%3E%3C/svg%3E");
}
/* Suscripciones: pantalla con play y flechas de repetir */
.seg-suscripciones {
  --seg-a: var(--violeta); --seg-b: var(--coral);
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='330' y='30' width='240' height='150' rx='14'/%3E%3Cpath d='M434 76l46 29-46 29z'/%3E%3Cpath d='M414 206h72M450 180v26'/%3E%3Crect x='214' y='132' width='84' height='96' rx='10'/%3E%3Crect x='228' y='118' width='84' height='96' rx='10' stroke-dasharray='4 5'/%3E%3Cpath d='M230 160h52M230 180h40M230 200h46'/%3E%3Cpath d='M180 246h400' stroke-dasharray='2 8'/%3E%3C/svg%3E");
}
/* Otros: cajas apiladas */
.seg-otros {
  --seg-a: var(--turquesa); --seg-b: var(--violeta);
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='410' y='150' width='80' height='80' rx='6'/%3E%3Crect x='496' y='150' width='80' height='80' rx='6'/%3E%3Crect x='453' y='64' width='80' height='80' rx='6'/%3E%3Cpath d='M450 150v24M536 150v24M493 64v24'/%3E%3Cpath d='M200 236h390' stroke-dasharray='4 6'/%3E%3Ccircle cx='330' cy='190' r='4'/%3E%3Ccircle cx='360' cy='170' r='4'/%3E%3Ccircle cx='300' cy='206' r='4'/%3E%3C/svg%3E");
}
/* Local: escaparate con toldo */
.seg-local {
  --seg-a: var(--coral); --seg-b: var(--ambar);
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M200 242h390'/%3E%3Cpath d='M300 92h270l-14-44H314z'/%3E%3Cpath d='M300 92a16.9 16.9 0 0 0 33.8 0 16.9 16.9 0 0 0 33.8 0 16.9 16.9 0 0 0 33.8 0 16.9 16.9 0 0 0 33.8 0 16.9 16.9 0 0 0 33.8 0 16.9 16.9 0 0 0 33.8 0 16.9 16.9 0 0 0 33.8 0 16.9 16.9 0 0 0 33.8 0'/%3E%3Cpath d='M312 110v132M558 110v132'/%3E%3Cpath d='M336 242v-92h56v92'/%3E%3Crect x='416' y='140' width='120' height='64' rx='4'/%3E%3Cpath d='M416 172h120' stroke-dasharray='3 5'/%3E%3Ccircle cx='380' cy='198' r='3'/%3E%3C/svg%3E");
}
/* Personales: persona y latido */
.seg-personales {
  --seg-a: var(--positivo); --seg-b: var(--turquesa);
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='480' cy='64' r='32'/%3E%3Cpath d='M414 196c0-54 30-84 66-84s66 30 66 84'/%3E%3Cpath d='M180 226h130l14-30 18 60 16-84 14 54h200' stroke-dasharray='5 5'/%3E%3Cpath d='M560 34a12 12 0 0 1 18 16l-18 18-18-18a12 12 0 0 1 18-16z'/%3E%3C/svg%3E");
}
/* Vehículos: coche y carretera */
.seg-vehiculos {
  --seg-a: #0EA5E9; --seg-b: var(--turquesa);
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M290 186v-30l60-14 42-42h116l44 42h28q16 0 16 16v28h-38M302 186h-12M350 186h138'/%3E%3Ccircle cx='326' cy='186' r='24'/%3E%3Ccircle cx='326' cy='186' r='8'/%3E%3Ccircle cx='514' cy='186' r='24'/%3E%3Ccircle cx='514' cy='186' r='8'/%3E%3Cpath d='M372 140l30-28h50v28zM466 112h38l30 28h-68z'/%3E%3Cpath d='M180 226h410'/%3E%3Cpath d='M200 246h34M264 246h34M328 246h34M392 246h34M456 246h34M520 246h34'/%3E%3C/svg%3E");
}
/* Recordatorios: campana y calendario */
.seg-recordatorios {
  --seg-a: var(--ambar); --seg-b: var(--coral);
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M480 40V26M424 156v-52a56 56 0 0 1 112 0v52l18 24H406z'/%3E%3Cpath d='M464 196a16 16 0 0 0 32 0'/%3E%3Cpath d='M560 74a44 44 0 0 1 14 44M400 74a44 44 0 0 0-14 44' stroke-dasharray='4 5'/%3E%3Crect x='220' y='120' width='120' height='106' rx='10'/%3E%3Cpath d='M220 152h120M252 108v24M308 108v24'/%3E%3Ccircle cx='248' cy='178' r='3'/%3E%3Ccircle cx='280' cy='178' r='3'/%3E%3Ccircle cx='312' cy='178' r='3'/%3E%3Ccircle cx='248' cy='204' r='3'/%3E%3Ccircle cx='280' cy='204' r='6'/%3E%3C/svg%3E");
}
/* Incidencias: aviso y engranaje */
.seg-incidencias {
  --seg-a: var(--negativo); --seg-b: var(--ambar);
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M480 26l104 184H376z'/%3E%3Cpath d='M480 86v66'/%3E%3Ccircle cx='480' cy='180' r='5'/%3E%3Ccircle cx='290' cy='176' r='34'/%3E%3Ccircle cx='290' cy='176' r='12'/%3E%3Ccircle cx='290' cy='176' r='46' stroke-dasharray='8 10'/%3E%3Cpath d='M180 240h410' stroke-dasharray='3 7'/%3E%3C/svg%3E");
}
/* Webs: navegador y globo */
.seg-webs {
  --seg-a: var(--turquesa); --seg-b: var(--violeta);
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='320' y='28' width='260' height='176' rx='14'/%3E%3Cpath d='M320 62h260'/%3E%3Ccircle cx='340' cy='45' r='5'/%3E%3Ccircle cx='358' cy='45' r='5'/%3E%3Ccircle cx='376' cy='45' r='5'/%3E%3Cpath d='M400 98h140M400 122h160M400 146h110' stroke-dasharray='4 6'/%3E%3Ccircle cx='250' cy='176' r='52'/%3E%3Cellipse cx='250' cy='176' rx='22' ry='52'/%3E%3Cpath d='M198 176h104M206 150h88M206 202h88'/%3E%3C/svg%3E");
}
/* Inicio: evolución que sube */
.seg-inicio {
  --seg-a: var(--violeta); --seg-b: var(--turquesa);
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M200 20v220h390'/%3E%3Cpath d='M200 210l64-22 60 12 60-52 60-10 60-62 70-42'/%3E%3Cpath d='M200 210l64-22 60 12 60-52 60-10 60-62 70-42v190H200z' stroke-dasharray='2 8'/%3E%3Cpath d='M548 32l26-8-8 26'/%3E%3Ccircle cx='264' cy='188' r='4'/%3E%3Ccircle cx='384' cy='148' r='4'/%3E%3Ccircle cx='504' cy='76' r='4'/%3E%3C/svg%3E");
}

/* deuda ya pagada: misma banda que un servicio de baja, en verde */
.banda-baja.pagada { background: rgba(46, 204, 138, .45); }
.deuda.de-baja .barra { display: none; }
/* webs: logo pequeño junto al proyecto */
.web-proyecto { display: inline-flex; align-items: center; gap: 8px; }
.web-proyecto .logo.mini { width: 30px; height: 30px; border-radius: 9px; }

/* ---------- Resumen: dinero en cada cuenta (tarjetas por banco) ---------- */
.cab-centro { text-align: center; margin-bottom: 18px; }
.cab-centro .nota { margin-top: 4px; }
.nota.centro { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cta-grupo { --tono: var(--positivo); margin-top: 18px; }
.cta-grupo.t-reservado, .cta.t-reservado { --tono: var(--ambar); }
.cta-grupo.t-empresa, .cta.t-empresa { --tono: var(--violeta); }
.cta-grupo-tit { margin: 0 0 12px; text-align: center; font-weight: 700; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 8px; }
.cta-grupo-tit strong { color: var(--tono); }
.cta-grupo-tit small { flex-basis: 100%; }
.cta-grupo-tit .punto { width: 10px; height: 10px; border-radius: 50%; background: var(--tono); box-shadow: 0 0 12px var(--tono); align-self: center; }
.cta-rejilla { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.cta {
  --tono: var(--positivo);
  flex: 1 1 260px; max-width: 360px; min-width: 0; position: relative; overflow: hidden;
  padding: 16px 18px 18px; border-radius: 22px; border: 1px solid var(--cristal-borde);
  background:
    radial-gradient(140px circle at 100% 0%, color-mix(in srgb, var(--tono) 28%, transparent), transparent 70%),
    repeating-linear-gradient(135deg, transparent 0 9px, color-mix(in srgb, var(--tono) 7%, transparent) 9px 10px),
    var(--cristal);
  border-top: 3px solid var(--tono);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.cta:hover { transform: translateY(-3px); }
.cta-cab { display: flex; align-items: center; gap: 10px; }
.cta-nombre { min-width: 0; }
.cta-nombre strong { display: block; font-size: 1rem; line-height: 1.2; }
.cta-nombre small { font-size: .78rem; letter-spacing: .04em; }
.cta-saldo { margin: 12px 0 2px; font: 800 clamp(1.5rem, 5vw, 1.9rem) "Bricolage Grotesque", sans-serif; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cta-para { margin: 0; color: var(--suave); font-size: .84rem; }
.cta-cuota { margin-top: 12px; font-size: .8rem; font-weight: 700; }
.cta-cuota.ok { color: var(--positivo); }
.cta-cuota.falta { color: var(--negativo); }
.barra-c { display: block; height: 8px; border-radius: 99px; background: var(--borde); overflow: hidden; margin-bottom: 6px; }
.barra-c i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--tono), currentColor); }
.cta-tarjetas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.mini-tarjeta {
  position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "chip num" "quien quien" "uso uso";
  gap: 2px 8px; align-items: center; flex: 1 1 150px; max-width: 220px; min-width: 0; padding: 10px 12px; border-radius: 12px; color: #fff;
  background: linear-gradient(135deg, #2a1f6b, #6a4cff 60%, #ff6b5a); box-shadow: 0 10px 22px -12px rgba(20, 10, 60, .9);
}
.t-reservado .mini-tarjeta { background: linear-gradient(135deg, #3b2a12, #c9861f 60%, #ffb547); }
.t-empresa .mini-tarjeta { background: linear-gradient(135deg, #0b3b6e, #1464c0 60%, #2dd4bf); }
.chip-oro { grid-area: chip; width: 22px; height: 16px; border-radius: 4px; background: linear-gradient(135deg, #f7e08a, #c9a43a); }
.mt-num { grid-area: num; font: 700 .9rem ui-monospace, "Cascadia Mono", monospace; letter-spacing: .08em; text-align: right; }
.mt-quien { grid-area: quien; font-weight: 800; font-size: .82rem; }
.mt-uso { grid-area: uso; font-size: .72rem; opacity: .85; line-height: 1.25; overflow-wrap: anywhere; }
.cta-form { display: flex; gap: 8px; margin-top: 12px; }
.cta-form input { flex: 1 1 auto; min-width: 0; background: var(--cristal); color: var(--texto); border: 1px solid var(--cristal-borde); border-radius: 11px; padding: 7px 11px; font: inherit; font-size: .9rem; }

/* ---------- Resumen: ingresos del mes ---------- */
.ing-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px 28px; margin-bottom: 20px; }
.anillo {
  --p: 0; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--positivo) calc(var(--p) * 1%), var(--borde) 0);
  box-shadow: 0 0 40px -12px var(--positivo);
}
.anillo span { width: 100px; height: 100px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: var(--noche-2); }
.anillo b { font: 800 1.6rem "Bricolage Grotesque", sans-serif; line-height: 1; }
.anillo small { margin-top: 2px; }
.ing-cifras { text-align: center; }
.ing-cifras .cifra { margin: 0; }
.ing-rejilla { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.ing {
  --tono: var(--ambar);
  flex: 1 1 230px; max-width: 320px; min-width: 0; position: relative; overflow: hidden; text-align: center;
  padding: 18px 16px 14px; border-radius: 22px; border: 1px solid var(--cristal-borde);
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--tono) 26%, transparent), transparent 65%),
    radial-gradient(color-mix(in srgb, var(--tono) 18%, transparent) 1px, transparent 1.5px) 0 0 / 14px 14px,
    var(--cristal);
}
.ing.e-cobrado { --tono: var(--positivo); }
.ing.e-atrasado { --tono: var(--negativo); border-color: color-mix(in srgb, var(--negativo) 55%, transparent); }
.ing-icono { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, var(--tono), var(--violeta)); box-shadow: 0 10px 24px -12px var(--tono); }
.ing-icono svg { width: 28px; height: 28px; }
.ing-estado { position: absolute; top: 12px; right: 12px; padding: 3px 10px; border-radius: 99px; font-size: .72rem; font-weight: 800; color: var(--tono); background: color-mix(in srgb, var(--tono) 16%, transparent); border: 1px solid color-mix(in srgb, var(--tono) 40%, transparent); }
.ing.e-atrasado .ing-estado { animation: pulso 1.6s ease-in-out infinite; }
.ing h3 { margin: 10px 0 2px; font-size: 1.02rem; }
.ing-quien { margin: 0; color: var(--suave); font-size: .8rem; }
.ing-importe { margin: 10px 0 2px; font: 800 1.6rem "Bricolage Grotesque", sans-serif; color: var(--tono); font-variant-numeric: tabular-nums; }
.ing.e-pendiente .ing-importe { opacity: .75; }
.ing-cuando { margin: 0; font-size: .82rem; }
.ing-meses { list-style: none; display: flex; justify-content: center; gap: 8px; margin: 14px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--borde); }
.ing-meses li { display: grid; justify-items: center; gap: 3px; font-size: .66rem; color: var(--suave); text-transform: capitalize; }
.ing-meses i { width: 12px; height: 12px; border-radius: 50%; background: var(--borde); }
.ing-meses li.si i { background: var(--positivo); box-shadow: 0 0 8px var(--positivo); }
.ing-meses li.ahora i { background: transparent; border: 2px dashed var(--tono); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .anillo span { background: #fff; }
}
@media (max-width: 600px) {
  .cta, .ing { max-width: none; }
  .anillo { width: 112px; height: 112px; }
  .anillo span { width: 84px; height: 84px; }
}

/* Gastos: quesito por categoría (paleta categórica validada para daltonismo en los dos modos) */
.seg-gastos { --seg-a: var(--ambar); --seg-b: var(--coral); }
:root {
  --q1: #3987e5; --q2: #d95926; --q3: #199e70; --q4: #c98500; --q5: #d55181; --q6: #008300; --q7: #9085e9; --q8: #e66767; --q-resto: #8a85ad;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --q1: #2a78d6; --q2: #eb6834; --q3: #1baf7a; --q4: #eda100; --q5: #e87ba4; --q6: #008300; --q7: #4a3aa7; --q8: #e34948; --q-resto: #9b97b8;
  }
}
.q-c1 { --q: var(--q1); } .q-c2 { --q: var(--q2); } .q-c3 { --q: var(--q3); } .q-c4 { --q: var(--q4); }
.q-c5 { --q: var(--q5); } .q-c6 { --q: var(--q6); } .q-c7 { --q: var(--q7); } .q-c8 { --q: var(--q8); }
.q-resto { --q: var(--q-resto); } .q-fuera { --q: transparent; }
.gastos-filtros { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 10px; }
.gastos-filtros .chip { text-decoration: none; }
.gastos-filtros .chip.activo { background: linear-gradient(135deg, var(--violeta), var(--turquesa)); color: #fff; border-color: transparent; }
.quesito-caja { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 28px; margin-top: 18px; }
.quesito { width: min(300px, 100%); height: auto; flex: none; stroke: none; }
.quesito path { fill: var(--q); transition: transform .2s, opacity .2s; transform-origin: 0 0; }
.quesito a:hover path, .quesito a:focus path { transform: scale(1.04); }
.quesito:hover path { opacity: .7; } .quesito a:hover path { opacity: 1; }
.q-total { fill: var(--texto); font: 800 22px "Bricolage Grotesque", sans-serif; }
.q-sub { fill: var(--suave); font-size: 11px; }
.quesito-leyenda { list-style: none; margin: 0; padding: 0; flex: 1 1 300px; max-width: 440px; display: grid; gap: 4px; }
.quesito-leyenda a { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; color: var(--texto); text-decoration: none; }
.quesito-leyenda a:hover { background: var(--cristal); }
.q-nombre { flex: 1; min-width: 0; }
.q-nombre small { display: block; color: var(--suave); font-size: .75rem; }
.q-cifra { text-align: right; white-space: nowrap; }
.q-cifra small { display: inline; color: var(--suave); margin-left: 4px; }
.punto { display: inline-block; width: 12px; height: 12px; border-radius: 4px; flex: none; background: var(--q); border: 1px solid var(--q-resto); }
.punto.q-c1, .punto.q-c2, .punto.q-c3, .punto.q-c4, .punto.q-c5, .punto.q-c6, .punto.q-c7, .punto.q-c8 { border-color: transparent; }
.gastos-meses { display: block; width: 100%; height: 180px; stroke: none; }
.gastos-meses rect { fill: var(--q1); } .gastos-meses rect:hover { fill: var(--q7); }
.gastos-meses .eje { stroke: var(--borde); stroke-width: .3; }
.gastos-meses-et { display: flex; }
.gastos-meses-et span { flex: 1; text-align: center; font-size: .75rem; color: var(--suave); }
.gastos-meses-et b { display: block; color: var(--texto); font-weight: 600; }
.gastos-cambiar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gastos-cambiar select { padding: 6px 8px; border-radius: 10px; border: 1px solid var(--cristal-borde); background: var(--cristal); color: var(--texto); font: inherit; font-size: .85rem; max-width: 220px; }
.gastos-cambiar select option { background: var(--noche); color: var(--texto); }
.gastos-ultimos { margin-top: 12px; }
.gastos-ultimos summary { cursor: pointer; color: var(--suave); font-weight: 600; }
.gastos-ultimos td small { display: block; color: var(--suave); }
@media (max-width: 600px) {
  .gastos-meses { height: 130px; }
  .gastos-meses-et small { display: none; }
  .quesito { width: min(240px, 100%); }
}

/* Subvenciones: sobre con moneda y sello */
.seg-subvenciones {
  --seg-a: var(--ambar); --seg-b: var(--turquesa);
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='300' y='70' width='200' height='130' rx='10'/%3E%3Cpath d='M300 80l100 70 100-70'/%3E%3Ccircle cx='530' cy='70' r='44'/%3E%3Ccircle cx='530' cy='70' r='34' stroke-dasharray='3 5'/%3E%3Cpath d='M546 52a22 22 0 1 0 0 36M512 66h30M512 78h30'/%3E%3Cpath d='M220 230h360' stroke-dasharray='4 6'/%3E%3Cpath d='M240 120l20 20 40-44'/%3E%3C/svg%3E");
}
.subv-lista { display: grid; gap: 16px; }
.subv { padding: 18px; border-radius: var(--radio); background: var(--cristal); border: 1px solid var(--cristal-borde); }
.subv.subv-urgente { border-color: rgba(255, 181, 71, .6); background: linear-gradient(135deg, rgba(255, 181, 71, .14), var(--cristal)); }
.subv h3 { margin: 0 0 6px; font-size: 1.12rem; }
.subv header p { margin: 4px 0; }
.subv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.subv-datos { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0; }
.subv-datos > div { flex: 1 1 200px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--borde); }
.subv-datos span { display: block; font-size: .78rem; color: var(--suave); text-transform: uppercase; letter-spacing: .04em; }
.subv-datos strong { display: block; font-size: 1.05rem; }
.subv-quedan { color: var(--aviso); font-weight: 700; }
.subv-encaja { color: var(--suave); }
.subv-dudas { padding: 8px 12px; border-left: 3px solid var(--aviso); background: rgba(255, 181, 71, .08); border-radius: 6px; }
.subv details { margin: 8px 0; }
.subv summary { cursor: pointer; font-weight: 700; }
.subv ol, .subv ul { margin: 8px 0 0; padding-left: 22px; }
.subv li { margin: 4px 0; }

/* ---------- navegación por grupos: lateral en escritorio, barra inferior en móvil ---------- */
.marco { display: grid; grid-template-columns: minmax(0, 1fr); position: relative; z-index: 1; }
.columna { min-width: 0; }
.lateral-col { display: none; }
.marca { margin: 0 0 4px; padding: 0 10px; font: 800 1.35rem "Bricolage Grotesque", sans-serif; }
.g-hoy { --g: var(--p-hoy); }
.g-dinero { --g: var(--p-dinero); }
.g-casa { --g: var(--p-casa); }
.g-papeles { --g: var(--p-papeles); }
.g-familia { --g: var(--p-familia); }
.g-crecer { --g: var(--p-crecer); }
.grupo { display: grid; gap: 2px; padding: 8px; border-radius: 16px; background: color-mix(in srgb, var(--g) var(--g-fondo), transparent); border: 1px solid color-mix(in srgb, var(--g) 60%, transparent); }
.grupo-tit { margin: 0; padding: 2px 8px 4px; color: color-mix(in srgb, var(--g) var(--g-texto), var(--texto)); font-size: .78rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.grupo a { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 10px; color: var(--texto); font-weight: 500; transition: background .2s, transform .2s; }
.grupo a:hover { background: var(--cristal); text-decoration: none; transform: translateX(2px); }
.grupo a.activo { background: var(--g); color: var(--sobre-pastel); font-weight: 800; }

.barra-movil { position: fixed; inset: auto 0 0; z-index: 20; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); background: var(--noche-2); border-top: 1px solid var(--cristal-borde); }
.barra-movil > a, .hoja > summary { min-height: 50px; display: grid; place-items: center; align-content: center; gap: 1px; padding: 4px; border-radius: 12px; font-size: .74rem; font-weight: 700; color: var(--suave); text-align: center; list-style: none; cursor: pointer; }
.barra-movil > a:hover { text-decoration: none; }
.barra-movil .emoji { font-size: 1.15rem; line-height: 1.2; }
.hoja > summary::-webkit-details-marker { display: none; }
.barra-movil > a.activo, .hoja > summary.activo { color: var(--texto); background: var(--cristal); }
.hoja-dentro { position: fixed; inset: auto 0 calc(62px + env(safe-area-inset-bottom, 0px)); z-index: 19; display: grid; gap: 8px; max-height: 70vh; overflow-y: auto; padding: 14px max(16px, env(safe-area-inset-right, 0px)) 14px max(16px, env(safe-area-inset-left, 0px)); background: var(--noche-2); border-top: 1px solid var(--cristal-borde); border-radius: 22px 22px 0 0; box-shadow: var(--sombra); animation: hoja-sube .22s ease both; }
.hoja-dentro a { padding-block: 11px; }
@keyframes hoja-sube { from { transform: translateY(14px); } to { transform: none; } }

.cabecera:not(.grande) .retrato { display: none; }
.cabecera:not(.grande) .titulo { font-size: clamp(1.6rem, 5vw, 2.2rem); }
.contenido { padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }

@media (min-width: 900px) {
  .marco { grid-template-columns: 236px minmax(0, 1fr); }
  .lateral-col { display: block; }
  .lateral { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 12px; display: grid; gap: 10px; align-content: start; background: var(--cristal); border-right: 1px solid var(--cristal-borde); }
  .barra-movil { display: none; }
  .contenido { padding-bottom: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .hoja-dentro { animation: none; }
  .grupo a { transition: none; }
  .grupo a:hover { transform: none; }
}

/* ---------- portada Hoy ---------- */
.frase-hoy { margin: 0; font: 700 clamp(1.25rem, 3.4vw, 1.7rem)/1.25 "Bricolage Grotesque", sans-serif; text-align: center; text-wrap: balance; }
.dinero-bloque { display: grid; gap: 18px; min-width: 0; }

/* ---------- movimiento: entre páginas y realce de tarjetas y logos ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
.mini-tarjeta, .cta, .logo { transition: transform .22s ease, box-shadow .22s ease; }
.mini-tarjeta { position: relative; overflow: hidden; }
.mini-tarjeta::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .28) 50%, transparent 65%); transform: translateX(-120%); transition: transform .6s ease; pointer-events: none; }
.mini-tarjeta:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: 0 14px 28px -14px rgba(10, 5, 40, .8); }
.mini-tarjeta:hover::after { transform: translateX(120%); }
.cta:hover { transform: translateY(-3px); }
.logo:hover { transform: scale(1.08); }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .mini-tarjeta, .cta, .logo, .mini-tarjeta::after { transition: none; }
  .mini-tarjeta:hover, .cta:hover, .logo:hover { transform: none; }
}

/* En móvil, la fecha y el plazo arriba y el texto debajo a todo el ancho */
@media (max-width: 600px) {
  .seg-recordatorios .lista li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; }
  .seg-recordatorios .lista .txt { grid-column: 1 / -1; grid-row: 2; }
}

/* Misiones */
.fondo-misiones { --seg-a: #A78BFA; --seg-b: var(--turquesa); }
.mis-cabecera { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; text-align: center; }
.mis-rejilla { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 14px; }
.mis { flex: 1 1 280px; max-width: 420px; padding: 18px; border-radius: var(--radio); background: var(--cristal); border: 1px solid var(--cristal-borde); }
.mis h3 { margin: 6px 0; }
.mis.bloqueada, .mis.e-saltada { opacity: .62; }
.mis.e-hecha { border-color: var(--positivo); }
.mis-estado { margin: 0; font-size: .78rem; font-weight: 700; color: var(--suave); }
.mis.e-pendiente:not(.bloqueada) .mis-estado { color: var(--ambar); }
.mis.e-hecha .mis-estado { color: var(--positivo); }
.mis-pasos { margin: 10px 0; padding-left: 20px; }
.mis-pasos li { margin-bottom: 4px; }
.mis-acciones { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.mis-siguiente { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.mis-siguiente h2 { margin: 2px 0; }

/* Hijo */
.fondo-hijo { --seg-a: #FF8FB8; --seg-b: var(--ambar);
  --seg-dibujo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 260' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M470 90c-22-34-74-20-74 22 0 44 74 84 74 84s74-40 74-84c0-42-52-56-74-22z'/%3E%3Ccircle cx='340' cy='60' r='5'/%3E%3Ccircle cx='300' cy='120' r='3'/%3E%3Cpath d='M30 230c120-20 220-70 320-110' stroke-dasharray='4 7'/%3E%3C/svg%3E"); }
.g-familia-tarjeta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.g-familia-tarjeta h2 { margin: 2px 0; }
.hijo-etapas { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.hijo-etapas li { padding: 6px 16px; border-radius: 999px; background: var(--cristal); border: 1px solid var(--cristal-borde); color: var(--suave); font-weight: 700; font-size: .88rem; }
.hijo-etapas li.activa { background: var(--p-familia); color: var(--sobre-pastel); border-color: transparent; }
.hijo-cuenta { text-align: center; }
.hijo-cuenta .cifra { margin: 4px 0; }
.hijo-fechas { font-size: clamp(1.3rem, 5vw, 2rem); }
.hijo-linea { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; }
.hijo-linea p { flex-basis: 100%; margin: 0; text-align: center; }
.hijo-linea input { max-width: 100%; }
.hijo-lista { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 12px; }
.hijo-lista li { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: var(--radio); background: var(--cristal); border: 1px solid var(--cristal-borde); }
.hijo-lista li.hecho { opacity: .62; }
.hijo-lista p { margin: 0; }
.hijo-tit { font-weight: 700; }
.hijo-meta { margin-top: 4px !important; font-size: .8rem; font-weight: 700; color: var(--suave); }
.marca-hijo { width: 30px; height: 30px; flex: none; padding: 0; border-radius: 50%; border: 2px solid var(--cristal-borde); background: transparent; color: var(--sobre-pastel); cursor: pointer; font-weight: 800; }
.marca-hijo.si { background: var(--p-familia); border-color: transparent; }
.hijo-aviso { margin: 12px auto 0; padding: 10px 14px; max-width: 620px; border-radius: 12px; background: rgba(255, 181, 71, .16); border: 1px solid rgba(255, 181, 71, .45); text-align: center; }
.hijo-acciones { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.cal-cab { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 18px 0 10px; text-transform: capitalize; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; max-width: 440px; margin: 0 auto; }
.cal-dow { text-align: center; font-size: .75rem; font-weight: 700; color: var(--suave); }
.cal-dia { display: grid; place-items: center; aspect-ratio: 1; border-radius: 10px; background: var(--cristal); font-size: .88rem; }
.cal-dia.fuera { opacity: .35; }
.cal-dia.hoy { outline: 2px solid var(--violeta); outline-offset: -2px; font-weight: 800; }
.cal-dia.regla, .cal-ley .regla::before { background: var(--coral); color: #fff; }
.cal-dia.prevista, .cal-ley .prevista::before { background: rgba(255, 107, 90, .3); }
.cal-dia.fertil, .cal-ley .fertil::before { background: var(--p-familia); color: var(--sobre-pastel); }
.cal-dia.pico, .cal-ley .pico::before { background: var(--turquesa); color: var(--sobre-pastel); font-weight: 800; }
.cal-ley { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; font-size: .8rem; margin: 12px 0; }
.cal-ley span::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 5px; border-radius: 4px; vertical-align: -1px; }
.sem-tira { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 10px 0; }
.sem-tira a { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--cristal); font-size: .82rem; color: var(--texto); }
.sem-tira a.activo { background: var(--p-familia); color: var(--sobre-pastel); font-weight: 800; }
.sem-rejilla { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 14px 0; }
.sem-rejilla article { flex: 1 1 240px; max-width: 360px; padding: 14px; border-radius: var(--radio); background: var(--cristal); border: 1px solid var(--cristal-borde); }
.sem-rejilla h3 { margin: 0 0 6px; }
.sem-rejilla p { margin: 0; }
