/* Pantallas de acceso (login y registro). Comparten el panel de marca animado. */
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100dvh; }

.auth-marca {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  color: #fff;
  background: #0d0d10;
  isolation: isolate;
}
/* Malla de gradiente que deriva lentamente. */
.auth-marca::before, .auth-marca::after {
  content: "";
  position: absolute;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(70px);
  z-index: -1;
  opacity: 0.75;
}
.auth-marca::before { background: #f2600c; top: -15%; left: -10%; animation: deriva 14s ease-in-out infinite alternate; }
.auth-marca::after { background: #ffb020; bottom: -25%; right: -15%; opacity: 0.45; animation: deriva 18s ease-in-out -6s infinite alternate-reverse; }
@keyframes deriva { to { transform: translate(25%, 20%) scale(1.2); } }

.auth-rejilla {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%);
}

.auth-logo { display: flex; align-items: center; gap: 0.75rem; font-weight: 700; letter-spacing: -0.02em; }
.auth-logo img { width: 42px; height: 42px; border-radius: 12px; }

.auth-titular h1 { color: #fff; font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); font-weight: 800; letter-spacing: -0.045em; line-height: 1.02; }
.auth-titular h1 em { font-style: normal; background: linear-gradient(90deg, #ffb020, #ff7a2e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-titular p { margin-top: 1rem; max-width: 36ch; color: rgba(255,255,255,0.72); font-size: 1.05rem; }

/* Mini tablero que se mueve solo: muestra el producto sin capturas. */
.demo-tablero { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; max-width: 460px; }
.demo-col { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; padding: 0.55rem; min-height: 150px; backdrop-filter: blur(8px); }
.demo-col span { display: block; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.55); margin: 0.1rem 0.2rem 0.5rem; }
.demo-card { background: rgba(255,255,255,0.92); color: #141412; border-radius: 10px; padding: 0.5rem 0.6rem; font-size: 0.72rem; font-weight: 600; margin-bottom: 0.4rem; box-shadow: 0 8px 20px -10px rgba(0,0,0,0.6); }
.demo-card b { display: block; font-family: var(--mono); font-size: 0.64rem; color: #f2600c; }
.demo-card.viaja { animation: viaja 6s var(--ease-spring) infinite; }
@keyframes viaja {
  0%, 18% { transform: translateX(0); }
  30%, 52% { transform: translateX(calc(100% + 1.15rem)) rotate(-2deg); }
  64%, 88% { transform: translateX(calc(200% + 2.3rem)); }
  100% { transform: translateX(0); opacity: 1; }
  96% { opacity: 0; }
}

.auth-form-lado { display: grid; place-items: center; padding: clamp(1.5rem, 1rem + 3vw, 4rem) 1rem; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 1.75rem; font-weight: 780; letter-spacing: -0.035em; }
.auth-card .sub { color: var(--gray-500); margin: 0.4rem 0 1.75rem; }
.auth-card form .btn-primary { width: 100%; padding: 0.85rem; font-size: 1rem; margin-top: 0.4rem; }
.auth-pie { margin-top: 1.5rem; text-align: center; color: var(--gray-500); font-size: 0.92rem; }
.auth-pie a { font-weight: 650; text-decoration: none; }
.auth-tema { position: fixed; top: 1rem; right: 1rem; z-index: 5; }

.campo-pass { position: relative; }
.campo-pass button { position: absolute; right: 0.35rem; top: 50%; transform: translateY(-50%); padding: 0.35rem 0.55rem; font-size: 0.78rem; }
.campo-pass button:hover, .campo-pass button:active { transform: translateY(-50%); }

/* Barra de fuerza de contrasena del registro. */
.fuerza { height: 4px; border-radius: 4px; background: var(--gray-200); overflow: hidden; margin-top: 0.15rem; }
.fuerza i { display: block; height: 100%; width: 0; background: var(--danger); transition: width 0.45s var(--ease-spring), background 0.3s ease; }

/* Entrada escalonada del formulario. */
.auth-card > * { animation: sube 0.7s var(--ease-spring) both; }
.auth-card > *:nth-child(2) { animation-delay: 0.05s; }
.auth-card > *:nth-child(3) { animation-delay: 0.1s; }
.auth-card > *:nth-child(4) { animation-delay: 0.15s; }
.auth-card > *:nth-child(5) { animation-delay: 0.2s; }
.auth-titular, .demo-tablero { animation: sube 0.9s var(--ease-spring) 0.1s both; }
.demo-tablero { animation-delay: 0.25s; }
@keyframes sube { from { opacity: 0; transform: translateY(18px); } }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-marca { min-height: auto; gap: 1.5rem; padding-bottom: 2.25rem; }
  .demo-tablero { display: none; }
  .auth-titular h1 { font-size: 2rem; }
}
