[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 {
  /* Paleta de Libret: un solo color principal (verde #0E5E4F, o el que elija la veterinaria)
     y fijos el dorado, el crema y el rojo. --color-hondo da #0A4A3E con el verde. */
  --color: #0E5E4F;
  --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) 79%, #000);
  --dorado: #C9A227;
  --dorado-suave: #F8EED3;
  --dorado-tinta: #6E5410;

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

  --rojo: #B4412F;
  --rojo-suave: #FBEAE6;
  --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, a.primario {
  display: block; width: 100%; min-height: 52px; box-sizing: border-box;
  text-align: center; text-decoration: none; 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, .btn-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:disabled { opacity: .45; cursor: not-allowed; }
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 base (la usa también la libreta del dueño) */
.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; }

/* App de la veterinaria: barra verde arriba en el celular */
.shell .barra {
  background: var(--color-hondo); color: #fff; border-bottom: 0; backdrop-filter: none;
  padding: .65rem 16px; min-height: 64px;
}
.shell .barra .logo-clinica {
  width: 46px; height: 46px; border-radius: 50%;
  border: 2.5px solid var(--dorado); background: #fff; object-fit: cover;
}
.shell .barra .logo-vacio.logo-clinica { background: var(--color); color: #fff; }
.barra-textos { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.shell .barra .nombre { color: #fff; text-transform: uppercase; letter-spacing: .02em; }
.sub-nombre { display: none; font-size: .8rem; font-weight: 700; color: rgba(255, 255, 255, .7); }
.barra-acciones { display: flex; gap: 2px; margin-right: -8px; }
.icono-barra {
  position: relative; display: grid; place-items: center;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: none; color: #fff; cursor: pointer;
}
.icono-barra:hover { background: rgba(255, 255, 255, .1); }
.icono-barra svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icono-barra .punto {
  position: absolute; top: 8px; right: 8px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--dorado); box-shadow: 0 0 0 2px var(--color-hondo);
}

/* Menú: abajo en el celular, verde, con el "+" dorado en el medio */
.menu {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: flex-end;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: var(--color-hondo);
  box-shadow: 0 -8px 24px -18px rgba(0, 0, 0, .5);
}
.menu button {
  position: relative; flex: 1 1 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 52px; padding: 4px 2px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: .72rem; font-weight: 800; color: rgba(255, 255, 255, .72);
  min-width: 0; letter-spacing: -.01em; white-space: nowrap;
}
.menu svg {
  width: 26px; height: 26px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.menu button.on { color: var(--dorado); }
.menu .salir, .menu .solo-compu, .menu .txt-compu { display: none; }
.menu .boton-mas {
  flex: 0 0 64px; width: 64px; height: 64px; min-height: 64px; margin: -30px 6px 2px;
  border-radius: 50%; background: var(--dorado); color: var(--color-hondo);
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .45);
}
.menu .boton-mas svg { width: 30px; height: 30px; stroke-width: 2.4; }
.menu .boton-mas:active { transform: scale(.96); }
.globito {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--rojo); color: #fff; font-size: .78rem; font-weight: 900; line-height: 22px; text-align: center;
}
.menu .globito { position: absolute; top: 0; left: calc(50% + 6px); min-width: 19px; height: 19px; line-height: 19px; font-size: .68rem; padding: 0 5px; }

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

/* Menú: al costado en la compu, verde oscuro, activo en dorado */
@media (min-width: 900px) {
  /* el costado queda fijo y el contenido corre a la derecha */
  .shell { padding-left: 250px; min-height: 100vh; }
  .shell .barra {
    position: fixed; top: 0; left: 0; width: 250px; height: 98px;
    padding: 1.5rem 1.4rem 1.2rem;
  }
  .sub-nombre { display: block; }
  .barra-acciones { display: none; }
  .menu {
    top: 98px; right: auto; bottom: 0; width: 250px; overflow-y: auto;
    flex-direction: column; align-items: stretch; gap: 6px;
    padding: .6rem 1rem 1.4rem;
    background: var(--color-hondo); box-shadow: none;
  }
  .menu button {
    flex: 0 0 auto; flex-direction: row; justify-content: flex-start; gap: .8rem;
    min-height: 44px; padding: .65rem .9rem;
    border-radius: var(--r-m); font-size: 1rem; color: rgba(255, 255, 255, .86);
  }
  .menu svg { width: 22px; height: 22px; }
  .menu button:hover { background: rgba(255, 255, 255, .08); }
  .menu button.on { background: var(--dorado); color: var(--color-hondo); }
  .menu .boton-mas, .menu .txt-cel { display: none !important; }
  .menu .solo-compu, .menu .txt-compu { display: inline; }
  .menu .solo-compu { display: flex; }
  .menu .salir { display: flex; margin-top: auto; }
  .menu .globito { position: static; margin-left: auto; min-width: 24px; height: 22px; line-height: 22px; font-size: .78rem; }
  main { width: 100%; padding: 2rem 2.5rem 3rem; }
  .pantalla-inicio main { max-width: 1120px; }
  .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; }


/* ---------- 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; }

/* Visita: las anotaciones del mismo día juntas bajo una sola fecha */
.visita {
  position: relative; display: flex; flex-direction: column; gap: .45rem;
  padding: .6rem .55rem .65rem; background: var(--papel-hondo); border: 1px solid var(--borde); border-radius: var(--r-m);
}
.visita::before {
  content: ""; position: absolute; left: calc(-1.6rem + .55rem - 6px); top: .75rem;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--color); box-shadow: 0 0 0 3px var(--superficie);
}
.visita > .anot::before { display: none; }
.visita-cabeza { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem .6rem; padding: 0 .35rem; }
.visita-info { font-size: .8rem; font-weight: 700; color: var(--tinta-2); }
.visita > .firma { margin: .1rem 0 0 .35rem; }

.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; }
.pie:has(+ .invita-vet) { margin-bottom: 0; }
.invita-vet { text-align: center; font-size: .75rem; margin: 0 0 1.25rem; }
.invita-vet a { display: inline-block; padding: .85rem .5rem; color: var(--tinta-3); font-weight: 600; text-decoration: underline; text-decoration-color: var(--borde-fuerte); text-underline-offset: 3px; }
.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, .visita::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;
}
.badge-archivada {
  align-self: flex-start; margin-top: .25rem; padding: .05rem .55rem; border-radius: 999px;
  background: #ECE7DC; color: #5A5245; font-size: .76rem !important; font-weight: 800 !important;
}
.cartel-archivada { background: #ECE7DC; border-color: #D5CCBA; color: #3F382D; }
.ver-archivadas { display: block; margin: 1rem auto 0; min-height: 44px; }
.zona-borrar { margin-top: 1rem; }
.zona-borrar label { display: block; margin: .8rem 0 .4rem; }
.zona-borrar .botones { margin-top: .8rem; }
.zona-borrar .botones > * { white-space: normal; }
.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; }

