/* Panel cálido: propuesta de rediseño para Inicio y Mi tarjeta.
   Vuelve a la paleta de DESIGN.md (marfil, grafito, terracota) que la hoja
   `estudio-interfaz.css` había enfriado a gris oliva, y conserva la serif de
   los títulos. Se enlaza DESPUÉS de `estudio-interfaz.css` y solo en las
   páginas que ya adoptaron la propuesta. */

body.merchant-experience {
  --ivory: #f4efe6;
  --white: #fffdf8;
  --sand: #eadfd0;
  --mist: #e4e7df;
  --graphite: #27323a;
  --graphite-soft: #55616a;
  --mineral: #66727b;
  --terracotta: #b97866;
  --terracotta-dark: #8d5548;
  --terracotta-deep: #74443a;
  --line: rgb(39 50 58 / 15%);
  --radius-surface: 20px;
  --radius-control: 12px;
  --shadow-raised: 0 10px 26px -14px rgb(39 50 58 / 30%);
  --shadow-surface: 0 30px 60px -28px rgb(39 50 58 / 45%);
  background: var(--ivory);
  color: var(--graphite);
}

/* ------------------------------------------------------------- cabecera */

/* El menú deja de ser una fila de diez textos iguales. Las secciones van en
   una bandeja de píldoras; sellar, que es lo que se hace todo el día, es el
   botón de la derecha; y lo de la cuenta (plan, configuración, salir) queda
   aparte y más callado. */
body.merchant-experience .panel-header {
  background: var(--white);
  border-top: 0;
  border-bottom: 1px solid var(--line);
}

body.merchant-experience .panel-header-inner {
  width: min(100% - 3rem, 82rem);
  min-height: 76px;
}

body.merchant-experience .panel-nav {
  align-items: center;
  gap: 0.15rem;
}

body.merchant-experience .panel-nav a,
body.merchant-experience .panel-nav .panel-salir {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 0.85rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--graphite-soft);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 140ms ease-out, color 140ms ease-out;
}

body.merchant-experience .panel-nav a:hover,
body.merchant-experience .panel-nav .panel-salir:hover {
  background: var(--ivory);
  color: var(--graphite);
}

body.merchant-experience .panel-nav a[aria-current='page'] {
  border: 0;
  background: var(--sand);
  color: var(--terracotta-deep);
  font-weight: 600;
}

@media (min-width: 75.01rem) {
  body.merchant-experience .panel-nav {
    flex-wrap: nowrap;
  }

  /* Sellar: la acción del mostrador, siempre a la vista. */
  body.merchant-experience .panel-nav a[href='/panel/sellar'] {
    order: 3;
    margin-left: 0.6rem;
    padding: 0 1.15rem;
    background: var(--terracotta-dark);
    color: var(--white);
    font-weight: 600;
  }

  body.merchant-experience .panel-nav a[href='/panel/sellar']:hover,
  body.merchant-experience .panel-nav a[href='/panel/sellar'][aria-current='page'] {
    background: var(--terracotta-deep);
    color: var(--white);
  }

  /* Cuenta: separada por una línea y en tono más bajo. */
  body.merchant-experience .panel-nav :is(a[href='/panel/suscripcion'], a[href='/panel/configuracion'], a[href='/panel/acceso'], .panel-salir) {
    order: 2;
    padding: 0 0.6rem;
    color: var(--mineral);
    font-size: 0.8125rem;
  }

  body.merchant-experience .panel-nav a[href='/panel/suscripcion'] {
    position: relative;
    margin-left: 1.1rem;
  }

  body.merchant-experience .panel-nav a[href='/panel/suscripcion']::before {
    content: '';
    position: absolute;
    left: -0.6rem;
    top: 50%;
    width: 1px;
    height: 1.25rem;
    background: var(--line);
    transform: translateY(-50%);
  }
}

