/* ==========================================================================
   MI NEGOCIO FOREVER · hoja de estilo única
   --------------------------------------------------------------------------
   Paleta: papel de herbario, verde bosque y oro de botica.
   Tipografía: Playfair Display para lo que pesa (nombres y dinero),
   Poppins para la interfaz, monoespaciada para los CC.
   Firma: LA ESCALERA — cada nivel muestra cuánto te cuesta la unidad
   y cuánto ganas con ella. Es lo único llamativo; el resto va callado.
   ========================================================================== */

/* ---------------------------------------------------------------- 1. BASE */

:root {
  --papel:        #FBF8F1;
  --papel-hondo:  #F2EDE0;
  --tinta:        #1E2A20;
  --tinta-suave:  #5A6759;
  --bosque:       #2C4234;
  --bosque-claro: #3B5844;
  --salvia:       #6E7F5B;
  --oro:          #A9762A;
  --oro-claro:    #EADFC4;
  --aloe:         #9CC27A;
  --wa:           #25D366;
  --rojo:         #A8442F;
  --linea:        rgba(30, 42, 32, .13);
  --sombra:       0 1px 2px rgba(30, 42, 32, .05), 0 10px 26px -14px rgba(30, 42, 32, .30);
  --r:            14px;
  --r-chico:      9px;
  --display:      "Playfair Display", Georgia, "Times New Roman", serif;
  --texto:        "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --dato:         ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  --nav-alto:     62px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--texto);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: .002em;
  padding-bottom: calc(var(--nav-alto) + env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.16; margin: 0; letter-spacing: -.008em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.24rem; }
h3 { font-size: 1.05rem; }
p  { margin: 0 0 .7rem; }
p:last-child { margin-bottom: 0; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 2.5px solid var(--bosque);
  outline-offset: 2px;
  border-radius: 4px;
}

[hidden] { display: none !important; }

.mono { font-family: var(--dato); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* ------------------------------------------------------- 2. ARMADURA */

.app { max-width: 700px; margin: 0 auto; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--bosque);
  color: var(--papel);
  padding: .62rem 1rem calc(.62rem + env(safe-area-inset-top, 0px));
  padding-top: calc(.62rem + env(safe-area-inset-top, 0px));
  display: flex; align-items: center; gap: .7rem;
}
.topbar-marca { display: flex; align-items: center; gap: .55rem; min-width: 0; flex: 1; }
.topbar-logo {
  width: 36px; height: 36px; flex: none; border-radius: 50%;
  object-fit: cover; background: var(--papel); display: block;
}
.topbar-nombre { font-family: var(--display); font-size: 1.02rem; font-weight: 600; white-space: nowrap; }
.topbar-titulo {
  font-size: .62rem; text-transform: uppercase; letter-spacing: .09em;
  color: var(--aloe); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 62vw;
}
.topbar-acciones { display: flex; gap: .35rem; flex: none; }
.icono-btn {
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .10); color: var(--papel);
  font-size: 15px; display: grid; place-items: center;
}
.icono-btn:hover { background: rgba(255, 255, 255, .2); }

/* tira del producto activo: siempre visible bajo la barra */
.tira-producto {
  position: sticky; top: 0; z-index: 25;
  background: var(--papel-hondo);
  border-bottom: 1px solid var(--linea);
  display: flex; align-items: center; gap: .6rem;
  padding: .45rem 1rem;
  width: 100%; border-left: 0; border-right: 0; border-top: 0;
  text-align: left;
}
.tira-foto { width: 30px; height: 30px; flex: none; display: block; }
.tira-foto img, .tira-foto .monograma { width: 100%; height: 100%; object-fit: contain; }
.tira-texto { flex: 1; min-width: 0; }
.tira-etiqueta { font-size: .62rem; text-transform: uppercase; letter-spacing: .12em; color: var(--tinta-suave); }
.tira-nombre { font-family: var(--display); font-size: .95rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tira-cambiar { font-size: .72rem; color: var(--oro); font-weight: 600; white-space: nowrap; }

.contenido { padding: 1rem; display: grid; gap: .85rem; }
.contenido > * { min-width: 0; }

.vista[hidden] { display: none !important; }
.vista { display: grid; gap: .85rem; }
.col-izq, .col-der { display: grid; gap: .85rem; align-content: start; min-width: 0; }

/* --------------------------------------------------------- 3. NAV INFERIOR */

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(251, 248, 241, .96);
  -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px);
  border-top: 1px solid var(--linea);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.nav-btn {
  border: 0; background: none; color: var(--tinta-suave);
  padding: .5rem .1rem .55rem;
  display: grid; gap: .16rem; justify-items: center;
  font-size: .63rem; font-weight: 500; letter-spacing: .02em;
  position: relative;
}
.nav-btn span[aria-hidden] { font-size: 1.12rem; line-height: 1.1; }
.nav-btn[aria-current="page"] { color: var(--bosque); font-weight: 600; }
.nav-btn[aria-current="page"]::before {
  content: ""; position: absolute; top: 0; left: 22%; right: 22%;
  height: 2.5px; background: var(--oro); border-radius: 0 0 3px 3px;
}

