/* =========================================================
   INGRESOS (admin + clientes): pantalla completa dividida
   Panel lateral animado + formulario. Usa todo el ancho.
   ========================================================= */

.auth-page {
  --auth-accent: var(--primary, #173d26);
  --auth-dark: #0b130e;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  width: 100%;
  min-height: 100vh;
  background: var(--bg, #fff);
  color: var(--text, #101713);
}

.auth-page--public { min-height: calc(100vh - 120px); }

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vw, 64px);
}

.auth-main__box {
  width: 100%;
  max-width: 480px;
}

/* ---------- Panel lateral ---------- */

.auth-aside {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--auth-dark);
  display: flex;
  --mx: 0;
  --my: 0;
}

.auth-bg, .auth-bg__layer, .auth-bg__img { position: absolute; inset: 0; }

.auth-bg__img {
  background: var(--auth-img) center/cover no-repeat;
  opacity: 0.35;
}

.auth-bg__layer {
  background:
    radial-gradient(60% 50% at 20% 20%, color-mix(in srgb, var(--auth-accent) 70%, transparent), transparent 70%),
    radial-gradient(50% 60% at 85% 80%, color-mix(in srgb, var(--auth-accent) 45%, transparent), transparent 70%);
  animation: authShift 14s ease-in-out infinite alternate;
}

.auth-fx--malla .auth-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent);
  transform: translate(calc(var(--mx) * 18px), calc(var(--my) * 18px));
  animation: authGrid 22s linear infinite;
}

.auth-fx--gradiente .auth-bg__layer {
  background: linear-gradient(120deg, var(--auth-dark), var(--auth-accent), var(--auth-dark), var(--auth-accent));
  background-size: 300% 300%;
  animation: authGradient 12s ease infinite;
}

.auth-fx--ninguno .auth-orb { display: none; }

.auth-orb {
  position: absolute;
  border-radius: 50%;
  background: color-mix(in srgb, var(--auth-accent) 55%, #fff 0%);
  opacity: 0.35;
  filter: blur(50px);
  transform: translate(calc(var(--mx) * -40px), calc(var(--my) * -40px));
  transition: transform 0.4s ease-out;
}
.auth-orb.is-a { width: 340px; height: 340px; top: -90px; left: -80px; animation: authFloat 11s ease-in-out infinite; }
.auth-orb.is-b { width: 260px; height: 260px; bottom: 10%; right: -60px; animation: authFloat 14s ease-in-out infinite reverse; }
.auth-orb.is-c { width: 160px; height: 160px; top: 45%; left: 40%; animation: authFloat 9s ease-in-out infinite; }

.auth-fx--burbujas .auth-orb { filter: none; opacity: 0.18; }

.auth-aside__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  width: 100%;
  padding: clamp(28px, 4vw, 64px);
}