@media (max-width: 75rem) {
  body.merchant-experience .panel-header-inner {
    width: min(100% - 2rem, 82rem);
    gap: 0.5rem 0.75rem;
  }

  body.merchant-experience .panel-marca img {
    width: 128px;
  }

  body.merchant-experience .panel-header .panel-menu {
    border-color: rgb(39 50 58 / 30%);
    border-radius: 999px;
    padding-inline: 0.9rem;
  }

  body.merchant-experience .panel-header .panel-atajo-sellar {
    border-radius: 999px;
    background: var(--terracotta-dark);
  }

  body.merchant-experience .panel-header .panel-nav-responsive.abierto {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
    padding: 0.75rem 0 0.5rem;
  }

  body.merchant-experience .panel-header .panel-nav-responsive.abierto :is(a, .panel-salir) {
    justify-content: flex-start;
    min-height: 48px;
    padding: 0 1rem;
    border-radius: var(--radius-control);
    background: var(--ivory);
    color: var(--graphite);
    font-size: 0.95rem;
    font-weight: 500;
  }

  body.merchant-experience .panel-header .panel-nav-responsive.abierto a[aria-current='page'] {
    background: var(--sand);
    color: var(--terracotta-deep);
    font-weight: 600;
  }

  body.merchant-experience .panel-header .panel-nav-responsive.abierto a[href='/panel/sellar'] {
    background: var(--terracotta-dark);
    color: var(--white);
    font-weight: 600;
  }

  body.merchant-experience .panel-header .panel-nav-responsive.abierto .panel-salir {
    background: transparent;
    color: var(--mineral);
  }
}

body.merchant-experience .aviso-suscripcion {
  background: var(--sand);
  color: var(--graphite);
  font-size: 0.875rem;
}

/* --------------------------------------------------------------- inicio */

body.merchant-experience .home-main {
  width: min(100% - 3rem, 72rem);
  max-width: none;
  padding-top: 2rem;
}

/* El saludo, la tarjeta y los números viven en una sola pieza: es el
   mostrador del negocio, y es lo único de la pantalla con fondo propio. */
body.merchant-experience .home-hero {
  border-radius: 28px;
  background: var(--sand);
  overflow: hidden;
}

body.merchant-experience .home-welcome {
  grid-template-columns: minmax(0, 1fr) minmax(0, 21rem);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(1.75rem, 4.5vw, 3.5rem);
  padding-bottom: clamp(1.75rem, 4vw, 3rem);
}

body.merchant-experience .business-greeting {
  margin: 0 0 0.9rem;
  color: var(--terracotta-deep);
  font-size: 0.95rem;
  font-weight: 600;
}

body.merchant-experience .business-greeting::before {
  content: none;
}

body.merchant-experience .welcome-copy h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: var(--graphite);
}

body.merchant-experience .welcome-copy h1 em {
  color: var(--terracotta-dark);
}

body.merchant-experience .welcome-description {
  max-width: 38ch;
  margin: 1.1rem 0 1.6rem;
  color: var(--graphite-soft);
  font-size: 1.05rem;
  line-height: 1.55;
}

body.merchant-experience .primary-action {
  min-height: 52px;
  padding: 0.9rem 1.4rem;
  border-radius: var(--radius-control);
  background: var(--terracotta-dark);
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
}

body.merchant-experience .primary-action:hover {
  background: var(--terracotta-deep);
  transform: none;
}

body.merchant-experience .quiet-action {
  color: var(--graphite);
  font-size: 0.9rem;
  font-weight: 600;
  text-underline-offset: 0.25em;
}

/* La tarjeta es el único objeto con color del negocio: va inclinada y con
   sombra, como dejada sobre el mostrador. */
body.merchant-experience .card-stage {
  padding: 0;
  background: none;
  justify-self: end;
  width: 100%;
}

body.merchant-experience .card-stage .tarjeta-preview {
  transform: rotate(-2.5deg);
  box-shadow: var(--shadow-surface);
}

body.merchant-experience .stage-caption {
  display: none;
}

body.merchant-experience .stage-foot {
  margin-top: 1.4rem;
  color: var(--graphite-soft);
  font-size: 0.8125rem;
}

body.merchant-experience .stage-foot a {
  color: var(--graphite);
  font-weight: 600;
}

body.merchant-experience .home-metrics {
  border: 0;
  border-top: 1px solid rgb(39 50 58 / 14%);
  padding: 0;
  background: rgb(255 253 248 / 55%);
}