/* ----------------------------------------------------------- 4. TARJETAS */

.tarjeta {
  background: #fff;
  border: 1px solid var(--linea);
  border-radius: var(--r);
  box-shadow: var(--sombra);
  overflow: hidden;
}
.tarjeta-cab {
  padding: .8rem 1rem .55rem;
  display: flex; align-items: baseline; justify-content: space-between; gap: .6rem;
}
.tarjeta-cab h2, .tarjeta-cab h3 { font-size: 1.06rem; }
.tarjeta-cuerpo { padding: 0 1rem 1rem; }
.tarjeta-cuerpo > * + * { margin-top: .65rem; }
.tarjeta-oro { border-left: 4px solid var(--oro); }

.eyebrow {
  font-size: .64rem; text-transform: uppercase; letter-spacing: .15em;
  color: var(--salvia); font-weight: 600;
}
.nota { font-size: .8rem; color: var(--tinta-suave); }

/* ------------------------------------------------------------ 5. CIFRAS */

.cifras { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.cifra {
  background: var(--papel-hondo); border-radius: var(--r-chico);
  padding: .6rem .7rem; border: 1px solid var(--linea);
}
.cifra-val { font-family: var(--display); font-size: 1.35rem; font-weight: 700; line-height: 1.1; }
.cifra-lab { font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--tinta-suave); }
.cifra-oro .cifra-val { color: var(--oro); }

.destacado {
  background: var(--bosque); color: var(--papel);
  border-radius: var(--r); padding: .95rem 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
}
.destacado-val { font-family: var(--display); font-size: 2rem; font-weight: 700; line-height: 1; }
.destacado-lab { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--aloe); }
.destacado-nota { font-size: .76rem; color: rgba(251, 248, 241, .78); text-align: right; }

/* ------------------------------------------------------------ 6. BOTONES */