.auth-brand { display: inline-flex; align-items: center; color: #fff; text-decoration: none; letter-spacing: 0.12em; font-size: 1.05rem; }
.auth-brand img { height: 40px; width: auto; display: block; }

.auth-copy { max-width: 620px; animation: authIn 0.8s ease both; }

.auth-eyebrow {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.auth-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 3.6vw, 3.4rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.auth-typed {
  margin: 0 0 14px;
  min-height: 1.6em;
  font-size: clamp(1.1rem, 1.6vw, 1.5rem);
  font-weight: 600;
  color: color-mix(in srgb, var(--auth-accent) 40%, #fff);
}
.auth-caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 3px; vertical-align: -0.15em; background: currentColor; animation: authBlink 1s steps(2) infinite; }

.auth-text { margin: 0 0 22px; font-size: 1.02rem; line-height: 1.6; color: rgba(255,255,255,.78); max-width: 52ch; }

.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.auth-points li {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.98rem; color: rgba(255,255,255,.92);
  opacity: 0;
  animation: authIn 0.6s ease forwards;
  animation-delay: calc(0.35s + var(--i) * 0.14s);
}
.auth-points li span {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px; flex: none;
  border-radius: 50%;
  background: var(--auth-accent);
  color: #fff; font-size: 0.8rem; font-weight: 700;
}

/* Cinta animada */
.auth-ribbon {
  margin: 0 calc(clamp(28px, 4vw, 64px) * -1);
  padding: 14px 0;
  background: #000;
  border-block: 1px solid rgba(255,255,255,.14);
  overflow: hidden;
  transform: rotate(-1.2deg);
}
.auth-ribbon__track { display: flex; width: max-content; animation: authRibbon 32s linear infinite; }
.auth-ribbon__track > div { display: flex; align-items: center; gap: 28px; padding-right: 28px; white-space: nowrap; }
.auth-ribbon span { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #fff; }
.auth-ribbon i { font-style: normal; color: var(--auth-accent); filter: brightness(1.6); }

/* ---------- Formulario del cliente ---------- */

.auth-form-head { margin-bottom: 26px; animation: authIn 0.6s ease both; }
.auth-form-head h1 { margin: 0 0 8px; font-size: clamp(1.7rem, 2.4vw, 2.2rem); letter-spacing: -0.02em; }
.auth-form-head p { margin: 0; color: var(--text-soft, #68716a); }

.auth-form { display: grid; gap: 16px; }
.auth-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.auth-field { display: grid; gap: 6px; font-size: 0.86rem; font-weight: 600; }
.auth-field input, .auth-field select, .auth-field textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--border, #dce2db);
  border-radius: var(--radius, 10px);
  background: var(--surface, #fff);
  color: var(--text, #101713);
  font: inherit; font-weight: 400;
  transition: border-color .18s, box-shadow .18s;
}
.auth-field input:focus, .auth-field select:focus, .auth-field textarea:focus {
  outline: none;
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-accent) 22%, transparent);
}
.auth-check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.86rem; font-weight: 400; }
.auth-check input { margin-top: 3px; }
.auth-error { padding: 10px 12px; border-radius: 8px; background: #fef3f2; color: #b42318; font-size: 0.88rem; }
.auth-ok { padding: 10px 12px; border-radius: 8px; background: #ecfdf3; color: #067647; font-size: 0.88rem; }
.auth-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px; border: 0; cursor: pointer;
  border-radius: var(--radius, 10px);
  background: var(--primary, #173d26);
  color: var(--primary-text, #fff);
  font: inherit; font-weight: 700; text-decoration: none;
  transition: transform .15s, filter .15s;
}
.auth-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.auth-btn:disabled { opacity: .6; cursor: wait; transform: none; }
.auth-btn.is-ghost { background: transparent; color: var(--text); border: 1px solid var(--border, #dce2db); }
.auth-alt { margin-top: 22px; text-align: center; font-size: 0.92rem; color: var(--text-soft, #68716a); }
.auth-alt a, .auth-link { color: var(--primary, #173d26); font-weight: 700; background: none; border: 0; cursor: pointer; padding: 0; font: inherit; }

@keyframes authIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes authBlink { 50% { opacity: 0; } }
@keyframes authFloat { 50% { transform: translate(24px, -30px) scale(1.08); } }
@keyframes authShift { to { transform: scale(1.12) translate(2%, -2%); } }
@keyframes authGrid { to { background-position: 44px 44px; } }
@keyframes authGradient { 50% { background-position: 100% 50%; } }
@keyframes authRibbon { to { transform: translateX(-50%); } }

@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; min-height: 0; }
  .auth-aside { min-height: 0; }
  .auth-aside__inner { padding: 24px 20px; gap: 18px; }
  .auth-copy h2 { font-size: 1.7rem; }
  .auth-points, .auth-text, .auth-ribbon { display: none; }
  .auth-form .row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-page *, .auth-page *::before, .auth-page *::after { animation: none !important; transition: none !important; }
  .auth-points li { opacity: 1; }
}