body.merchant-experience .home-metrics a {
  display: grid;
  gap: 0.2rem;
  padding: 1.25rem clamp(1rem, 4.5vw, 3.5rem);
  border-left: 1px solid rgb(39 50 58 / 14%);
  color: var(--graphite);
  transition: background-color 160ms ease-out;
}

body.merchant-experience .home-metrics a:first-child {
  border-left: 0;
  padding-left: clamp(1.75rem, 4.5vw, 3.5rem);
}

body.merchant-experience .home-metrics a:hover {
  background: var(--white);
}

body.merchant-experience .home-metrics strong {
  font-family: var(--estudio-titular, Georgia, serif);
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
}

body.merchant-experience .home-metrics span {
  display: block;
  margin: 0;
  color: var(--graphite-soft);
  font-size: 0.875rem;
}

body.merchant-experience .home-metrics b {
  display: none;
}

body.merchant-experience .home-next {
  margin: 1.5rem 0 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
  background: var(--white);
}

body.merchant-experience .home-next :is(h2, p) {
  color: var(--graphite);
}

body.merchant-experience .home-next h2 {
  font-size: 1.15rem;
}

body.merchant-experience .home-next p {
  color: var(--graphite-soft);
  font-size: 0.9rem;
}

body.merchant-experience .home-next .primary-action {
  border: 0;
  background: var(--graphite);
  color: var(--white);
}

body.merchant-experience .next-label {
  color: var(--terracotta-deep);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
}

body.merchant-experience .home-lower {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  margin-top: 1.5rem;
}

body.merchant-experience .community-section {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
  background: var(--white);
}

body.merchant-experience .section-heading h2 {
  font-size: 1.6rem;
}

body.merchant-experience .section-heading a {
  color: var(--terracotta-deep);
  font-size: 0.875rem;
  font-weight: 600;
}

body.merchant-experience .section-description {
  margin: 0.4rem 0 0.75rem;
  color: var(--graphite-soft);
  font-size: 0.9rem;
}

body.merchant-experience .community-person {
  gap: 0.9rem;
  padding: 0.9rem 0;
  color: var(--graphite);
}

body.merchant-experience .community-person:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

body.merchant-experience .person-avatar {
  width: 44px;
  height: 44px;
  background: var(--sand);
  color: var(--terracotta-deep);
  font-size: 0.8125rem;
  font-weight: 600;
}

body.merchant-experience .person-name strong {
  font-size: 0.95rem;
}

body.merchant-experience .person-name small,
body.merchant-experience .person-progress {
  color: var(--graphite-soft);
  font-size: 0.8125rem;
}

body.merchant-experience .community-empty {
  margin: 0;
  background: var(--ivory);
  color: var(--graphite);
}

/* El bloque de campañas es la pieza oscura de la pantalla: da el contraste
   que le faltaba a una página toda en claros. */
body.merchant-experience .campaign-inspiration {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: var(--radius-surface);
  background: var(--graphite);
  color: var(--white);
}

body.merchant-experience .campaign-inspiration .next-label {
  color: #e3b3a3;
}

body.merchant-experience .campaign-inspiration h2 {
  font-family: var(--estudio-titular, Georgia, serif);
  font-weight: 400;
  letter-spacing: -0.035em;
  margin: 0.6rem 0 0.7rem;
  color: var(--white);
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  line-height: 1.08;
}

body.merchant-experience .campaign-inspiration h2 em {
  color: #e3b3a3;
}

body.merchant-experience .campaign-inspiration p {
  color: rgb(255 253 248 / 78%);
  font-size: 0.95rem;
  line-height: 1.55;
}

body.merchant-experience .campaign-inspiration > a {
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-control);
  background: var(--white);
  color: var(--graphite);
  font-size: 0.95rem;
  text-decoration: none;
}

body.merchant-experience .campaign-inspiration > a:hover {
  background: var(--sand);
}

body.merchant-experience .campaign-paths {
  margin-top: 1.25rem;
  border-top-color: rgb(255 253 248 / 20%);
}

body.merchant-experience .campaign-paths a {
  padding: 0.95rem 0 0;
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
}

