[hidden] { display: none !important; }
/* =========================================================
   LibretaVet — estilo cálido y amigable
   Idea central: la libreta sanitaria de cartón. El historial
   es una línea "cosida" con un punto de color por tipo.
   El color de cada veterinaria llega en --color.
   ========================================================= */

:root {
  --color: #2F7D6D;
  --color-suave: color-mix(in srgb, var(--color) 11%, #fff);
  --color-medio: color-mix(in srgb, var(--color) 35%, #fff);
  --color-hondo: color-mix(in srgb, var(--color) 82%, #000);

  --papel: #FBF6EE;
  --papel-hondo: #F3EADC;
  --superficie: #FFFFFF;
  --tinta: #2D2B36;
  --tinta-2: #6C6775;
  --tinta-3: #9A94A3;
  --borde: #EEE4D5;
  --borde-fuerte: #DDD0BC;

  --rojo: #C2352B;
  --rojo-suave: #FDECE9;
  --rojo-borde: #F4C7C1;
  --ambar: #A86A0B;
  --ambar-suave: #FFF4DC;
  --ambar-borde: #F1DCA6;
  --verde: #1E7A44;
  --verde-suave: #E4F4EA;
  --wa: #1FAF55;

  --r-xl: 26px;
  --r-l: 18px;
  --r-m: 14px;
  --r-s: 10px;
  --sombra: 0 1px 0 rgba(90, 64, 30, .05), 0 10px 24px -18px rgba(90, 64, 30, .45);

  /* compatibilidad con estilos en línea */
  --fondo: var(--papel);
  --texto: var(--tinta);

  --menu-alto: 68px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: var(--papel);
  color: var(--tinta);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; color: var(--tinta); }
h1 { font-weight: 900; }
h2 { font-size: 1.25rem; font-weight: 800; margin: 0 0 .75rem; }
h3 { font-size: 1.05rem; font-weight: 800; }
p { margin: 0 0 .75rem; }
strong { font-weight: 800; }
a { color: var(--color); }

:focus-visible { outline: 3px solid var(--color-medio); outline-offset: 2px; border-radius: 8px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

.cargando { text-align: center; margin: 4rem 0; color: var(--tinta-3); font-weight: 600; }

/* ---------- Ingreso ---------- */
.login {
  max-width: 400px;
  margin: 3.5rem auto;
  padding: 2rem 1.5rem 1.5rem;
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--r-xl);
  box-shadow: var(--sombra);
}
@media (max-width: 440px) { .login { margin: 1.5rem 16px; } }
.login h1 { margin: .5rem 0 0; text-align: center; font-size: 1.9rem; }
.login .sub { text-align: center; color: var(--tinta-2); margin: .2rem 0 1.5rem; }
.marca {
  width: 64px; height: 64px; margin: 0 auto;
  display: grid; place-items: center;
  border-radius: 22px; background: var(--color); color: #fff;
  transform: rotate(-6deg);
}
.marca svg { width: 36px; height: 36px; fill: currentColor; stroke: none; }

.tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; margin-bottom: 1.25rem;
  background: var(--papel); border-radius: 999px;
}
.tabs button {
  padding: .6rem; border: 0; border-radius: 999px;
  background: transparent; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--tinta-2);
}
.tabs button.on { background: var(--superficie); color: var(--color); box-shadow: 0 1px 4px rgba(90, 64, 30, .15); }

/* ---------- Formularios ---------- */
label { display: block; margin-bottom: 1rem; font-weight: 700; font-size: .95rem; }

input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=date], input[type=search], select, textarea {
  display: block; width: 100%; margin-top: .35rem;
  min-height: 48px; padding: .7rem .9rem;
  border: 1.5px solid var(--borde-fuerte); border-radius: var(--r-m);
  font: inherit; font-weight: 600; font-size: 1rem;
  background: var(--superficie); color: var(--tinta);
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 96px; line-height: 1.45; }
input::placeholder, textarea::placeholder { color: var(--tinta-3); font-weight: 600; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--color);
  box-shadow: 0 0 0 4px var(--color-suave);
}
input[type=search] { margin: 0 0 1rem; border-radius: 999px; padding-left: 1.1rem; }

input[type=color] {
  display: block; margin-top: .35rem; width: 72px; height: 48px; padding: 4px;
  border: 1.5px solid var(--borde-fuerte); border-radius: var(--r-m); background: #fff; cursor: pointer;
}
input[type=file] { display: block; margin-top: .4rem; font: inherit; font-size: .9rem; font-weight: 600; color: var(--tinta-2); }
input[type=file]::file-selector-button {
  margin-right: .75rem; padding: .55rem 1rem;
  border: 1.5px solid var(--color-medio); border-radius: 999px;
  background: var(--color-suave); color: var(--color-hondo);
  font: inherit; font-weight: 800; cursor: pointer;
}

.ayuda { display: block; font-weight: 600; color: var(--tinta-2); font-size: .86rem; margin-top: .3rem; }
p.ayuda { margin: 0 0 .75rem; }

.dos { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 420px) { .dos { grid-template-columns: 1fr; gap: 0; } }