.btn {
  border: 1px solid transparent; border-radius: 999px;
  padding: .62rem 1.05rem; font-size: .88rem; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  text-decoration: none; line-height: 1.2; white-space: nowrap;
  transition: background-color .16s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn-oro { background: var(--oro); color: #fff; }
.btn-oro:hover { background: #92651F; }
.btn-bosque { background: var(--bosque); color: var(--papel); }
.btn-bosque:hover { background: var(--bosque-claro); }
.btn-wa { background: var(--wa); color: #06331A; }
.btn-wa:hover { background: #1FBE5B; }
.btn-fantasma { background: transparent; border-color: var(--linea); color: var(--tinta); }
.btn-fantasma:hover { background: var(--papel-hondo); }
.btn-peligro { background: transparent; border-color: rgba(168, 68, 47, .4); color: var(--rojo); }
.btn-peligro:hover { background: rgba(168, 68, 47, .07); }
.btn-ancho { width: 100%; }
.btn-chico { padding: .38rem .7rem; font-size: .76rem; }
.btn-fila { display: flex; flex-wrap: wrap; gap: .45rem; }
.btn-fila > .btn { flex: 1 1 auto; }

/* --------------------------------------------------------- 7. FORMULARIOS */

.campo { display: grid; gap: .22rem; min-width: 0; }
.label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--tinta-suave); }
.input, .select, .area {
  width: 100%; background: #fff; color: var(--tinta);
  border: 1px solid var(--linea); border-radius: var(--r-chico);
  padding: .58rem .7rem; font-size: .92rem;
}
.area { min-height: 68px; resize: vertical; font-family: var(--texto); }
.input:focus, .select:focus, .area:focus { border-color: var(--salvia); outline: 2px solid rgba(110, 127, 91, .22); outline-offset: 0; }
.ayuda { font-size: .72rem; color: var(--tinta-suave); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.fila-form { display: grid; gap: .6rem; }

.interruptor { display: flex; align-items: center; gap: .5rem; font-size: .85rem; }
.interruptor input { width: 18px; height: 18px; accent-color: var(--bosque); }

/* --------------------------------------------------- 8. PRODUCTO ACTIVO */

.trabajando {
  display: flex; gap: .85rem; align-items: center;
  background: #fff; border: 1px solid var(--linea); border-left: 4px solid var(--aloe);
  border-radius: var(--r); padding: .7rem .85rem; box-shadow: var(--sombra);
}
.trabajando-foto { width: 56px; height: 56px; flex: none; display: block; }
.trabajando-foto img, .trabajando-foto .monograma { width: 100%; height: 100%; object-fit: contain; }
.trabajando-texto { flex: 1; min-width: 0; }
.trabajando h3 { font-size: 1.06rem; }
.trabajando-precio { font-family: var(--dato); font-size: .82rem; color: var(--tinta-suave); }
.trabajando-ganancia { font-family: var(--display); font-size: 1.15rem; font-weight: 700; color: var(--oro); }

/* ------------------------------------------------- 9. REJILLA PRODUCTOS */

.filtros {
  display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .35rem;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.filtros::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--linea); background: #fff; color: var(--tinta-suave);
  border-radius: 999px; padding: .3rem .68rem; font-size: .74rem; font-weight: 500; white-space: nowrap;
}
.chip:hover { background: var(--papel-hondo); }
.chip-activo { background: var(--bosque); border-color: var(--bosque); color: var(--papel); font-weight: 600; }

.rejilla-productos { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.ficha-producto {
  background: #fff; border: 1px solid var(--linea); border-radius: var(--r);
  padding: .6rem; display: grid; gap: .3rem; text-align: left;
  box-shadow: var(--sombra); position: relative;
}
.foto-ficha { width: 100%; height: 96px; object-fit: contain; }
.foto-detalle { width: 104px; height: 104px; object-fit: contain; flex: none; }
.mini { width: 34px; height: 34px; object-fit: contain; flex: none; }

/* Cuando una foto no carga, en su lugar va un recuadro con las iniciales */
.monograma {
  display: grid; place-items: center; text-align: center;
  background: var(--papel-hondo); color: var(--salvia);
  font-family: var(--display); font-weight: 700;
  border-radius: var(--r-chico); flex: none;
}
.tira-foto .monograma { font-size: .72rem; }
.trabajando-foto .monograma { font-size: 1.2rem; }
.monograma.foto-detalle { width: 104px; height: 104px; font-size: 2rem; }
.monograma.foto-ficha { width: 100%; height: 96px; font-size: 1.7rem; }
.monograma.mini { width: 34px; height: 34px; font-size: .72rem; }
.monograma.topbar-logo { font-size: .85rem; }
.ficha-producto h3 { font-size: .9rem; line-height: 1.2; }
.ficha-pub { font-family: var(--dato); font-size: .76rem; color: var(--tinta-suave); }
.ficha-gana { font-size: .74rem; font-weight: 600; color: var(--oro); }
.ficha-producto[aria-pressed="true"] { border-color: var(--bosque); border-width: 2px; padding: calc(.6rem - 1px); }
.ficha-producto[aria-pressed="true"]::after {
  content: "trabajando"; position: absolute; top: .45rem; right: .45rem;
  background: var(--bosque); color: var(--papel);
  font-size: .56rem; text-transform: uppercase; letter-spacing: .1em;
  padding: .16rem .38rem; border-radius: 999px; font-weight: 600;
}
/* los kits de afiliación: no los vendes tú, los compra el cliente a la empresa */
.ficha-kit::before {
  content: "kit"; position: absolute; top: .3rem; left: .45rem;
  font-size: .54rem; text-transform: uppercase; letter-spacing: .1em;
  font-weight: 700; color: var(--salvia);
  background: var(--papel-hondo); border-radius: 999px; padding: .12rem .4rem;
}

/* ------------------------------------------------------ 10. LA ESCALERA */
/* Firma de la app: seis peldaños, el tuyo encendido, y en cada uno
   lo que te cuesta la unidad y lo que ganas con ella. */

.escalera { display: grid; gap: 0; position: relative; }
.peldano {
  display: grid; grid-template-columns: 26px 1fr; gap: .6rem;
  padding-bottom: .75rem; position: relative;
}
.peldano::before {
  content: ""; position: absolute; left: 12px; top: 20px; bottom: -2px;
  width: 2px; background: var(--linea);
}
.peldano:last-child::before { display: none; }
.peldano-punto {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--linea); background: var(--papel);
  display: grid; place-items: center; font-size: .7rem; font-weight: 700;
  font-family: var(--dato); color: var(--tinta-suave); z-index: 1;
}
.peldano-cuerpo { display: grid; gap: .18rem; min-width: 0; }
.peldano-nombre { font-family: var(--display); font-size: .98rem; font-weight: 600; }
.peldano-req { font-size: .72rem; color: var(--tinta-suave); }
.peldano-datos { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .8rem; }
.peldano-datos b { font-family: var(--dato); font-weight: 600; }
.peldano-gana { color: var(--oro); font-weight: 600; }

/* barra que mide la ganancia por unidad frente al peldaño más alto */
.peldano-barra { height: 4px; border-radius: 3px; background: var(--papel-hondo); overflow: hidden; margin-top: .22rem; }
.peldano-barra i { display: block; height: 100%; background: var(--aloe); border-radius: 3px; }

.peldano-actual .peldano-punto {
  background: var(--bosque); border-color: var(--bosque); color: var(--aloe);
}
.peldano-actual .peldano-nombre { color: var(--bosque); }
.peldano-actual .peldano-barra i { background: var(--oro); }
.peldano-ganado .peldano-punto { border-color: var(--aloe); color: var(--salvia); }
.insignia-aqui {
  display: inline-block; margin-left: .35rem; vertical-align: 1px;
  background: var(--oro-claro); color: #6B4B12;
  font-size: .58rem; text-transform: uppercase; letter-spacing: .1em;
  padding: .12rem .38rem; border-radius: 999px; font-weight: 700;
  font-family: var(--texto);
}
.peldano-meta .peldano-punto { border-color: var(--oro); color: var(--oro); background: var(--oro-claro); }
.peldano-meta .peldano-cuerpo { border-left: 3px solid var(--oro); padding-left: .55rem; margin-left: -.2rem; }

.progreso { display: grid; gap: .3rem; }
.progreso-barra { height: 8px; background: var(--papel-hondo); border-radius: 999px; overflow: hidden; border: 1px solid var(--linea); }
.progreso-barra i { display: block; height: 100%; background: linear-gradient(90deg, var(--salvia), var(--aloe)); border-radius: 999px; transition: width .5s ease; }
.progreso-texto { display: flex; justify-content: space-between; font-size: .76rem; color: var(--tinta-suave); }

/* el siguiente escalón del plan: 2 · 10 · 60 · 120 CC */
.escalon { display: grid; gap: .5rem; }
.escalon-cab { display: flex; align-items: flex-end; justify-content: space-between; gap: .6rem; }
.escalon-nombre {
  font-family: var(--display); font-size: 1.34rem; font-weight: 600;
  line-height: 1.1; color: var(--bosque);
}
.escalon-cc { font-size: .72rem; color: var(--tinta-suave); white-space: nowrap; text-transform: uppercase; letter-spacing: .08em; }
.escalon-cc .mono { font-family: var(--display); font-size: 1.6rem; font-weight: 700; color: var(--oro); letter-spacing: 0; }

.camino { display: flex; flex-wrap: wrap; align-items: center; gap: .28rem; margin-top: .7rem; }
.paso {
  display: grid; justify-items: center; gap: 0;
  border: 1px solid var(--linea); border-radius: var(--r-chico);
  padding: .28rem .5rem; background: var(--papel-hondo); min-width: 64px;
}
.paso b { font-family: var(--dato); font-size: .95rem; line-height: 1.2; }
.paso small { font-size: .57rem; text-transform: uppercase; letter-spacing: .06em; color: var(--tinta-suave); }
.paso-hecho { background: rgba(156, 194, 122, .30); border-color: transparent; }
.paso-ahora { background: var(--bosque); border-color: var(--bosque); }
.paso-ahora b, .paso-ahora small { color: var(--papel); }
.paso-flecha { color: var(--salvia); font-size: .95rem; line-height: 1; }

/* ----------------------------------------------------------- 11. LISTAS */

.lista { display: grid; gap: .45rem; }
.linea {
  display: flex; align-items: center; gap: .65rem;
  background: #fff; border: 1px solid var(--linea); border-radius: var(--r-chico);
  padding: .55rem .7rem;
}
.linea-cuerpo { flex: 1; min-width: 0; }
.linea-titulo { font-weight: 500; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.linea-sub { font-size: .74rem; color: var(--tinta-suave); }
.linea-derecha { text-align: right; flex: none; }
.linea-valor { font-family: var(--dato); font-weight: 600; font-size: .92rem; }
.linea-fecha { font-size: .68rem; color: var(--tinta-suave); }
.linea-acciones { display: flex; gap: .3rem; }

.insignia {
  display: inline-block; font-size: .62rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  padding: .16rem .45rem; border-radius: 999px;
  background: var(--papel-hondo); color: var(--tinta-suave); border: 1px solid var(--linea);
}
button.insignia { cursor: pointer; }
button.insignia:hover { filter: brightness(.96); }

/* cotizar para un cliente */
.cotiza-cab { display: flex; align-items: center; gap: .7rem; margin-bottom: .5rem; }
.cotiza-foto { width: 56px; height: 56px; object-fit: contain; flex: none; }
.monograma.cotiza-foto { width: 56px; height: 56px; font-size: 1.2rem; }
.cotiza-texto { min-width: 0; }
.cotiza-nombre { font-family: var(--display); font-size: 1.05rem; font-weight: 600; line-height: 1.2; }

/* el link de patrocinio, para copiarlo o mandarlo */
.link-caja {
  font-family: var(--dato); font-size: .72rem; word-break: break-all;
  background: var(--papel-hondo); border: 1px dashed var(--linea);
  border-radius: var(--r-chico); padding: .5rem .6rem; color: var(--bosque);
}
.insignia-oro { background: var(--oro-claro); color: #6B4B12; border-color: transparent; }
.insignia-aloe { background: rgba(156, 194, 122, .28); color: #35521F; border-color: transparent; }

.vacio {
  text-align: center; padding: 1.5rem 1rem; color: var(--tinta-suave);
  background: var(--papel-hondo); border: 1px dashed var(--linea); border-radius: var(--r);
  font-size: .86rem;
}
.vacio b { display: block; font-family: var(--display); font-size: 1.05rem; color: var(--tinta); margin-bottom: .2rem; }

/* ------------------------------------------------------------ 12. AVISOS */

.aviso {
  border-radius: var(--r-chico); padding: .6rem .75rem; font-size: .79rem;
  background: var(--papel-hondo); border-left: 3px solid var(--salvia);
}
.aviso-legal { border-left-color: var(--oro); background: #FBF5E6; color: #5C4517; font-size: .75rem; }
.aviso-ok { border-left-color: var(--aloe); background: rgba(156, 194, 122, .18); color: #35521F; }
.aviso-fuerte { border-left-color: var(--rojo); background: rgba(168, 68, 47, .07); color: #6E2C1D; }

/* -------------------------------------------------- 13. SELLO (animación) */

.sello {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center;
  pointer-events: none; background: rgba(30, 42, 32, .18);
}
.sello-caja {
  background: var(--papel); border: 3px double var(--oro); border-radius: 50%;
  width: 176px; height: 176px; display: grid; place-content: center; text-align: center;
  padding: 1rem; box-shadow: 0 18px 40px -12px rgba(30, 42, 32, .5);
  animation: estampar .5s cubic-bezier(.2, 1.5, .4, 1) both;
}
.sello-val { font-family: var(--display); font-size: 1.85rem; font-weight: 700; color: var(--bosque); line-height: 1; }
.sello-lab { font-size: .64rem; text-transform: uppercase; letter-spacing: .14em; color: var(--oro); font-weight: 700; margin-top: .3rem; }
.sello-sub { font-size: .72rem; color: var(--tinta-suave); margin-top: .25rem; }

@keyframes estampar {
  from { transform: scale(1.7) rotate(-14deg); opacity: 0; }
  60%  { opacity: 1; }
  to   { transform: scale(1) rotate(-5deg); opacity: 1; }
}

.brindis {
  position: fixed; left: 50%; bottom: calc(var(--nav-alto) + 16px);
  transform: translateX(-50%) translateY(12px); z-index: 95;
  background: var(--bosque); color: var(--papel);
  padding: .6rem .95rem; border-radius: 999px; font-size: .82rem;
  box-shadow: var(--sombra); opacity: 0; transition: opacity .22s ease, transform .22s ease;
  max-width: 88vw; text-align: center;
}
.brindis.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ------------------------------------------------------------ 14. MODAL */

.modal {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(30, 42, 32, .45);
  display: grid; align-items: end; justify-items: center;
}
.modal-caja {
  background: var(--papel); width: 100%; max-width: 560px;
  border-radius: var(--r) var(--r) 0 0; max-height: 92vh; overflow: auto;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  display: grid; gap: .7rem;
  animation: subir .26s ease both;
}
@keyframes subir { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-cab { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.modal-pie { display: flex; gap: .5rem; }
.modal-pie > .btn { flex: 1; }

/* --------------------------------------------------------- 15. PESTAÑAS */

.pestanas { display: flex; gap: .3rem; background: var(--papel-hondo); padding: .22rem; border-radius: 999px; }
.pestana {
  flex: 1; border: 0; background: none; border-radius: 999px;
  padding: .42rem .5rem; font-size: .78rem; font-weight: 600; color: var(--tinta-suave);
}
.pestana[aria-selected="true"] { background: #fff; color: var(--bosque); box-shadow: var(--sombra); }

/* --------------------------------------------------- 16. TABLA DE NIVELES */

.tabla { width: 100%; border-collapse: collapse; font-size: .82rem; }
.tabla th, .tabla td { text-align: left; padding: .38rem .3rem; border-bottom: 1px solid var(--linea); }
.tabla th { font-size: .64rem; text-transform: uppercase; letter-spacing: .09em; color: var(--tinta-suave); font-weight: 600; }
.tabla td.num, .tabla th.num { text-align: right; font-family: var(--dato); font-variant-numeric: tabular-nums; }
.tabla tr:last-child td { border-bottom: 0; }

/* -------------------------------------------------------- 17. ESCRITORIO */

@media (min-width: 900px) {
  body { padding-bottom: 1.5rem; font-size: 15.5px; }
  .app { max-width: 1120px; padding: 0 1.25rem; }
  .topbar { border-radius: 0 0 var(--r) var(--r); padding-inline: 1.25rem; }
  .tira-producto { border-radius: 0 0 var(--r) var(--r); padding-inline: 1.25rem; }
  .nav {
    position: static; border: 1px solid var(--linea); border-radius: 999px;
    margin: 0 1.25rem .6rem; box-shadow: var(--sombra); background: #fff;
  }
  .contenido { grid-template-columns: 1.55fr 1fr; align-items: start; padding: 0; margin-top: 1rem; }
  .vista { grid-column: 1 / -1; }
  .vista { grid-template-columns: 1.55fr 1fr; align-items: start; }
  .vista > .col-izq { display: grid; gap: .85rem; align-content: start; }
  .vista > .col-der { display: grid; gap: .85rem; align-content: start; position: sticky; top: 4.6rem; }
  .vista > .ancho { grid-column: 1 / -1; }
  .rejilla-productos { grid-template-columns: repeat(3, 1fr); }
  .cifras { grid-template-columns: repeat(4, 1fr); }
  .modal { align-items: center; }
  .modal-caja { border-radius: var(--r); max-width: 620px; }
  .foto-ficha, .monograma.foto-ficha { height: 130px; }
}

@media (min-width: 1100px) {
  .rejilla-productos { grid-template-columns: repeat(5, 1fr); }
}

/* ------------------------------------------------- 18. ACCESIBILIDAD / IMPRESIÓN */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

@media print {
  .nav, .topbar-acciones, .tira-producto, .btn, .icono-btn { display: none !important; }
  body { background: #fff; padding: 0; }
  .tarjeta { box-shadow: none; break-inside: avoid; }
  .escalera { break-inside: avoid; }
}