body.merchant-experience .campaign-paths a span {
  margin-top: 0.1rem;
  color: rgb(255 253 248 / 70%);
  font-size: 0.8125rem;
  font-weight: 400;
}

body.merchant-experience .home-footer {
  margin-top: 2.5rem;
  color: var(--mineral);
  font-size: 0.8125rem;
}

/* ----------------------------------------------------------- mi tarjeta */

body.merchant-experience .panel-eyebrow {
  color: var(--terracotta-deep);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

body.merchant-experience .panel-intro h1 {
  font-size: clamp(2.3rem, 4.2vw, 3.4rem);
}

body.merchant-experience .panel-sub {
  color: var(--graphite-soft);
  font-size: 1.02rem;
}

body.merchant-experience .tarjeta-atajos a {
  border-color: rgb(39 50 58 / 28%);
  background: transparent;
}

body.merchant-experience .tarjeta-atajos a:hover {
  border-color: var(--terracotta-dark);
  background: var(--white);
  color: var(--terracotta-deep);
}

/* Los cinco pasos son una secuencia real: cada uno lleva su número, y la
   barra deja de ser una caja para ser una línea de avance. */
body.merchant-experience .wizard-progreso {
  gap: 0.85rem;
  margin-bottom: 1.5rem;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

body.merchant-experience .wizard-progreso-estado {
  display: none;
}

body.merchant-experience .wizard-progreso progress {
  order: 2;
  height: 3px;
  background: rgb(39 50 58 / 14%);
}

body.merchant-experience .wizard-progreso progress::-webkit-progress-bar {
  background: rgb(39 50 58 / 14%);
}

body.merchant-experience .wizard-progreso-pasos {
  counter-reset: paso;
  gap: 0.4rem;
  color: var(--graphite-soft);
  font-size: 0.875rem;
  font-weight: 500;
}

body.merchant-experience .wizard-progreso-pasos li,
body.merchant-experience .wizard-progreso-pasos li:not(:first-child, :last-child),
body.merchant-experience .wizard-progreso-pasos li:last-child {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
}

body.merchant-experience .wizard-progreso-pasos li::before {
  counter-increment: paso;
  content: counter(paso);
  display: grid;
  place-items: center;
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid rgb(39 50 58 / 30%);
  border-radius: 50%;
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

body.merchant-experience .wizard-progreso-pasos li.completado {
  color: var(--graphite);
}

body.merchant-experience .wizard-progreso-pasos li.completado::before {
  border-color: var(--graphite);
  background: var(--graphite);
  color: var(--white);
}

body.merchant-experience .wizard-progreso-pasos li.actual {
  color: var(--terracotta-deep);
  font-weight: 700;
}

body.merchant-experience .wizard-progreso-pasos li.actual::before {
  border-color: var(--terracotta-dark);
  background: var(--terracotta-dark);
  color: var(--white);
}

body.merchant-experience .paso.activo {
  gap: 1.35rem;
  padding: clamp(1.4rem, 3.5vw, 2.25rem);
  border-radius: var(--radius-surface);
  box-shadow: none;
}

body.merchant-experience .paso-contador {
  display: none;
}

body.merchant-experience .paso-encabezado h2 {
  font-family: var(--estudio-titular, Georgia, serif);
  font-size: 1.9rem;
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

body.merchant-experience .paso label,
body.merchant-experience .campo-color-titulo {
  font-size: 0.95rem;
}

body.merchant-experience .campo-archivo {
  padding: 1.25rem 1.35rem;
  border-color: rgb(39 50 58 / 35%);
  background: var(--ivory);
}

body.merchant-experience .campo-archivo-titulo {
  font-size: 0.95rem;
}

body.merchant-experience .campo-archivo-pista,
body.merchant-experience .campo-archivo-nombre {
  font-size: 0.875rem;
}

body.merchant-experience .campo-archivo-accion {
  padding: 0.5rem 1rem;
  border-color: var(--graphite);
  background: var(--white);
  font-size: 0.875rem;
}

body.merchant-experience .wizard-acciones button:not(.secundario),
body.merchant-experience .paso > button:not(.secundario):not([class]) {
  min-height: 54px;
  border-radius: var(--radius-control);
  background: var(--terracotta-dark);
  font-size: 1rem;
}

body.merchant-experience .wizard-acciones button:not(.secundario):hover,
body.merchant-experience .paso > button:not(.secundario):not([class]):hover {
  background: var(--terracotta-deep);
}

/* La vista previa es un escenario: la tarjeta protagoniza y sus controles
   quedan debajo, en vez de empujarla hacia abajo. */
body.merchant-experience .wizard-vista {
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 24px;
  background: var(--sand);
}

body.merchant-experience .vista-titulo {
  color: var(--terracotta-deep);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

body.merchant-experience .wizard-vista .tarjeta-preview {
  order: 1;
  box-shadow: var(--shadow-surface);
}

body.merchant-experience .wizard-vista .registro-preview {
  order: 1;
}

body.merchant-experience .preview-controls {
  order: 2;
  gap: 0.5rem;
  padding: 0;
}

body.merchant-experience .wizard-vista > :not(.vista-titulo, .tarjeta-preview, .registro-preview, .preview-controls) {
  order: 3;
}

body.merchant-experience .preview-surfaces {
  gap: 0;
  padding: 3px;
  border-radius: 999px;
  background: rgb(39 50 58 / 10%);
}

body.merchant-experience .preview-surfaces button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--graphite);
  font-size: 0.875rem;
}

body.merchant-experience .preview-surfaces button[aria-pressed='true'] {
  background: var(--white);
  color: var(--graphite);
  box-shadow: 0 1px 3px rgb(39 50 58 / 22%);
}

body.merchant-experience .preview-controls label {
  margin-top: 0.4rem;
  color: var(--graphite);
  font-size: 0.875rem;
}

body.merchant-experience .preview-controls input[type='range'] {
  min-height: 32px;
  accent-color: var(--terracotta-dark);
}

body.merchant-experience .preview-disclaimer,
body.merchant-experience .wizard-vista > p:not(.vista-titulo) {
  color: var(--graphite-soft);
  font-size: 0.8125rem;
  line-height: 1.45;
}

@media (min-width: 46rem) {
  body.merchant-experience .wizard {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem);
    gap: clamp(1.25rem, 2.5vw, 2rem);
  }
}

/* ---------------------------------------------------------------- móvil */

@media (max-width: 700px) {
  body.merchant-experience .home-main {
    width: calc(100% - 1.5rem);
    padding-top: 1rem;
  }

  body.merchant-experience .home-hero {
    border-radius: 22px;
  }

  body.merchant-experience .home-welcome {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    padding: 1.5rem 1.25rem 2rem;
  }

  body.merchant-experience .welcome-copy h1 {
    font-size: 2.7rem;
  }

  body.merchant-experience .home-actions {
    gap: 1rem;
  }

  body.merchant-experience .card-stage {
    width: min(100%, 17rem);
    justify-self: center;
  }

  body.merchant-experience .stage-foot {
    justify-content: center;
    text-align: center;
  }

  body.merchant-experience .home-metrics a,
  body.merchant-experience .home-metrics a:first-child {
    padding: 1rem 0.75rem;
  }

  body.merchant-experience .home-metrics a:first-child {
    padding-left: 1.25rem;
  }

  body.merchant-experience .home-metrics strong {
    font-size: 2rem;
  }

  body.merchant-experience .home-metrics span {
    font-size: 0.8125rem;
    line-height: 1.3;
  }

  body.merchant-experience .home-lower {
    grid-template-columns: minmax(0, 1fr);
  }

  /* En celular la vista previa va primero pero compacta: la tarjeta no
     ocupa la pantalla entera antes de llegar al primer campo. */
  body.merchant-experience .wizard-vista {
    padding: 1rem;
  }

  body.merchant-experience .wizard-vista .tarjeta-preview {
    width: min(100%, 15rem);
    justify-self: center;
  }

  body.merchant-experience .wizard-progreso-pasos {
    font-size: 0.8125rem;
  }

  body.merchant-experience .wizard-progreso-pasos li:not(.actual) {
    font-size: 0;
    gap: 0;
  }

  body.merchant-experience .wizard-progreso-pasos {
    grid-template-columns: repeat(5, auto);
    justify-content: start;
    gap: 0.5rem;
  }
}

/* ---------------------------------------------------------------- acceso */

/* La pantalla de entrada se parte en dos: a la izquierda el producto (las
   tarjetas, sobre grafito) y a la derecha solo el formulario, sin caja. */
body.auth-calido {
  --ivory: #f4efe6;
  --white: #fffdf8;
  --sand: #eadfd0;
  --graphite: #27323a;
  --graphite-soft: #55616a;
  --terracotta: #b97866;
  --terracotta-dark: #8d5548;
  --terracotta-deep: #74443a;
  --line: rgb(39 50 58 / 15%);
  --radius-control: 12px;
  background: var(--ivory);
  color: var(--graphite);
}

body.auth-calido .auth-layout {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  width: 100%;
  /* Todo cabe en la ventana: los tamaños de abajo se miden contra su alto. */
  height: 100dvh;
  min-height: 40rem;
  margin: 0;
  padding: 0;
}

body.auth-calido .auth-visual {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(1rem, 3vh, 2.5rem);
  padding: clamp(1.75rem, 6vh, 4.5rem) clamp(1.5rem, 5vw, 4.5rem) 0;
  overflow: hidden;
  background:
    radial-gradient(52rem 26rem at 32% 112%, rgb(185 120 102 / 26%), transparent 65%),
    var(--graphite);
  color: var(--white);
}

body.auth-calido .auth-visual-copy {
  display: block;
  margin: 0;
}

body.auth-calido .auth-visual-copy p {
  margin: 0 0 1rem;
  color: #e3b3a3;
  font-size: 0.95rem;
  font-weight: 600;
}

body.auth-calido .auth-visual-copy h2 {
  max-width: 13ch;
  color: var(--white);
  font-family: var(--estudio-titular, Georgia, serif);
  font-size: clamp(2.2rem, min(4.6vw, 7.6vh), 4.6rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

body.auth-calido .auth-visual figure {
  display: grid;
  align-content: end;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

body.auth-calido .auth-visual .pases-abanico {
  --abanico-alto: 50%;
  /* El abanico mide 3:2; su ancho se limita por el alto de la ventana. */
  width: min(100%, 72vh);
  overflow: visible;
  background: none;
}

body.auth-calido .auth-visual .pase {
  box-shadow:
    0 2em 4em rgb(0 0 0 / 45%),
    inset 0 1px 0 rgb(255 255 255 / 14%);
  animation: abanico-abre 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

body.auth-calido .auth-visual .pase:nth-child(1) {
  animation-delay: 140ms;
}

body.auth-calido .auth-visual .pase:nth-child(2) {
  animation-delay: 220ms;
}

/* Sin `to`: cada pase termina en su propio giro del abanico. No se anima la
   opacidad: a medio camino el texto de los pases perdía contraste. */
@keyframes abanico-abre {
  from {
    transform: translate(-50%, -36%) rotate(0deg);
  }
}

body.auth-calido .auth-visual figcaption {
  position: static;
  max-width: none;
  padding: 0.5rem 0 1.5rem;
  border-radius: 0;
  background: none;
  color: rgb(255 253 248 / 62%);
  font-size: 0.8125rem;
  font-weight: 400;
}

body.auth-calido .auth-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: clamp(1.25rem, 3.5vh, 2.5rem) clamp(1.5rem, 5vw, 5rem) clamp(1.25rem, 3.5vh, 2.5rem);
}

body.auth-calido .auth-marca img {
  width: 150px;
  height: auto;
}

body.auth-calido .auth-vistas {
  align-self: center;
  justify-self: center;
  width: min(100%, clamp(29rem, 31vw, 35rem));
}

body.auth-calido .auth-wali {
  position: relative;
  z-index: 1;
  display: block;
  width: fit-content;
  /* Los pies quedan apoyados en el borde de la tarjeta. */
  margin: 0 0 calc(clamp(6rem, 17.5vh, 11rem) * -0.115) 1.25rem;
  pointer-events: none;
}

body.auth-calido .auth-wali img {
  display: block;
  width: clamp(6rem, 17.5vh, 11rem);
  height: auto;
}

/* Cada vista (entrar, recuperar, nueva contraseña) es una tarjeta blanca
   sobre el marfil; Wali queda de pie sobre su borde superior. */
body.auth-calido .auth-vistas > div {
  padding: clamp(1.4rem, 3.6vh, 2.5rem) clamp(1.4rem, 2.6vw, 2.4rem) clamp(1.1rem, 2.8vh, 2rem);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--white);
  box-shadow: 0 34px 70px -40px rgb(39 50 58 / 55%);
}

body.auth-calido .auth-vistas .panel-intro {
  margin-bottom: clamp(1rem, 2.6vh, 1.6rem);
}

/* El hueco del error solo existe cuando hay un error que mostrar. */
body.auth-calido .auth-vistas .error:empty,
body.auth-calido .auth-vistas .auth-success:empty {
  display: none;
}

body.auth-calido .auth-vistas form {
  gap: clamp(0.7rem, 1.8vh, 1.1rem);
}

body.auth-calido .panel-eyebrow {
  color: var(--terracotta-deep);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

body.auth-calido .panel-intro h1 {
  font-size: clamp(2.2rem, min(3.6vw, 6.4vh), 3.3rem);
  line-height: 1.03;
}

body.auth-calido .panel-sub {
  margin-top: 0.6rem;
  color: var(--graphite-soft);
  font-size: 1rem;
}

body.auth-calido .auth-panel .panel-superficie {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

body.auth-calido .auth-panel label {
  font-size: 0.95rem;
}

body.auth-calido .auth-panel input {
  min-height: clamp(48px, 7vh, 56px);
  border-color: rgb(39 50 58 / 30%);
  border-radius: var(--radius-control);
  background: var(--ivory);
  font-size: 1rem;
}

body.auth-calido .auth-panel input:focus {
  border-color: var(--terracotta-dark);
}

body.auth-calido .auth-panel button[type='submit'] {
  width: 100%;
  min-height: clamp(50px, 7.2vh, 56px);
  border-radius: var(--radius-control);
  background: var(--terracotta-dark);
  font-size: 1.02rem;
}

body.auth-calido .auth-panel button[type='submit']:hover {
  background: var(--terracotta-deep);
}

body.auth-calido .auth-text-button,
body.auth-calido .auth-back {
  min-height: 44px;
  font-size: 0.9rem;
}

body.auth-calido .auth-text-button {
  color: var(--terracotta-deep);
}

body.auth-calido .panel-pie {
  margin: 1.1rem 0 0;
  color: var(--graphite-soft);
  font-size: 0.95rem;
  text-align: center;
}

body.auth-calido .panel-pie a {
  color: var(--graphite);
  font-weight: 600;
}

@media (max-width: 880px) {
  body.auth-calido .auth-layout {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    height: auto;
    min-height: 0;
    gap: 0;
  }

  body.auth-calido .auth-panel {
    padding: 1.25rem 1.25rem 2.5rem;
  }

  body.auth-calido .auth-vistas {
    padding-top: 0.5rem;
  }

  body.auth-calido .auth-wali {
    margin-bottom: -0.95rem;
  }

  body.auth-calido .auth-wali img {
    width: 8.25rem;
  }

  body.auth-calido .auth-visual .pases-abanico {
    width: 100%;
  }

  body.auth-calido .panel-intro h1 {
    font-size: 2.5rem;
  }

  body.auth-calido .auth-visual {
    padding: 2.5rem 1.25rem 0;
  }

  body.auth-calido .auth-visual-copy h2 {
    max-width: 14ch;
    font-size: 2.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.auth-calido .auth-visual .pase {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.merchant-experience .card-stage .tarjeta-preview {
    transform: none;
  }
}

/* Teléfonos angostos: el logo cede ancho para que "Registrar visita" y
   "Menú" sigan en su misma fila. */
@media (max-width: 23.5rem) {
  body.merchant-experience .panel-marca img {
    width: 104px;
  }

  body.merchant-experience .panel-header .panel-menu {
    padding-inline: 0.75rem;
  }
}