.check {
  display: flex; align-items: center; gap: .7rem; cursor: pointer;
  padding: .8rem .9rem; margin: .5rem 0 0;
  background: #F6F3FF; border: 1.5px dashed #C9BEF0; border-radius: var(--r-m);
}
.check input { width: 22px; height: 22px; margin: 0; accent-color: #6B55C9; flex-shrink: 0; }

/* ---------- Botones ---------- */
button, .boton-wa, a.secundario { -webkit-tap-highlight-color: transparent; }

button.primario {
  display: block; width: 100%; min-height: 52px; padding: .8rem 1.2rem;
  border: 0; border-radius: 999px;
  background: var(--color); color: #fff;
  font: inherit; font-size: 1.02rem; font-weight: 800; cursor: pointer;
  box-shadow: 0 6px 16px -10px var(--color);
  transition: transform .1s, filter .15s;
}
button.primario:hover { filter: brightness(1.06); }
button.primario:active { transform: scale(.98); }
button.primario:disabled { opacity: .6; cursor: wait; }
button.primario.chico { display: inline-block; width: auto; min-height: 40px; padding: .45rem 1rem; font-size: .95rem; }

button.secundario, a.secundario {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .65rem 1.1rem;
  border: 1.5px solid var(--color-medio); border-radius: 999px;
  background: var(--superficie); color: var(--color-hondo);
  font: inherit; font-size: 1rem; font-weight: 800; text-decoration: none; cursor: pointer;
  transition: background .15s;
}
button.secundario:hover, a.secundario:hover { background: var(--color-suave); }
button.secundario.chico { min-height: 38px; padding: .4rem .9rem; font-size: .92rem; }

.boton-wa {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .65rem 1.2rem; border-radius: 999px;
  background: var(--wa); color: #fff; font-weight: 800; text-decoration: none;
}
.boton-wa::before {
  content: ""; width: 20px; height: 20px; flex-shrink: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2zm5.3 14.1c-.2.6-1.3 1.2-1.8 1.2-.5.1-1 .2-3.3-.7-2.8-1.1-4.6-4-4.7-4.2-.1-.2-1.1-1.5-1.1-2.9s.7-2 1-2.3c.2-.3.5-.3.7-.3h.5c.2 0 .4 0 .6.5l.8 2c.1.2.1.4 0 .5l-.4.6-.3.4c-.1.1-.3.3-.1.6.2.3.8 1.3 1.7 2.1 1.2 1 2.1 1.4 2.4 1.5.3.1.5.1.6-.1l.9-1c.2-.3.4-.2.6-.1l1.9.9c.3.1.5.2.5.3.1.2.1.7-.1 1.3z'/%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 24 24'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2zm5.3 14.1c-.2.6-1.3 1.2-1.8 1.2-.5.1-1 .2-3.3-.7-2.8-1.1-4.6-4-4.7-4.2-.1-.2-1.1-1.5-1.1-2.9s.7-2 1-2.3c.2-.3.5-.3.7-.3h.5c.2 0 .4 0 .6.5l.8 2c.1.2.1.4 0 .5l-.4.6-.3.4c-.1.1-.3.3-.1.6.2.3.8 1.3 1.7 2.1 1.2 1 2.1 1.4 2.4 1.5.3.1.5.1.6-.1l.9-1c.2-.3.4-.2.6-.1l1.9.9c.3.1.5.2.5.3.1.2.1.7-.1 1.3z'/%3E%3C/svg%3E") center / contain no-repeat;
}

button.peligro {
  min-height: 44px; padding: .55rem 1.1rem;
  background: transparent; color: var(--rojo);
  border: 1.5px solid var(--rojo-borde); border-radius: 999px;
  font: inherit; font-weight: 800; cursor: pointer;
}
button.peligro.armado { background: var(--rojo); color: #fff; border-color: var(--rojo); }
button.peligro.chico { min-height: 36px; padding: .35rem .85rem; font-size: .85rem; margin-top: .9rem; }

.link-boton {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: inherit; font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px;
}

.volver {
  display: inline-flex; align-items: center; gap: .3rem;
  background: none; border: 0; padding: .3rem 0; margin-bottom: .6rem;
  color: var(--tinta-2); font: inherit; font-weight: 800; cursor: pointer;
}
.volver:hover { color: var(--color); }

.botones { display: flex; gap: .6rem; flex-wrap: wrap; }
.botones > * { flex: 1; min-width: 140px; white-space: nowrap; }
.botones .primario { width: auto; }

.msg { min-height: 1.3rem; margin: .8rem 0 0; font-size: .95rem; font-weight: 700; text-align: center; }
.msg.error { color: var(--rojo); }
.msg.ok { color: var(--verde); }

/* ---------- Estructura: barra + menú ---------- */
.barra {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: .7rem;
  padding: .7rem 16px;
  background: color-mix(in srgb, var(--papel) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--borde);
}
.barra img, .logo-vacio {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 13px; object-fit: contain;
  background: #fff; border: 1px solid var(--borde);
}
.logo-vacio { display: grid; place-items: center; background: var(--color); border: 0; color: #fff; }
.logo-vacio svg { width: 24px; height: 24px; fill: currentColor; stroke: none; }
.barra .nombre { font-weight: 900; font-size: 1.12rem; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Menú: abajo en el celular */
.menu {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: var(--superficie);
  border-top: 1px solid var(--borde);
  box-shadow: 0 -8px 24px -18px rgba(90, 64, 30, .5);
}
.menu button {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 4px 2px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: .72rem; font-weight: 800; color: var(--tinta-3);
}
.menu svg {
  width: 26px; height: 26px; padding: 3px 14px; box-sizing: content-box;
  border-radius: 999px;
  fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
  transition: background .15s;
}
.menu button.on { color: var(--color-hondo); }
.menu button.on svg { background: var(--color-suave); }
.menu .salir { display: none; }

main { max-width: 680px; margin: 0 auto; padding: 1rem 16px calc(var(--menu-alto) + 2rem); }
.solo-movil { margin-bottom: 1rem; }
.solo-movil .secundario { width: 100%; }

/* Menú: al costado en la compu */
@media (min-width: 900px) {
  .shell {
    display: grid; grid-template-columns: 250px 1fr;
    grid-template-rows: auto 1fr; min-height: 100vh;
  }
  .barra {
    grid-column: 1; grid-row: 1;
    position: static; background: var(--superficie);
    border-bottom: 0; border-right: 1px solid var(--borde);
    padding: 1.4rem 1.1rem 1rem; backdrop-filter: none;
  }
  .barra img, .logo-vacio { width: 46px; height: 46px; border-radius: 15px; }
  .menu {
    grid-column: 1; grid-row: 2;
    position: sticky; top: 0; align-self: start; height: calc(100vh - 88px);
    display: flex; flex-direction: column; gap: 4px;
    padding: .5rem .8rem 1.2rem;
    background: var(--superficie); border-top: 0; border-right: 1px solid var(--borde); box-shadow: none;
  }
  .menu button {
    flex-direction: row; gap: .7rem; padding: .7rem .8rem;
    border-radius: var(--r-m); font-size: 1rem; color: var(--tinta-2);
  }
  .menu svg { width: 22px; height: 22px; padding: 0; background: none !important; }
  .menu button:hover { background: var(--papel); }
  .menu button.on { background: var(--color-suave); color: var(--color-hondo); }
  .menu .salir { display: flex; margin-top: auto; }
  main { grid-column: 2; grid-row: 1 / span 2; width: 100%; padding: 2rem 2rem 3rem; }
  .solo-movil { display: none; }
}

/* ---------- Tarjetas ---------- */
.tarjeta {
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--r-l);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--sombra);
}
.tarjeta > :last-child { margin-bottom: 0; }

.fila-titulo { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .9rem; }
.fila-titulo h2, .fila-titulo h3 { margin: 0; }

.etiqueta {
  display: inline-block; padding: .1rem .7rem; border-radius: 999px;
  background: var(--color-suave); color: var(--color-hondo);
  font-weight: 800; font-size: .88rem;
}

.vacio { text-align: center; color: var(--tinta-2); font-weight: 600; padding: 1.5rem .5rem; margin: 0; }

/* Aviso amarillo (ej. falta el WhatsApp) */
.aviso {
  padding: .85rem 1rem; margin-bottom: 1rem;
  background: var(--ambar-suave); border: 1px solid var(--ambar-borde);
  border-radius: var(--r-m); color: #6E4708; font-weight: 600; font-size: .95rem;
}
.tarjeta .aviso { margin: .25rem 0 1rem; }

/* ---------- Inicio ---------- */
.resumen { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: 1rem; }
.dato {
  padding: .8rem .5rem; text-align: center;
  background: var(--papel); border-radius: var(--r-m);
}
.dato strong { display: block; font-size: 2rem; font-weight: 900; line-height: 1.1; }
.dato span { font-size: .82rem; font-weight: 700; color: var(--tinta-2); }
.dato.rojo { background: var(--rojo-suave); }
.dato.rojo strong { color: var(--rojo); }
.dato.amarillo { background: var(--ambar-suave); }
.dato.amarillo strong { color: var(--ambar); }
.resumen + .secundario { width: 100%; }

/* ---------- Lista de mascotas ---------- */
.lista { display: flex; flex-direction: column; gap: .5rem; }
.item {
  display: flex; align-items: center; gap: .85rem; width: 100%;
  padding: .7rem .8rem; text-align: left; cursor: pointer;
  background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--r-l);
  font: inherit; color: inherit;
  transition: border-color .15s, background .15s;
}
.item:hover { border-color: var(--color-medio); background: color-mix(in srgb, var(--color) 4%, #fff); }
.item-texto { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.item-texto strong { font-size: 1.05rem; text-transform: capitalize; }
.item-texto span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tinta-2); font-weight: 600; font-size: .93rem; }
.item-texto .ayuda { margin: 0; font-size: .84rem; }
.flecha { font-size: 1.6rem; color: var(--tinta-3); line-height: 1; }

.avatar { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.sin-foto { display: inline-grid; place-items: center; background: var(--papel); border: 1px solid var(--borde); }
.avatar.sin-foto { font-size: 1.7rem; }
.avatar.mini { width: 28px; height: 28px; }
.avatar.mini.sin-foto { font-size: 1rem; }

/* ---------- Ficha de la mascota (cabecera sin tarjeta) ---------- */
.tarjeta.ficha {
  display: flex; align-items: center; gap: 1.1rem;
  background: none; border: 0; box-shadow: none; padding: .5rem 0 1rem;
}
.foto-grande {
  width: 108px; height: 108px; flex-shrink: 0;
  border-radius: 50%; object-fit: cover;
  border: 4px solid var(--superficie);
  box-shadow: 0 0 0 3px var(--color), 0 10px 24px -14px rgba(90, 64, 30, .6);
}
.foto-grande.sin-foto { font-size: 3.2rem; background: var(--superficie); }
.ficha h2 { font-size: 1.9rem; font-weight: 900; margin: 0 0 .4rem; text-transform: capitalize; }
.meta { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .75rem; }
.meta span {
  padding: .15rem .65rem; border-radius: 999px;
  background: var(--superficie); border: 1px solid var(--borde);
  font-size: .86rem; font-weight: 700; color: var(--tinta-2);
}
.foto-actual { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; display: block; margin: .5rem 0; border: 1px solid var(--borde); }
.logo-actual { height: 80px; max-width: 100%; object-fit: contain; display: block; margin: .5rem 0; border-radius: var(--r-m); }

@media (max-width: 420px) {
  .foto-grande { width: 92px; height: 92px; }
  .ficha h2 { font-size: 1.6rem; }
}

/* ---------- Vencimientos ---------- */
.venc {
  display: flex; justify-content: space-between; align-items: center; gap: .6rem;
  padding: .7rem .85rem; margin-bottom: .45rem;
  border-radius: var(--r-m); border: 1px solid var(--borde); background: var(--superficie);
  font-weight: 600;
}
.venc .chip {
  flex-shrink: 0; padding: .2rem .7rem; border-radius: 999px;
  font-size: .84rem; font-weight: 800; white-space: nowrap;
}
.venc.vencido { background: var(--rojo-suave); border-color: var(--rojo-borde); }
.venc.vencido .chip { background: var(--rojo); color: #fff; }
.venc.pronto { background: var(--ambar-suave); border-color: var(--ambar-borde); }
.venc.pronto .chip { background: var(--ambar); color: #fff; }
.venc.ok .chip { background: var(--papel); color: var(--tinta-2); }
button.venc { width: 100%; text-align: left; font: inherit; font-weight: 600; color: inherit; cursor: pointer; }
.venc-texto { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.venc-det { font-size: .92rem; color: var(--tinta-2); font-weight: 600; overflow-wrap: anywhere; }
.venc-masc { display: flex; align-items: center; gap: .45rem; text-transform: capitalize; }
.venc-masc + .venc-det { padding-left: calc(28px + .45rem); }

.filtros { display: flex; gap: .4rem; flex-wrap: wrap; }
.filtros button {
  display: inline-flex; align-items: center; gap: .4rem;
  min-height: 40px; padding: .4rem .95rem;
  border: 1.5px solid var(--borde-fuerte); border-radius: 999px;
  background: var(--superficie); cursor: pointer;
  font: inherit; font-weight: 800; font-size: .93rem; color: var(--tinta-2);
}
.filtros button.on { background: var(--color); border-color: var(--color); color: #fff; }
.filtros .cant {
  min-width: 1.5rem; padding: 0 .4rem; border-radius: 999px; text-align: center;
  background: var(--papel); color: var(--tinta-2); font-size: .8rem;
}
.filtros button.on .cant { background: rgba(255, 255, 255, .25); color: #fff; }

.grupo .fila-titulo { margin-bottom: .7rem; }
.grupo.avisado { background: color-mix(in srgb, var(--superficie) 70%, var(--papel)); }
.grupo .boton-wa { width: 100%; }
.badge-avisado {
  padding: .15rem .65rem; border-radius: 999px; white-space: nowrap;
  background: var(--verde-suave); color: var(--verde); font-size: .82rem; font-weight: 800;
}

/* ---------- Libreta: línea de tiempo "cosida" ---------- */
.t-vacuna { --tipo: #3B7DD8; }
.t-desparasitacion { --tipo: #3E9B5B; }
.t-cirugia { --tipo: #D14D78; }
.t-medicacion { --tipo: #8A5BD6; }
.t-dieta { --tipo: #E0892B; }
.t-consulta { --tipo: #23999A; }
.t-peso, .t-otro { --tipo: #8C8795; }

.historial { position: relative; display: flex; flex-direction: column; gap: .55rem; padding-left: 1.6rem; }
.historial::before {
  content: ""; position: absolute; left: .55rem; top: .9rem; bottom: .9rem;
  border-left: 2px dashed var(--borde-fuerte);
}
.historial > .vacio { margin-left: -1.6rem; }

.anot {
  position: relative; display: flex; flex-direction: column; gap: .1rem; width: 100%;
  padding: .75rem .95rem; text-align: left;
  background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--r-m);
  font: inherit; color: inherit;
}
button.anot { cursor: pointer; transition: border-color .15s; }
button.anot:hover { border-color: var(--borde-fuerte); }
.anot::before {
  content: ""; position: absolute; left: calc(-1.6rem + .55rem - 6px); top: 1rem;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--tipo, var(--color));
  box-shadow: 0 0 0 3px var(--superficie);
}
.anot-fecha { font-size: .82rem; font-weight: 800; color: var(--tinta-3); font-variant-numeric: tabular-nums; }
.anot-cuerpo { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.anot-cuerpo > strong { color: var(--tipo, var(--tinta)); }
.anot-detalle { white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 600; }
.anot-cuerpo .ayuda { margin: .1rem 0 0; }

.anot.interna { background: #F7F4FF; border: 1.5px dashed #C9BEF0; }
.badge-interna {
  display: inline-block; align-self: flex-start;
  padding: .05rem .5rem; border-radius: 999px;
  background: #E7E0FF; color: #4F3FA0; font-size: .74rem; font-weight: 800;
}

.atajos { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.4rem 0 .4rem; }
.atajos button {
  min-height: 34px; padding: .3rem .75rem; cursor: pointer;
  border: 1.5px solid var(--borde-fuerte); border-radius: 999px; background: var(--superficie);
  font: inherit; font-size: .86rem; font-weight: 800; color: var(--tinta-2);
}
.atajos button:hover { border-color: var(--color); color: var(--color-hondo); background: var(--color-suave); }

.sub-titulo { margin: 1.3rem 0 .6rem; }
.espacio { margin-top: 1rem; }
.borrar-zona { margin-top: 1.5rem; text-align: center; }

/* ---------- Libreta del dueño: QR y link ---------- */
.qr-zona { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; margin: .75rem 0 1rem; }
.qr-zona img {
  width: 156px; height: 156px; padding: 8px;
  image-rendering: pixelated;
  border: 1px solid var(--borde); border-radius: var(--r-l); background: #fff;
}
.qr-zona .botones { flex-direction: column; flex: 1; min-width: 200px; gap: .5rem; }
.qr-zona .botones > * { width: 100%; flex: none; }
input.link-publico {
  display: block; width: 100%; padding: .6rem .9rem;
  border: 1.5px solid var(--borde); border-radius: var(--r-m); font-family: inherit;
  min-height: 44px; font-size: .86rem; font-weight: 600;
  background: var(--papel); color: var(--tinta-2); border-color: var(--borde);
}

/* ---------- Página pública del dueño ---------- */
.publica .barra { position: static; justify-content: center; background: var(--superficie); padding: 1rem 16px; }
.publica main { padding-bottom: 2rem; }
.acciones-dueno { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.acciones-dueno > * { width: 100%; }
.pie { text-align: center; color: var(--tinta-3); font-size: .85rem; font-weight: 600; margin: 1.25rem 0 2rem; }
.publica .tarjeta.ficha .ayuda { margin: 0; }

/* ---------- Impresión ---------- */
@media print {
  body { background: #fff; }
  .no-imprimir, .menu { display: none !important; }
  .barra, .venc, .venc .chip, .anot::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .barra { position: static; border-bottom: 2px solid var(--color); }
  .tarjeta { break-inside: avoid; box-shadow: none; border-color: #ddd; }
  main { max-width: none; margin: 0; padding: 0 1rem; }
}

/* ---------- Suscripción y solo lectura ---------- */
.solo-lectura .requiere-pago { display: none !important; }
.aviso.rojo { background: var(--rojo-suave); border-color: var(--rojo-borde); color: #7A1E17; }
.aviso .link-boton { margin-left: .2rem; }

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset:disabled { opacity: .6; }

.datos-plan { margin: 0; display: grid; gap: .5rem; }
.datos-plan > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding-bottom: .5rem; border-bottom: 1px dashed var(--borde);
}
.datos-plan > div:last-child { border-bottom: 0; padding-bottom: 0; }
.datos-plan dt { color: var(--tinta-2); font-weight: 700; }
.datos-plan dd { margin: 0; font-weight: 800; text-align: right; }
.estado-prueba { color: var(--color-hondo); }
.estado-al_dia { color: var(--verde); }
.estado-gracia { color: var(--ambar); }
.estado-vencida, .estado-suspendida { color: var(--rojo); }
.espacio > .secundario, .espacio > .boton-pagar { width: 100%; }
a.boton-pagar {
  display: flex; align-items: center; justify-content: center; min-height: 52px;
  border-radius: 999px; background: var(--color); color: #fff; font-weight: 800; text-decoration: none;
}

.pagos { list-style: none; margin: 0; padding: 0; }
.pagos li {
  display: grid; grid-template-columns: auto 1fr auto; gap: .75rem;
  padding: .45rem 0; border-bottom: 1px dashed var(--borde); font-weight: 600; font-size: .93rem;
}
.pagos li:last-child { border-bottom: 0; }
.pagos li span:first-child { color: var(--tinta-2); font-variant-numeric: tabular-nums; }

/* ---------- Portada de la libreta del dueño (se abre como un libro) ---------- */
body.con-portada { overflow: hidden; }
.portada {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--papel) 82%, var(--color));
  perspective: 1800px; cursor: pointer;
  transition: background .5s ease .55s, opacity .45s ease .75s;
}
.portada:focus-visible { outline: none; }
.portada.abriendo { background: transparent; opacity: 0; pointer-events: none; }

.libro {
  position: relative; width: min(82vw, 380px); aspect-ratio: 3 / 4.25;
  transform-style: preserve-3d;
  animation: libro-entra .7s cubic-bezier(.2, .8, .2, 1) both;
}
.portada.abriendo .libro { transform: scale(1.03); transition: transform 1s cubic-bezier(.6, .05, .3, 1); }
.hojas { display: grid; place-items: center; }
.hojas svg { width: 34%; fill: var(--tapa-color, var(--color)); opacity: .14; }

/* hojas que asoman debajo de la tapa */
.hojas {
  position: absolute; inset: 8px -6px 8px 12px;
  border-radius: 4px 14px 14px 4px;
  background:
    repeating-linear-gradient(to right, transparent 0 3px, rgba(120, 95, 60, .12) 3px 4px) right / 10px 100% no-repeat,
    #FFFDF8;
  box-shadow: 0 24px 50px -28px rgba(60, 40, 15, .7);
}

.tapa {
  position: absolute; inset: 0;
  transform-origin: left center; transform-style: preserve-3d;
  transition: transform 1.05s cubic-bezier(.6, .05, .3, 1);
}
.portada.abriendo .tapa { transform: rotateY(-168deg); }

.frente, .dorso {
  position: absolute; inset: 0; border-radius: 6px 20px 20px 6px;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.frente {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .55rem;
  padding: 2rem 1.6rem 2.8rem 2.2rem; text-align: center; color: #fff;
  background:
    radial-gradient(120% 80% at 30% 15%, rgba(255, 255, 255, .18), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 6px),
    var(--tapa);
  box-shadow: 0 30px 60px -30px rgba(40, 25, 10, .75), inset 0 0 0 1px rgba(0, 0, 0, .08);
}
/* lomo del libro */
.frente::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 22px; border-radius: 6px 0 0 6px;
  background: linear-gradient(to right, rgba(0, 0, 0, .28), rgba(0, 0, 0, .06) 70%, rgba(255, 255, 255, .12));
}
/* marco grabado */
.frente::after {
  content: ""; position: absolute; inset: 16px 16px 16px 34px; border-radius: 4px 12px 12px 4px;
  border: 1.5px solid rgba(255, 255, 255, .35); pointer-events: none;
}
.tapa.clara .frente { color: var(--tinta); }
.tapa.clara .frente::after { border-color: rgba(45, 43, 54, .25); }
.dorso { transform: rotateY(180deg); background: #F3EADC; box-shadow: inset -12px 0 24px -12px rgba(0, 0, 0, .25); }

.portada-logo {
  width: 128px; height: 128px; border-radius: 50%; overflow: hidden; margin-bottom: .4rem;
  display: grid; place-items: center; background: #fff;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, .35), 0 14px 30px -16px rgba(0, 0, 0, .6);
}
.portada-logo img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.portada-pata svg { width: 64px; height: 64px; fill: currentColor; display: block; }
.portada-vet { font-weight: 900; font-size: 1.3rem; line-height: 1.15; text-wrap: balance; }
.portada-linea { width: 56px; height: 3px; border-radius: 2px; background: currentColor; opacity: .45; margin: .35rem 0 .2rem; }
.portada-sub { font-weight: 700; font-size: .92rem; opacity: .85; }
.portada-nombre { font-weight: 900; font-size: 2.5rem; line-height: 1.05; text-transform: capitalize; overflow-wrap: anywhere; }
.portada-toca {
  position: absolute; left: 0; right: 0; bottom: 1.3rem;
  font-weight: 800; font-size: .85rem; opacity: .8;
  animation: toca 1.6s ease-in-out infinite;
}

@keyframes libro-entra { from { transform: translateY(24px) scale(.92); opacity: 0; } }
@keyframes toca { 50% { opacity: .35; } }

@media (prefers-reduced-motion: reduce) {
  .libro, .portada-toca { animation: none; }
  .tapa, .portada.abriendo .libro { transition: none; }
  .portada.abriendo .tapa, .portada.abriendo .libro { transform: none; }
  .portada { transition: opacity .3s ease; }
}
@media print { .portada { display: none !important; } }

/* ---------- Fotos de la libreta de papel ---------- */
.fotos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .6rem; margin: .25rem 0 1rem; }
.foto-item { position: relative; border-radius: var(--r-m); overflow: hidden; background: var(--papel); border: 1px solid var(--borde); aspect-ratio: 3 / 4; }
.foto-item a { display: block; width: 100%; height: 100%; }
.foto-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto-item.nueva { border: 2px solid var(--color); }
.foto-fecha {
  position: absolute; left: 0; right: 0; bottom: 0; padding: .9rem .45rem .3rem;
  background: linear-gradient(to top, rgba(0, 0, 0, .6), transparent);
  color: #fff; font-size: .74rem; font-weight: 800; pointer-events: none;
}
.foto-nueva {
  position: absolute; left: .35rem; top: .35rem; padding: .05rem .5rem; border-radius: 999px;
  background: var(--color); color: #fff; font-size: .72rem; font-weight: 800;
}
.foto-borrar {
  position: absolute; right: .35rem; top: .35rem; min-width: 30px; height: 30px; padding: 0 .45rem;
  border: 0; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--rojo);
  font: inherit; font-size: 1.1rem; font-weight: 900; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.foto-borrar.armado { background: var(--rojo); color: #fff; font-size: .78rem; }

label.subir-foto { width: 100%; cursor: pointer; margin: 0; }
.fila-titulo label.subir-foto { width: auto; }
label.subir-foto.cargando-boton { opacity: .6; pointer-events: none; }

.consejos { margin-top: .9rem; font-size: .92rem; color: var(--tinta-2); }
.consejos summary { cursor: pointer; font-weight: 800; color: var(--color-hondo); }
.consejos ul { margin: .5rem 0 0; padding-left: 1.2rem; display: grid; gap: .25rem; font-weight: 600; }

.badge-foto {
  align-self: flex-start; margin-top: .25rem; padding: .05rem .55rem; border-radius: 999px;
  background: var(--color-suave); color: var(--color-hondo); font-size: .76rem !important; font-weight: 800 !important;
}
.aviso.verde { background: var(--color-suave); border-color: var(--color-medio); color: var(--color-hondo); }
label.subir-foto { position: relative; overflow: hidden; }
.subir-foto input.input-oculto {
  position: absolute !important; inset: 0; width: 100% !important; height: 100% !important;
  margin: 0 !important; padding: 0 !important; opacity: 0; cursor: pointer; font-size: 0; display: block !important;
}
label.subir-foto {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 48px; padding: .65rem 1.1rem; margin: 0;
  border: 1.5px solid var(--color-medio); border-radius: 999px;
  background: var(--superficie); color: var(--color-hondo);
  font-size: 1rem; font-weight: 800; cursor: pointer;
}
label.subir-foto:hover { background: var(--color-suave); }
#papel label.subir-foto { display: flex; width: 100%; }
#papel label.subir-foto::before { content: "📷"; }
.fila-titulo label.subir-foto { min-height: 38px; padding: .4rem .9rem; font-size: .92rem; }

/* ---------- Estampilla de la vacuna (como la del frasco) ---------- */
.estampilla {
  display: inline-flex; align-self: flex-start; max-width: 100%; margin: .35rem 0 .15rem;
  border-radius: 6px; overflow: hidden; box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 4px 10px -6px rgba(0, 0, 0, .35);
  border: 1px solid #DDD3C4; font-size: .78rem; line-height: 1.25; transform: rotate(-.6deg);
}
.est-marca {
  display: flex; flex-direction: column; justify-content: center; gap: .05rem;
  padding: .45rem .65rem; background: #fff; border-left: 6px solid #6E1F3C; min-width: 0;
}
.est-prod { font-weight: 900; color: var(--tinta); overflow-wrap: anywhere; }
.est-sub { color: var(--tinta-3); font-weight: 700; font-size: .7rem; }
.est-datos {
  display: flex; flex-direction: column; justify-content: center; gap: .1rem;
  padding: .45rem .65rem; background: #1F1D24; color: #fff; font-variant-numeric: tabular-nums;
  font-weight: 700; letter-spacing: .02em; white-space: nowrap;
}
.est-datos b { display: inline-block; min-width: 3.9em; font-weight: 600; opacity: .7; }
.producto-chip {
  align-self: flex-start; margin: .3rem 0 .1rem; padding: .1rem .6rem; border-radius: 999px;
  background: var(--papel); border: 1px solid var(--borde); font-size: .8rem; font-weight: 800; color: var(--tinta-2);
}

/* ---------- Sello del veterinario ---------- */
.firma { display: block; margin-top: .45rem; }
.sello {
  display: inline-flex; flex-direction: column; align-items: center; gap: 0;
  padding: .35rem .8rem; border: 2px solid #2E3F8F; border-radius: 6px; outline: 1px solid #2E3F8F; outline-offset: 2px;
  color: #2E3F8F; transform: rotate(-2.5deg); opacity: .85; text-align: center; line-height: 1.15; background: transparent;
}
.sello-nombre { font-weight: 900; font-size: .86rem; letter-spacing: .01em; }
.sello-titulo { font-weight: 700; font-size: .72rem; }
.sello-mat { font-weight: 800; font-size: .72rem; }
.sello.chico { padding: .25rem .6rem; }
.sello.chico .sello-nombre { font-size: .78rem; }
.sello-foto { border: 0; outline: 0; padding: 0; opacity: 1; }
.sello-foto img { max-height: 64px; max-width: 160px; display: block; mix-blend-mode: multiply; }
.sello-foto.chico img { max-height: 48px; }

/* ---------- Portada con foto de la tapa ---------- */
.frente.con-foto { padding: 0; overflow: hidden; justify-content: flex-end; }
.frente.con-foto::after { display: none; }
.frente.con-foto::before { z-index: 2; }
.portada-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* etiqueta blanca con el nombre, como un sticker pegado en la tapa */
.portada-banda {
  position: relative; z-index: 3; margin: 0 1.2rem 3.2rem 2rem; padding: .7rem 1rem .8rem;
  display: flex; flex-direction: column; align-items: center; gap: 0;
  background: #fff; color: var(--tinta); border-radius: 10px; transform: rotate(-1.5deg);
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .6);
}
.portada-banda .portada-sub { opacity: .7; }
.portada-nombre.chica { font-size: 1.8rem; }
.frente.con-foto .portada-toca { z-index: 3; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); }

/* ---------- Ajustes: portada y veterinarios ---------- */
.portada-config { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin: .5rem 0 .25rem; }
.portada-mini {
  width: 120px; aspect-ratio: 3 / 4.25; border-radius: 4px 12px 12px 4px; overflow: hidden; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; padding: .6rem;
  background: var(--tapa); color: #fff; box-shadow: inset 8px 0 0 rgba(0, 0, 0, .12), 0 10px 20px -12px rgba(0, 0, 0, .5);
  text-align: center; font-weight: 900; font-size: .72rem;
}
.portada-mini.con-foto { padding: 0; }
.portada-mini.con-foto img { width: 100%; height: 100%; object-fit: cover; }
.portada-mini-logo { width: 54px; height: 54px; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden; color: var(--tapa); }
.portada-mini-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.portada-mini-logo svg { width: 28px; height: 28px; fill: currentColor; stroke: none; }
.portada-acciones { display: flex; flex-direction: column; gap: .5rem; flex: 1; min-width: 180px; }
.portada-acciones .peligro.chico { margin-top: 0; align-self: flex-start; }

.lista-vets { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.vet-item { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem .9rem; padding: .8rem .9rem; border: 1px solid var(--borde); border-radius: var(--r-m); }
.vet-item .sello { flex-shrink: 0; }
.vet-acciones { margin-left: auto; }
.vet-texto { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.vet-texto .ayuda { margin: 0; }
.vet-acciones { display: flex; gap: .8rem; }
.peligro-link { color: var(--rojo); }
.form-vet { border-top: 1px dashed var(--borde); padding-top: 1rem; }
label.subir-foto.chico-full { width: 100%; margin-bottom: .8rem; font-size: .95rem; }
.sub-etiqueta { font-weight: 800; color: var(--tinta-2); font-size: .88rem; margin: -.2rem 0 .5rem; }
#bloque-lote { padding: .8rem .9rem .1rem; margin-bottom: 1rem; border-radius: var(--r-m); background: var(--papel); border: 1px dashed var(--borde-fuerte); }

.form-vet .botones > * { white-space: normal; }

/* ---------- Portada digital: estilo Clásica (como la libreta de papel) ---------- */
.tapa { container-type: inline-size; }
.frente.clasica {
  justify-content: flex-start; gap: 0; padding: 7cqw 8cqw 9cqw 11cqw;
  background:
    radial-gradient(130% 90% at 25% 10%, rgba(255, 255, 255, .16), transparent 60%),
    repeating-radial-gradient(circle at 30% 40%, rgba(0, 0, 0, .025) 0 1px, transparent 1px 3px),
    var(--tapa);
}
.frente.clasica::after { display: none; }
.frente.clasica.tinta-oscura { color: #1F2A17; --tinta-tapa: #1F2A17; }
.frente.clasica.tinta-clara { color: #fff; --tinta-tapa: #fff; }

.cl-cab { width: 100%; display: flex; align-items: center; justify-content: center; gap: 3cqw; }
.cl-textos { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.cl-l1 { font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 5.2cqw; letter-spacing: .14em; line-height: 1.1; }
.cl-titulo {
  font-family: 'Oswald', 'Arial Narrow', sans-serif; font-weight: 700; text-transform: uppercase;
  line-height: .95; letter-spacing: -.01em; text-align: center; overflow-wrap: anywhere; margin-top: .6cqw;
}
.cl-titulo.t-xl { font-size: 15cqw; }
.cl-titulo.t-l { font-size: 12cqw; }
.cl-titulo.t-m { font-size: 9.5cqw; }
.cl-titulo.t-s { font-size: 7.5cqw; }
.cl-logo { flex-shrink: 0; width: 17cqw; height: 17cqw; border-radius: 50%; background: #fff; overflow: hidden; display: grid; place-items: center; box-shadow: 0 0 0 .8cqw rgba(255, 255, 255, .35); }
.cl-logo img { width: 100%; height: 100%; object-fit: contain; padding: 1.4cqw; }

.cl-marco {
  margin: 8cqw auto 3cqw; width: 50cqw; aspect-ratio: 1; padding: 1.6cqw;
  border: .9cqw solid var(--tinta-tapa); outline: .45cqw solid var(--tinta-tapa); outline-offset: -3.2cqw;
}
.cl-foto { width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; background: rgba(255, 255, 255, .22); }
.cl-foto img { width: 100%; height: 100%; object-fit: cover; }
.cl-emoji { font-size: 22cqw; line-height: 1; }
.cl-mascota { font-family: 'Nunito', sans-serif; font-weight: 900; font-size: 7cqw; line-height: 1.1; text-transform: capitalize; margin-bottom: 3cqw; text-align: center; overflow-wrap: anywhere; }
.cl-prof { font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-weight: 700; font-size: 6.6cqw; line-height: 1.15; text-align: center; }
.cl-mat { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 4.4cqw; margin-top: .6cqw; text-align: center; }
.cl-libreta {
  margin-top: auto; padding-top: 3cqw;
  font-family: 'Nunito', sans-serif; font-weight: 900; text-transform: uppercase; letter-spacing: .04em;
  font-size: 7.6cqw; line-height: 1; text-align: center;
  color: transparent; -webkit-text-stroke: .45cqw var(--tinta-tapa);
}
.frente.clasica .portada-toca { bottom: 2.6cqw; font-size: 3.6cqw; }

/* ---------- Ajustes: diseñador de portada ---------- */
.disenador { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 1.2rem; align-items: start; margin-top: .5rem; }
@media (max-width: 560px) { .disenador { grid-template-columns: 1fr; } }
.disenador-vista { position: sticky; top: 76px; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.libro-prev { position: relative; width: 100%; max-width: 220px; aspect-ratio: 3 / 4.25; }
@media (max-width: 560px) { .disenador-vista { position: static; } .libro-prev { max-width: 230px; } }
.libro-prev .tapa { position: absolute; inset: 0; }
.libro-prev .frente { -webkit-backface-visibility: visible; backface-visibility: visible; }
.libro-prev .portada-toca { display: none; }
/* la portada moderna usa medidas fijas: en la vista previa se achica */
.libro-prev .frente:not(.clasica):not(.con-foto) { font-size: .6rem; }
.libro-prev .frente:not(.clasica):not(.con-foto) .portada-logo { width: 72px; height: 72px; }
.libro-prev .frente:not(.clasica):not(.con-foto) .portada-vet { font-size: .95rem; }
.libro-prev .frente:not(.clasica):not(.con-foto) .portada-nombre { font-size: 1.6rem; }
.libro-prev .frente:not(.clasica):not(.con-foto) .portada-sub { font-size: .72rem; }
.libro-prev .portada-nombre.chica { font-size: 1.2rem; }
.libro-prev .portada-banda { margin: 0 .6rem 1rem 1rem; padding: .4rem .6rem; }

.estilos { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem; margin-bottom: 1rem; }
.estilos label {
  margin: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 44px; padding: .4rem; border: 1.5px solid var(--borde-fuerte); border-radius: 999px;
  cursor: pointer; font-weight: 800; font-size: .92rem; color: var(--tinta-2);
}
.estilos input { position: absolute; opacity: 0; pointer-events: none; }
.estilos label:has(input:checked) { background: var(--color); border-color: var(--color); color: #fff; }
.estilos label:has(input:focus-visible) { outline: 3px solid var(--color-medio); outline-offset: 2px; }
.login .olvide { text-align: center; margin-top: 1rem; }
.login .olvide a { color: var(--color); font-weight: 800; }
.check.check-logo { background: var(--papel, #fff); border: 1.5px solid var(--borde-fuerte); align-self: end; min-height: 50px; }
.check.check-logo input { accent-color: var(--color); }

/* ---------- El dueño pone su foto ---------- */
.cambiar-foto {
  position: relative; display: inline-flex; align-items: center; gap: .3rem; margin-top: .6rem;
  min-height: 40px; padding: .35rem .9rem; border-radius: 999px; cursor: pointer;
  background: var(--color-suave, #E6F2EF); color: var(--color); font-weight: 800; font-size: .92rem;
}
.cambiar-foto input.input-oculto { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.confirmar-cuerpo { display: flex; gap: 1rem; align-items: center; }
.confirmar-cuerpo img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 0 4px #fff, 0 4px 14px rgba(0,0,0,.15); }
.confirmar-cuerpo p { margin: 0; }
@media (max-width: 380px) { .confirmar-cuerpo { flex-direction: column; text-align: center; } }
.foto-dueno-estado { margin-top: 1rem; padding-top: .9rem; border-top: 1px dashed var(--borde-fuerte); }

/* ---------- La foto de la mascota también en las tapas Moderna y Con foto ---------- */
.portada-circulo { position: relative; }
.portada-logo.con-mascota { width: 148px; height: 148px; }
.portada-logo.con-mascota img { object-fit: cover; padding: 0; }
.portada-insignia {
  position: absolute; right: -6px; bottom: 2px; width: 50px; height: 50px; border-radius: 50%;
  background: #fff; overflow: hidden; display: grid; place-items: center;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .5), 0 6px 14px -6px rgba(0, 0, 0, .5);
}
.portada-insignia img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.portada-banda.con-mascota { flex-direction: row; gap: .8rem; text-align: left; }
.banda-mascota { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 0 3px #fff, 0 4px 10px -4px rgba(0, 0, 0, .4); }
.banda-textos { display: flex; flex-direction: column; align-items: center; }
.portada-banda.con-mascota .banda-textos { align-items: flex-start; }
.libro-prev .portada-logo.con-mascota { width: 84px; height: 84px; }
.libro-prev .portada-insignia { width: 30px; height: 30px; }
.libro-prev .banda-mascota { width: 40px; height: 40px; }

/* ---------- PDF listo ---------- */
.pdf-listo { text-align: center; }
.pdf-titulo { font-weight: 900; font-size: 1.15rem; margin: 0 0 .7rem; }
.pdf-botones { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .6rem; }
.boton-pdf {
  display: flex; align-items: center; justify-content: center; min-height: 52px; border-radius: 999px;
  background: var(--color); color: #fff; font-weight: 800; text-decoration: none;
}