/* ---------- Portada de Libret (plan Básico): formal, tipo pasaporte ---------- */
.frente.libret {
  --oro: #D4B46A;
  justify-content: stretch; gap: 0; padding: 5.5cqw 5.5cqw 5.5cqw 9.5cqw; color: var(--oro);
  background:
    radial-gradient(120% 80% at 30% 12%, rgba(255, 255, 255, .10), transparent 60%),
    repeating-linear-gradient(135deg, rgba(0, 0, 0, .05) 0 1px, transparent 1px 4px),
    #0E5E4F;
}
.frente.libret::after { display: none; }
.lb-marco {
  flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center;
  padding: 6cqw 5cqw 5cqw; border: .45cqw solid var(--oro); outline: .25cqw solid rgba(212, 180, 106, .55);
  outline-offset: -1.6cqw; border-radius: 1.2cqw;
}
.lb-vet {
  font-family: 'Playfair Display', Georgia, serif; font-weight: 700; text-transform: uppercase;
  font-size: 5.6cqw; letter-spacing: .12em; line-height: 1.2; text-align: center; overflow-wrap: anywhere;
}
.lb-vet.chico { font-size: 4.4cqw; letter-spacing: .08em; }
.lb-adorno { display: flex; align-items: center; gap: 2cqw; font-size: 3.6cqw; margin: 2.4cqw 0 3.4cqw; opacity: .9; }
.lb-adorno span { width: 12cqw; height: .3cqw; background: var(--oro); opacity: .7; }
.lb-libreta {
  font-family: 'Playfair Display', Georgia, serif; font-weight: 700; text-transform: uppercase;
  font-size: 7.4cqw; letter-spacing: .16em; line-height: 1.15; text-align: center;
}
.lb-foto {
  width: 38cqw; aspect-ratio: 1; margin: 5.5cqw auto 3.6cqw; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: rgba(255, 255, 255, .08);
  box-shadow: 0 0 0 .5cqw var(--oro), 0 0 0 1.6cqw #0E5E4F, 0 0 0 1.9cqw rgba(212, 180, 106, .6);
}
.lb-foto img { width: 100%; height: 100%; object-fit: cover; }
.lb-foto .cl-emoji { font-size: 18cqw; }
.lb-mascota {
  font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-weight: 700;
  font-size: 8cqw; line-height: 1.1; text-transform: capitalize; text-align: center; overflow-wrap: anywhere;
}
.lb-pie { margin-top: auto; padding-top: 3cqw; width: 100%; text-align: center; border-top: .25cqw solid rgba(212, 180, 106, .5); }
.lb-prof { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 4.6cqw; line-height: 1.2; }
.lb-mat { font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 3.8cqw; letter-spacing: .06em; margin-top: .6cqw; opacity: .9; }
.frente.libret .portada-toca { bottom: 1.2cqw; font-size: 3.2cqw; color: #F3E6C4; }

/* ---------- 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; }
/* Cuenta en revisión / rechazada */
.revision { text-align: center; }
.revision .icono-revision { font-size: 2.6rem; line-height: 1; margin-bottom: .4rem; }
.revision p { color: var(--tinta-2); line-height: 1.5; }
.revision .primario { margin-top: 1.25rem; }
.revision p.ayuda { 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;
}

/* Ajustes con plan Básico: lo del plan Pro se ve, pero bloqueado */
.bloqueo-pro { position: relative; margin-top: .9rem; border: 1.5px dashed var(--borde-fuerte); border-radius: 12px; padding: .8rem; }
.bloqueo-contenido { opacity: .4; filter: grayscale(.6); pointer-events: none; user-select: none; }
.bloqueo-cartel {
  display: flex; flex-direction: column; align-items: flex-start; gap: .3rem;
  margin-bottom: .7rem; padding: .7rem .8rem; border-radius: 10px;
  background: #0E5E4F; color: #F3E6C4;
}
.bloqueo-cartel b { color: #E3C67F; font-size: 1rem; }
.bloqueo-cartel span { font-size: .9rem; }
.bloqueo-cartel .link-boton { color: #fff; }

/* ---------- Frascos ---------- */
.frasco-foto { width: 48px; height: 48px; border-radius: var(--r-m); object-fit: cover; flex-shrink: 0; font-size: 1.4rem; display: block; }
.frasco-item.vencido { background: var(--rojo-suave); border-color: var(--rojo-borde); }
.frasco-item.vencido strong { text-decoration: line-through; text-decoration-color: var(--rojo-borde); }
.badge-vencido {
  align-self: flex-start; margin-top: .25rem; padding: .1rem .6rem; border-radius: 999px;
  background: var(--rojo); color: #fff; font-size: .78rem; font-weight: 800;
}
.f-bloque-frasco select { border-color: var(--color); }
.frasco-item { flex-wrap: wrap; }
.frasco-item .vet-texto { flex: 1 1 calc(100% - 64px); }
.frasco-item .vet-acciones { flex-basis: 100%; justify-content: flex-end; }
@media (max-width: 380px) {
  .menu button { font-size: .64rem; }
  .menu .boton-mas { flex-basis: 58px; width: 58px; height: 58px; min-height: 58px; margin-left: 2px; margin-right: 2px; }
}
.frasco-item.pronto { background: var(--ambar-suave); border-color: var(--ambar-borde); }
.badge-pronto {
  align-self: flex-start; margin-top: .25rem; padding: .1rem .6rem; border-radius: 999px;
  background: var(--ambar); color: #fff; font-size: .78rem; font-weight: 800;
}
#fr-filtros { margin-top: -.2rem; }
#msg-fr-lista:empty { display: none; }
.grupo-frascos h3 { display: flex; align-items: center; gap: .45rem; margin: 0 0 .8rem; font-size: 1.05rem; }
.grupo-frascos .cant-grupo {
  min-width: 1.5rem; padding: 0 .45rem; border-radius: 999px; text-align: center;
  background: var(--papel); color: var(--tinta-2); font-size: .8rem;
}
.grupo-frascos .lista-vets { margin-bottom: 0; }

/* Nueva anotación con varias filas (una por vacuna, desparasitación o medicación) */
.fila-anot .fila-titulo select { flex: 1; min-width: 0; }
.fila-anot .fila-titulo .f-quitar { flex: none; }
#zona-agregar { margin: -.2rem 0 1rem; }
#zona-agregar button { width: 100%; }
#zona-agregar .ayuda { margin: .45rem .2rem 0; }

/* ---------- Inicio ---------- */
.hola {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 1.2rem;
  padding: 1.6rem 1.4rem; margin-bottom: 1rem;
  background: var(--color); color: #fff; border-radius: var(--r-xl);
}
.hola::after {
  content: ""; position: absolute; right: -90px; top: -60px; width: 300px; height: 300px;
  border-radius: 50%; border: 34px solid color-mix(in srgb, var(--dorado) 28%, transparent); pointer-events: none;
}
.hola > * { position: relative; z-index: 1; }
.hola h1 {
  margin: 0 0 .35rem; color: #fff;
  font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: 2rem; line-height: 1.15; letter-spacing: 0;
}
.hola-nombre { color: #F3E4B5; }
.hola p { margin: 0 0 .8rem; color: rgba(255, 255, 255, .9); font-weight: 600; }
.etiqueta-plan {
  display: inline-block; padding: .2rem .8rem; border-radius: 999px;
  background: var(--dorado); color: var(--color-hondo); font-weight: 900; font-size: .88rem;
}
.hola-botones { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.hola-botones > * { min-width: 0; }
.boton-dorado, .boton-claro {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 52px; padding: .7rem 1.1rem; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 900; font-size: 1rem; white-space: nowrap;
}
.boton-dorado { background: var(--dorado); color: var(--color-hondo); border: 0; box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .5); }
.boton-claro { background: rgba(255, 255, 255, .12); color: #fff; border: 1.5px solid rgba(255, 255, 255, .45); }
.boton-dorado:hover, .boton-claro:hover { filter: brightness(1.06); }
.boton-dorado svg, .boton-claro svg { flex-shrink: 0; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.solo-lectura .hola-botones { display: none; }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin-bottom: 1rem; }
.kpis .cargando { grid-column: 1 / -1; margin: 1rem 0; }
.kpi {
  position: relative; display: flex; flex-direction: column; align-items: flex-start;
  min-height: 96px; padding: .9rem .9rem 1rem; border: 0; border-radius: var(--r-l);
  font: inherit; text-align: left; color: #fff; cursor: pointer;
}
.kpi strong { font-size: 2.2rem; font-weight: 900; line-height: 1.05; }
.kpi-titulo { font-weight: 900; font-size: .98rem; line-height: 1.2; }
.kpi-sub { display: none; font-size: .85rem; font-weight: 700; opacity: .85; }
.kpi-icono {
  display: none; position: absolute; top: 1rem; right: 1rem;
  width: 42px; height: 42px; border-radius: 12px; place-items: center; background: rgba(255, 255, 255, .22);
}
.kpi-icono svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.kpi.rojo { background: var(--rojo); }
.kpi.dorado { background: var(--dorado); color: #2E2405; }
.kpi.verde { background: var(--color-hondo); }
.kpi:hover { filter: brightness(1.05); }

.inicio-columnas { display: grid; gap: 1rem; }
.inicio-columnas .tarjeta { margin-bottom: 0; }
.panel h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.2rem; }
.panel h2 svg { width: 24px; height: 24px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.link-ver {
  white-space: nowrap; min-height: 44px; padding: 0 .2rem; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 900; font-size: .92rem; color: var(--color);
}

.prox { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--borde); }
.prox:last-child { border-bottom: 0; }
.prox-ir {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: .75rem;
  min-height: 52px; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; text-align: left; color: inherit;
}
.avatar.redondo { width: 44px; height: 44px; }
.avatar.redondo.sin-foto { font-size: 1.35rem; background: var(--dorado-suave); border: 0; }
.prox-texto { display: flex; flex-direction: column; min-width: 0; }
.prox-texto strong { font-size: 1.02rem; }
.prox-texto span { color: var(--tinta-2); font-weight: 700; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.chip-dias {
  flex-shrink: 0; padding: .25rem .65rem; border-radius: 999px;
  font-size: .8rem; font-weight: 900; white-space: nowrap;
  background: var(--color-suave); color: var(--color-hondo);
}
.chip-dias.pronto { background: var(--dorado-suave); color: var(--dorado-tinta); }
.chip-dias.vencido { background: var(--rojo-suave); color: var(--rojo); }
.wa-redondo {
  flex-shrink: 0; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%; background: #25D366; color: #fff;
}
.wa-redondo::before {
  content: ""; width: 22px; height: 22px; 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;
}

.accesos { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.acceso {
  display: flex; flex-direction: column; align-items: flex-start; gap: .15rem;
  min-height: 110px; padding: 1rem; border: 0; border-radius: var(--r-l);
  font: inherit; text-align: left; cursor: pointer;
}
.acceso > svg {
  width: 40px; height: 40px; padding: 9px; margin-bottom: .55rem; border-radius: 12px;
  fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.acceso strong { font-size: 1rem; }
.acceso span { font-size: .84rem; font-weight: 700; opacity: .8; }
.acceso.verde { background: var(--color-suave); color: var(--color-hondo); }
.acceso.verde > svg { background: var(--color-hondo); }
.acceso.dorado { background: var(--dorado-suave); color: var(--dorado-tinta); }
.acceso.dorado > svg { background: var(--dorado); }
.acceso:hover { filter: brightness(.98); }
#tarjeta-portada { scroll-margin-top: 80px; }

@media (min-width: 640px) {
  .kpi { min-height: 122px; padding: 1.2rem 1.3rem; }
  .kpi-sub, .kpi-icono { display: grid; }
  .kpi-sub { display: block; }
  .kpi strong { font-size: 2.5rem; }
}
@media (min-width: 900px) {
  .hola { flex-direction: row; align-items: center; justify-content: space-between; padding: 2rem 2.2rem; }
  .hola h1 { font-size: 2.3rem; }
  .hola-nombre { color: #fff; }
  .hola-botones { display: flex; flex-shrink: 0; }
  .kpis { gap: 1.2rem; margin-bottom: 1.4rem; }
  .inicio-columnas { grid-template-columns: 1.25fr 1fr; gap: 1.2rem; align-items: start; }
  .panel { padding: 1.4rem 1.5rem; }
}
@media (max-width: 480px) {
  .boton-dorado, .boton-claro { padding: .7rem .6rem; font-size: .95rem; gap: .35rem; }
  .boton-dorado svg, .boton-claro svg { width: 19px; height: 19px; }
}
@media (max-width: 380px) {
  .hola-botones { grid-template-columns: 1fr; }
  .kpi strong { font-size: 1.9rem; }
  .kpi-titulo { font-size: .86rem; }
}
@media print {
  .barra-acciones { display: none !important; }
  .shell { padding-left: 0 !important; }
  .shell .barra { position: static !important; width: auto !important; height: auto !important; }
}

/* =========================================================
   Ayuda: asistente de Libret (ayuda.js)
   ========================================================= */
#cfg-ayuda { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
#cfg-ayuda svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ayuda-chat { display: flex; flex-direction: column; gap: 12px; padding-bottom: 14px; }
.ayuda-cabeza { display: flex; align-items: center; gap: 12px; }
.ayuda-cabeza h2 { margin: 0; }
.ayuda-cabeza .ayuda { margin: 2px 0 0; }
.ayuda-avatar {
  width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 22px;
  background: var(--color-hondo); border: 2px solid var(--dorado);
}
.ayuda-mensajes {
  position: relative; display: flex; flex-direction: column; gap: 10px; max-height: min(58vh, 560px); min-height: 220px; overflow-y: auto;
  background: var(--papel); border: 1px solid var(--borde); border-radius: var(--r-l); padding: 14px; scroll-behavior: smooth;
}
.burbuja { max-width: 88%; padding: 11px 14px; border-radius: 18px; line-height: 1.45; font-size: .95rem; overflow-wrap: anywhere; }
.burbuja.yo { align-self: flex-end; background: var(--color-hondo); color: #fff; border-bottom-right-radius: 6px; font-weight: 700; }
.burbuja.bot { align-self: flex-start; background: var(--superficie); color: var(--tinta); border: 1px solid var(--borde); border-bottom-left-radius: 6px; }
.burbuja-titulo { display: block; color: var(--color-hondo); margin-bottom: 4px; }
.burbuja-texto p { margin: 0 0 8px; }
.burbuja-texto p:last-child { margin-bottom: 0; }
.burbuja-texto ol, .burbuja-texto ul { margin: 4px 0 8px; padding-left: 22px; }
.burbuja-texto li { margin: 3px 0; }
.ayuda-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ayuda-chips-titulo { width: 100%; font-size: .78rem; font-weight: 800; color: var(--tinta-2); text-transform: uppercase; letter-spacing: .04em; }
.ayuda-chip {
  font: inherit; font-size: .86rem; font-weight: 700; text-align: left; cursor: pointer; min-height: 38px;
  background: var(--dorado-suave); color: var(--dorado-tinta); border: 1px solid #EBD9A2; border-radius: 999px; padding: 7px 13px;
}
.ayuda-chip:hover { border-color: var(--dorado); }
.ayuda-acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ayuda-accion {
  font: inherit; font-size: .9rem; font-weight: 800; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center;
  background: var(--color-hondo); color: #fff; border: 0; border-radius: 999px; padding: 9px 16px; text-decoration: none;
}
.ayuda-accion.wa { background: var(--wa); }
.ayuda-voto { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--borde-fuerte); font-size: .85rem; color: var(--tinta-2); font-weight: 700; }
.ayuda-voto button { font-size: 1.1rem; min-width: 44px; min-height: 40px; border-radius: 999px; border: 1px solid var(--borde); background: var(--superficie); cursor: pointer; }
.ayuda-form { display: flex; gap: 8px; align-items: center; }
.ayuda-form input { flex: 1; margin: 0; min-height: 48px; border-radius: 999px; padding: 0 18px; }
.ayuda-enviar {
  width: 48px; height: 48px; flex: none; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--dorado); color: var(--color-hondo);
}
.ayuda-enviar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ayuda-temas { display: flex; flex-direction: column; gap: 8px; }
.ayuda-cat { border: 1px solid var(--borde); border-radius: var(--r-l); background: var(--superficie); }
.ayuda-cat summary { cursor: pointer; font-weight: 800; padding: 13px 16px; color: var(--color-hondo); display: flex; align-items: center; gap: 8px; min-height: 44px; }
.ayuda-cat summary .cant { margin-left: auto; font-size: .78rem; background: var(--color-suave); border-radius: 999px; padding: 2px 9px; }
.ayuda-lista { display: flex; flex-direction: column; padding: 0 8px 8px; }
.ayuda-tema {
  font: inherit; text-align: left; cursor: pointer; background: none; border: 0; border-top: 1px solid var(--borde);
  padding: 11px 8px; color: var(--tinta); font-weight: 700; min-height: 44px;
}
.ayuda-tema:hover { color: var(--color-hondo); background: var(--color-suave); }
.ayuda-humano .boton-wa { margin-top: 4px; }

/* Consulta a una persona (tickets) */
.ticket-form { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.ticket-form label { font-weight: 800; font-size: .88rem; margin: 0; }
.ticket-form textarea, .ticket-form input { margin-top: 4px; }
.ticket-form .primario { margin-top: 2px; }
.ticket-item { border-top: 1px solid var(--borde); padding: 12px 0; }
.ticket-item:first-child { border-top: 0; padding-top: 2px; }
.ticket-cabeza { display: flex; align-items: center; gap: 10px; }
.ticket-cabeza .ayuda { margin: 0; }
.ticket-estado { margin-left: auto; font-size: .78rem; font-weight: 900; border-radius: 999px; padding: 3px 10px; }
.ticket-estado.abierto { background: var(--dorado-suave); color: var(--dorado-tinta); }
.ticket-estado.respondido { background: var(--color-suave); color: var(--color-hondo); }
.ticket-estado.cerrado { background: var(--papel-hondo); color: var(--tinta-2); }
.ticket-pregunta { margin: 6px 0 0; font-weight: 700; }
.ticket-respuesta { margin: 6px 0 0; background: var(--color-suave); border-radius: 12px; padding: 9px 12px; color: var(--color-hondo); }
.ayuda-humano .boton-wa { border: 0; cursor: pointer; font: inherit; font-weight: 800; }

/* Libreta compartida entre veterinarias */
.anot-clinica { display: inline-block; margin-top: 4px; font-size: .78rem; font-weight: 800; color: var(--color-hondo); background: var(--color-suave); border-radius: 999px; padding: 2px 10px; }
.codigo-grande { font-size: 2.6rem; font-weight: 900; letter-spacing: .18em; text-align: center; color: var(--color-hondo); background: var(--dorado-suave); border: 2px dashed var(--dorado); border-radius: 18px; padding: 12px; margin: 14px 0 8px; }
.otra-vet #pedir-codigo { width: 100%; }
.sumar-vet .primario { display: flex; justify-content: center; text-decoration: none; }
.compartida-chip { display: inline-block; font-size: .78rem; font-weight: 800; color: var(--dorado-tinta); background: var(--dorado-suave); border-radius: 999px; padding: 3px 10px; margin-top: 6px; }
.anot.ajena { cursor: default; border-left-style: dashed; }
.botones-titulo { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
#sumar-codigo { font-size: 1.4rem; letter-spacing: .2em; text-align: center; font-weight: 800; }
/* "No soy un robot" (Turnstile) */
.captcha { min-height: 65px; margin: 4px 0 12px; display: flex; justify-content: center; }

/* =========================================================
   Botones (sistema): .btn + variante + tamaño
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .62rem 1.15rem; box-sizing: border-box;
  border: 1px solid transparent; border-radius: 12px;
  font: inherit; font-size: .95rem; font-weight: 700; line-height: 1.2; letter-spacing: .005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .08s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn:focus-visible, .btn-icono:focus-visible, .chip-opcion:focus-visible { outline: 3px solid var(--color-medio); outline-offset: 2px; }
.btn-primario { background: var(--color-hondo); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 8px 18px -12px rgba(10, 74, 62, .9); }
.btn-primario:hover { background: var(--color); }
.btn-dorado { background: var(--dorado); color: var(--color-hondo); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 18px -12px rgba(138, 93, 5, .9); }
.btn-dorado:hover { filter: brightness(1.05); }
.btn-fantasma { background: var(--superficie); color: var(--color-hondo); border-color: var(--borde-fuerte); }
.btn-fantasma:hover { background: var(--color-suave); border-color: var(--color-medio); }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 8px 18px -12px rgba(20, 120, 60, .9); }
.btn-wa:hover { filter: brightness(1.05); }
.btn-chico { min-height: 38px; padding: .45rem .85rem; font-size: .87rem; border-radius: 10px; }
.btn-bloque { display: flex; width: 100%; min-height: 52px; font-size: 1.02rem; border-radius: 14px; }
.btn-icono {
  display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--borde); border-radius: 10px; background: var(--superficie);
  color: var(--tinta-2); font: inherit; font-size: 1rem; font-weight: 800; cursor: pointer;
}
.btn-icono:hover { background: var(--papel); color: var(--tinta); }
.pill-pro {
  display: inline-flex; align-items: center; min-height: 32px; padding: .3rem .75rem;
  border-radius: 999px; background: var(--dorado-suave); border: 1px solid #EBD9A2;
  color: var(--dorado-tinta); font-size: .82rem; font-weight: 700;
}
.texto-sec { margin: 0 0 1rem; color: var(--tinta-2); font-size: .93rem; line-height: 1.55; font-weight: 600; }
.aviso { line-height: 1.5; }

/* =========================================================
   Capas: panel de notificaciones y ventanas
   ========================================================= */
.capa { position: fixed; inset: 0; z-index: 100; background: rgba(14, 32, 26, .42); animation: capa-entra .16s ease-out; }
.capa.saliendo { opacity: 0; transition: opacity .15s; }
@keyframes capa-entra { from { opacity: 0; } to { opacity: 1; } }
@keyframes panel-entra { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes hoja-entra { from { transform: translateY(24px); } to { transform: none; } }

.notif-panel {
  position: absolute; top: 72px; left: 12px; right: 12px; max-height: calc(100vh - 170px); overflow-y: auto;
  background: var(--superficie); border-radius: 20px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .45);
  animation: panel-entra .18s ease-out;
}
.notif-cabeza {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between;
  padding: 18px 18px 12px 20px; background: var(--superficie); border-bottom: 1px solid var(--borde);
}
.notif-cabeza h2 { margin: 0; font-size: 1.15rem; }
.notif-lista { padding: 6px 10px 12px; }
.notif-item {
  display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start;
  padding: 16px 10px; border-radius: 14px;
}
.notif-item + .notif-item { border-top: 1px solid var(--borde); border-radius: 0; }
.notif-ir {
  grid-template-columns: 44px 1fr auto; align-items: center; width: 100%;
  background: none; border: 0; font: inherit; text-align: left; cursor: pointer; color: inherit;
}
.notif-ir:hover { background: var(--papel); border-radius: 14px; }
.notif-ir .flecha { font-size: 1.4rem; color: var(--tinta-3); }
.notif-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--dorado-suave); }
.notif-avatar.sin-foto { display: grid; place-items: center; font-size: 1.35rem; background: var(--color-suave); }
.notif-icono { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--color-suave); color: var(--color-hondo); }
.notif-icono svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.notif-cuerpo { display: flex; flex-direction: column; min-width: 0; }
.notif-texto { margin: 0; font-size: .98rem; line-height: 1.4; color: var(--tinta); font-weight: 600; }
.notif-meta { margin: 3px 0 0; font-size: .83rem; color: var(--tinta-3); font-weight: 700; }
.notif-nota { margin: 8px 0 0; font-size: .88rem; color: var(--tinta-2); line-height: 1.45; font-weight: 600; }
.notif-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.notif-acciones .btn-leido { margin-left: auto; color: var(--color-hondo); }
.notif-vacio { margin: 0; padding: 34px 12px; text-align: center; font-weight: 800; color: var(--tinta); line-height: 1.6; }
.notif-vacio span { font-weight: 600; color: var(--tinta-3); }

.capa-modal { display: flex; align-items: flex-end; justify-content: center; }
.modal {
  width: 100%; max-width: 540px; max-height: 92vh; overflow-y: auto; box-sizing: border-box;
  background: var(--superficie); border-radius: 24px 24px 0 0;
  padding: 22px 20px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -20px 60px -24px rgba(0, 0, 0, .5); animation: hoja-entra .2s ease-out;
}
.modal-cabeza { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 6px; }
.modal-cabeza h2 { margin: 4px 0 0; font-size: 1.22rem; line-height: 1.3; }
.modal-sobre { margin: 0; font-size: .74rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--dorado-tinta); }
.modal-etiqueta { display: block; margin: 20px 0 10px; font-size: .9rem; font-weight: 800; color: var(--tinta); }
.modal textarea { margin-top: 0; line-height: 1.55; font-weight: 600; }
.modal-ayuda { margin: 8px 0 0; font-size: .83rem; color: var(--tinta-3); font-weight: 600; line-height: 1.45; }
.modal-pie { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.chips-opcion { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-opcion {
  min-height: 40px; padding: .5rem .95rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--borde-fuerte); background: var(--superficie); color: var(--tinta);
  font: inherit; font-size: .88rem; font-weight: 700; transition: background .15s, color .15s, border-color .15s;
}
.chip-opcion:hover { border-color: var(--color-medio); }
.chip-opcion.on { background: var(--color-hondo); border-color: var(--color-hondo); color: #fff; }
@media (max-width: 520px) { .modal-pie .btn { flex: 1; } }

/* =========================================================
   Sumar libreta de otra veterinaria
   ========================================================= */
.sumar-cabeza h2 { margin-bottom: .5rem; }
.sumar-cabeza .texto-sec { margin: 0; }
.sumar-form { padding: 24px 20px; }
.paso { display: grid; grid-template-columns: 36px 1fr; gap: 14px; padding-bottom: 24px; }
.paso + .paso { padding-top: 24px; border-top: 1px solid var(--borde); }
.paso-num {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--dorado-suave); border: 1px solid #EBD9A2; color: var(--dorado-tinta); font-weight: 900;
}
.paso-cuerpo { min-width: 0; }
.paso-cuerpo h3 { margin: 6px 0 6px; font-size: 1.06rem; }
.paso-cuerpo input { margin-top: 0; }
.zona-foto {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0;
  padding: 22px 16px; border: 1.5px dashed var(--color-medio); border-radius: 16px;
  background: color-mix(in srgb, var(--color-suave) 70%, #fff); color: var(--color-hondo); cursor: pointer; text-align: center;
  transition: background .15s, border-color .15s;
}
.zona-foto:hover { background: var(--color-suave); border-color: var(--color); }
.zona-foto svg { width: 30px; height: 30px; margin-bottom: 4px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.zona-titulo { font-weight: 800; font-size: 1rem; }
.zona-sub { font-weight: 600; font-size: .84rem; color: var(--tinta-2); }
.separador { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--tinta-3); font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.separador::before, .separador::after { content: ""; flex: 1; height: 1px; background: var(--borde); }
.estado-ok {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: .6rem .6rem .6rem 1rem; border-radius: 12px;
  background: var(--color-suave); border: 1px solid var(--color-medio); color: var(--color-hondo); font-weight: 800;
}
.sumar-form .btn-bloque { margin-top: 4px; }

@media (min-width: 900px) {
  /* la campanita también en la compu, arriba en el costado; ayuda y ajustes ya están en el menú */
  .barra-acciones { display: flex; margin-left: auto; margin-right: -6px; }
  #barra-ayuda, #barra-ajustes { display: none; }
  .notif-panel { top: 16px; left: 262px; right: auto; width: 420px; max-height: calc(100vh - 32px); }
  .capa-modal { align-items: center; }
  .modal { border-radius: 22px; padding: 26px 26px 24px; }
}
.zona-foto input.input-oculto { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; font-size: 0; }
.notif-item { position: relative; }
.notif-item .btn-leido { position: absolute; top: 14px; right: 6px; margin: 0; }
.notif-item:not(.notif-ir) .notif-texto, .notif-item:not(.notif-ir) .notif-meta { padding-right: 44px; }

/* =========================================================
   Botones de toda la app: mismo estilo que .btn + efecto al tocar
   ========================================================= */
button.primario, a.primario {
  border-radius: 14px; font-weight: 700; letter-spacing: .01em;
  background: var(--color-hondo);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 10px 20px -14px rgba(10, 74, 62, .95);
}
button.primario:hover, a.primario:hover { background: var(--color); filter: none; }
button.primario.chico { border-radius: 11px; }
button.secundario, a.secundario, label.secundario {
  border-radius: 12px; border: 1px solid var(--borde-fuerte); font-weight: 700; letter-spacing: .005em;
  box-shadow: 0 1px 2px rgba(60, 45, 20, .06);
}
button.secundario:hover, a.secundario:hover, label.secundario:hover { background: var(--color-suave); border-color: var(--color-medio); }
button.secundario.chico { border-radius: 10px; }
.boton-wa { border-radius: 12px; font-weight: 700; box-shadow: 0 10px 20px -14px rgba(20, 120, 60, .95); }
.boton-wa:hover { filter: brightness(1.05); }
button.peligro { border-radius: 12px; border-width: 1px; font-weight: 700; }
.boton-dorado, .boton-claro { border-radius: 14px; font-weight: 700; }
.link-boton { font-weight: 700; text-decoration-thickness: 1.5px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); transition: text-decoration-color .15s; }
.link-boton:hover { text-decoration-color: currentColor; }

/* Al apretar: se hunde apenas y vuelve con un rebote suave */
button, a.primario, a.secundario, a.boton-wa, .btn, label.secundario, label.subir-foto, .zona-foto,
.item, .kpi, .acceso, .prox-ir, .chip-opcion, .ayuda-chip, .notif-ir {
  transition: transform .22s cubic-bezier(.34, 1.56, .64, 1), background-color .15s, border-color .15s, box-shadow .2s, color .15s, filter .15s;
  -webkit-tap-highlight-color: transparent;
}
button:active:not(:disabled), a.primario:active, a.secundario:active, a.boton-wa:active, .btn:active,
label.secundario:active, label.subir-foto:active, .chip-opcion:active, .ayuda-chip:active {
  transform: scale(.965); transition-duration: .08s;
}
.item:active, .kpi:active, .acceso:active, .prox-ir:active, .zona-foto:active, .notif-ir:active, .anot:active {
  transform: scale(.985); transition-duration: .08s;
}
.menu .boton-mas:active { transform: scale(.92); }

/* La onda (efectos.js) */
.con-onda { position: relative; }
.onda-capa { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; z-index: 0; }
.onda {
  position: absolute; border-radius: 50%; background: currentColor; opacity: 0;
  transform: scale(0); animation: onda .55s cubic-bezier(.2, .6, .2, 1) forwards;
}
@keyframes onda { 0% { transform: scale(0); opacity: .26; } 100% { transform: scale(1); opacity: 0; } }
/* en los botones llenos la onda es clara */
button.primario .onda, a.primario .onda, .btn-primario .onda, .btn-wa .onda, .boton-wa .onda, .menu .onda, .kpi .onda, .chip-opcion.on .onda { background: #fff; }
.boton-dorado .onda, .btn-dorado .onda { background: var(--color-hondo); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  button:active, .btn:active, .item:active, .kpi:active, .acceso:active { transform: none !important; }
}

/* Importar desde Excel */
.imp-resumen { display: flex; flex-direction: column; gap: 16px; padding-top: 20px; border-top: 1px solid var(--borde); }
.imp-cifras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.imp-cifras div { display: flex; flex-direction: column; align-items: center; padding: 14px 8px; border-radius: 14px; background: var(--color-suave); }
.imp-cifras strong { font-size: 1.6rem; font-weight: 900; color: var(--color-hondo); line-height: 1.1; }
.imp-cifras span { font-size: .82rem; font-weight: 700; color: var(--tinta-2); }
.imp-tabla-caja { overflow-x: auto; border: 1px solid var(--borde); border-radius: 12px; }
.imp-tabla { width: 100%; border-collapse: collapse; font-size: .86rem; }
.imp-tabla th, .imp-tabla td { padding: 9px 12px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--borde); }
.imp-tabla th { background: var(--papel); font-weight: 800; color: var(--tinta-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.imp-tabla tr:last-child td { border-bottom: 0; }
.imp-avisos { border: 1px solid var(--ambar-borde); background: var(--ambar-suave); border-radius: 12px; padding: 10px 14px; color: #6E4708; }
.imp-avisos summary { cursor: pointer; font-weight: 800; }
.imp-avisos ul { margin: 8px 0 0; padding-left: 18px; font-size: .86rem; line-height: 1.5; max-height: 220px; overflow-y: auto; }
.imp-progreso { height: 8px; border-radius: 99px; background: var(--papel-hondo); overflow: hidden; }
.imp-progreso span { display: block; height: 100%; width: 0; background: var(--color); transition: width .25s; }
.vacio .link-boton { font-size: inherit; color: var(--color-hondo); }

/* Plan Pro: cartel para pasarse */
.cartel-pro {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin: 4px 0 16px; padding: 14px 16px; border-radius: 14px;
  background: var(--dorado-suave); border: 1px solid #EBD9A2; color: var(--dorado-tinta);
}
.cartel-pro div { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 220px; }
.cartel-pro strong { font-size: .97rem; }
.cartel-pro span { font-size: .87rem; font-weight: 600; line-height: 1.45; color: #6E5410; }
label.bloqueado { opacity: .7; cursor: not-allowed; }
label.bloqueado input { pointer-events: none; }

.botones-columna { display: flex; flex-direction: column; gap: 10px; }
.botones-columna > * { width: 100%; white-space: normal; text-align: center; }

/* ---------- Agregar al inicio del celular (instalar.js) ---------- */
.ok-instalada { color: var(--verde); font-weight: 700; }
.ins-intro { margin: 6px 0 18px; color: var(--tinta-2); font-weight: 600; line-height: 1.5; }
.ins-o { margin: 14px 0 4px; text-align: center; font-size: .85rem; font-weight: 700; color: var(--tinta-3); }
.ins-pasos { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ins-paso {
  display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--borde); border-radius: 16px; background: var(--papel);
  line-height: 1.45; font-weight: 600; color: var(--tinta);
}
.ins-paso small { display: block; margin-top: 4px; font-size: .84rem; color: var(--tinta-2); font-weight: 600; }
.ins-num {
  flex-shrink: 0; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--color); color: #fff; font-weight: 800; font-size: .95rem;
}
.ins-ico {
  display: inline-block; width: 1.35em; height: 1.35em; vertical-align: -.32em; margin: 0 2px;
  padding: 3px; border-radius: 7px; background: var(--superficie); border: 1px solid var(--borde-fuerte);
  color: #1A73E8; box-sizing: content-box;
}
.ins-nota { margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--dorado-suave); color: var(--dorado-tinta); font-weight: 600; line-height: 1.5; font-size: .9rem; }
.ins-listo { margin: 16px 0 0; color: var(--verde); font-weight: 700; font-size: .9rem; line-height: 1.45; }

.tira-instalar {
  display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 12px 12px 16px;
  border-radius: 16px; background: var(--superficie); border: 1px solid var(--borde);
}
.tira-ico { font-size: 1.5rem; }
.tira-texto { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.tira-texto strong { font-size: .95rem; }
.tira-texto span { font-size: .84rem; color: var(--tinta-2); font-weight: 600; }
.tira-cerrar { width: 44px; height: 44px; border: 0; background: transparent; }

/* ---------- Planes (renderPlanes) ---------- */
button.etiqueta-plan { border: 0; cursor: pointer; font: inherit; font-weight: 900; font-size: .88rem; min-height: 32px; }
button.etiqueta-plan u { text-underline-offset: 2px; }
.planes-titulo { font-family: 'Playfair Display', Georgia, serif; font-size: 1.7rem; margin: .4rem 0 .4rem; }
.planes-intro { margin: 0 0 1.1rem; color: var(--tinta-2); font-weight: 600; line-height: 1.5; }
.planes-grilla { display: grid; gap: 14px; }
@media (min-width: 760px) { .planes-grilla { grid-template-columns: 1fr 1fr; align-items: start; } }
.plan-tarjeta {
  position: relative; padding: 22px 20px 20px; border-radius: 22px; background: var(--superficie);
  border: 1px solid var(--borde); box-shadow: 0 8px 24px -18px rgba(0, 0, 0, .35);
}
.plan-tarjeta.pro { border: 2px solid var(--dorado); background: linear-gradient(180deg, var(--dorado-suave), var(--superficie) 46%); }
.plan-tarjeta h2 { margin: 0; font-size: 1.35rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-chip { font-size: .72rem; font-weight: 800; padding: .2rem .6rem; border-radius: 999px; background: var(--color-suave); color: var(--color); letter-spacing: .02em; }
.plan-cinta {
  position: absolute; top: -11px; right: 18px; padding: .25rem .75rem; border-radius: 999px;
  background: var(--dorado); color: var(--color-hondo); font-size: .74rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase;
}
.plan-precio { margin: 8px 0 0; color: var(--tinta-2); font-weight: 700; }
.plan-precio strong { font-size: 1.7rem; color: var(--tinta); font-weight: 900; }
.plan-anual { margin: 2px 0 0; font-size: .88rem; color: var(--verde); font-weight: 700; }
.plan-lista { list-style: none; margin: 16px 0 18px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.plan-lista li { position: relative; padding-left: 26px; line-height: 1.4; font-weight: 600; color: var(--tinta); font-size: .94rem; }
.plan-lista li::before {
  content: "✓"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: .7rem; font-weight: 900; background: var(--color-suave); color: var(--color);
}
.plan-tarjeta.pro .plan-lista li::before { background: var(--dorado); color: var(--color-hondo); }
.plan-tarjeta .btn + .btn { margin-top: 8px; }
.plan-tuyo { margin: 0; text-align: center; font-weight: 800; color: var(--verde); padding: .7rem; border-radius: 14px; background: var(--verde-suave); }
.ayuda.centrado { text-align: center; margin-top: 1rem; }
