/* ============================================
   AUTH — editorial shell (Benefiteo)
   Inspired by zbr.design rhythm: big type,
   atmosphere, numbered cues — Benefiteo blues.
   ============================================ */

body.is-auth {
  min-height: 100dvh;
  background:
    radial-gradient(70% 55% at 100% 0%, rgba(36, 72, 198, 0.08), transparent 55%),
    radial-gradient(55% 45% at 0% 100%, rgba(3, 27, 78, 0.06), transparent 50%),
    linear-gradient(165deg, #f4f7ff 0%, #eef2fb 45%, #f7f9fd 100%);
}
body.is-auth main {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body.is-auth .shop-flash {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  width: min(520px, calc(100% - 2rem));
}

.apage {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}
.apage-grid {
  flex: 1;
  display: grid;
  gap: 0;
  min-height: 100dvh;
}
@media (min-width: 980px) {
  .apage-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  }
}

/* ——— Stage (brand plane) ——— */
.apage-aside {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(90% 70% at 12% 18%, rgba(120, 158, 255, 0.35), transparent 55%),
    radial-gradient(70% 60% at 88% 88%, rgba(9, 30, 90, 0.55), transparent 50%),
    linear-gradient(152deg, #021433 0%, #0c2a72 42%, #2448c6 100%);
  padding: 1.35rem 1.25rem 1.75rem;
  display: flex;
  flex-direction: column;
}
@media (min-width: 980px) {
  .apage-aside {
    padding: 1.75rem 2.75rem 2.25rem;
    min-height: 100dvh;
  }
}

.apage-aside-glow {
  position: absolute;
  inset: -20% -10% auto auto;
  width: min(70vw, 640px);
  height: min(70vw, 640px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 68%);
  pointer-events: none;
  animation: apage-glow 9s ease-in-out infinite alternate;
}
.apage-aside-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 85%);
  pointer-events: none;
  opacity: 0.7;
}
@keyframes apage-glow {
  from { transform: translate(0, 0) scale(1); opacity: 0.85; }
  to { transform: translate(-6%, 8%) scale(1.08); opacity: 1; }
}

.apage-aside-inner {
  position: relative;
  z-index: 1;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  flex: 1;
}
@media (min-width: 980px) {
  .apage-aside-inner {
    margin: 0;
    max-width: 520px;
    justify-content: center;
    gap: 1.35rem;
    padding-block: 1rem;
  }
}

.apage-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.apage-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  width: fit-content;
  transition: color 0.2s ease, transform 0.2s ease;
}
.apage-back:hover {
  color: #fff;
  transform: translateX(-2px);
}
.apage-back .shop-icon { width: 16px; height: 16px; }

.apage-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}
.apage-brand img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: transparent;
  object-fit: contain;
  padding: 0;
  box-shadow: none;
  display: block;
}
.apage-brand span {
  color: #fff;
}
.apage-brand em {
  font-style: normal;
  color: #9db0ff;
}

.apage-eyebrow {
  margin: 0.5rem 0 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.apage-aside-title {
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 5.4vw, 4.15rem);
  line-height: 0.98;
  margin: 0;
  letter-spacing: -0.045em;
  max-width: 10ch;
}
.apage-aside-title em {
  font-style: normal;
  color: #c5d2ff;
}

.apage-aside-lead {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.86);
  max-width: 34ch;
}

.apage-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.42rem 0.9rem;
  width: fit-content;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.8rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}
.apage-kicker .shop-icon { width: 16px; height: 16px; }

.apage-steps {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.apage-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
}
.apage-step-n {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.apage-steps strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.12rem;
}
.apage-steps span {
  display: block;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.4;
}

.apage-rail {
  margin-top: 0.5rem;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.apage-rail-track {
  display: flex;
  gap: 0.65rem;
  width: max-content;
  animation: apage-marquee 28s linear infinite;
}
.apage-rail:hover .apage-rail-track { animation-play-state: paused; }
@keyframes apage-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.apage-mini {
  display: grid;
  place-items: center;
  width: 96px;
  height: 48px;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  flex-shrink: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  opacity: 0.92;
}
.apage-mini:hover {
  opacity: 1;
  transform: translateY(-2px);
}
.apage-mini img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0;
  border-radius: 8px;
}

.apage-trust {
  list-style: none;
  margin: auto 0 0;
  padding: 1.1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.apage-trust li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
}
.apage-trust .shop-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.9;
}

@media (max-width: 979px) {
  .apage-steps { display: none; }
  .apage-trust { display: none; }
  .apage-aside-lead { max-width: none; font-size: 0.98rem; }
  .apage-aside-title { max-width: none; }
}

/* ——— Form column ——— */
.apage-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.35rem 1.15rem 2rem;
  gap: 1.15rem;
  position: relative;
}
@media (min-width: 980px) {
  .apage-main {
    padding: 2rem 2.5rem;
  }
}

.apage-card {
  width: 100%;
  max-width: min(460px, 100%);
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px) saturate(1.15);
  border-radius: 28px;
  border: 1px solid rgba(3, 27, 78, 0.08);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 24px 60px rgba(3, 27, 78, 0.08);
  padding: 1.7rem 1.2rem 1.8rem;
  box-sizing: border-box;
  overflow-x: hidden;
  animation: apage-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@media (min-width: 640px) {
  .apage-card { padding: 2.2rem 2.05rem 2.3rem; }
}
@keyframes apage-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.apage-card-top { margin-bottom: 1.4rem; }
.apage-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  background: var(--blue-mist);
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.apage-badge .shop-icon { width: 15px; height: 15px; }
.apage-card-top h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  margin: 0 0 0.4rem;
  color: var(--ink);
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.apage-card-top p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.apage-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.apage-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  width: 100%;
  min-width: 0;
}
.apage-row > .apage-field {
  min-width: 0;
  max-width: 100%;
}
@media (min-width: 640px) {
  .apage-row { grid-template-columns: 1fr 1fr; }
}

.apage-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  max-width: 100%;
}
.apage-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.apage-control {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  height: 54px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0 0.95rem;
  border: 1.5px solid rgba(3, 27, 78, 0.1);
  border-radius: 16px;
  background: #f7f9fd;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.apage-control:focus-within {
  background: #fff;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(36, 72, 198, 0.14);
  transform: translateY(-1px);
}
.apage-control .shop-icon {
  width: 20px;
  height: 20px;
  color: var(--blue);
  flex-shrink: 0;
  opacity: 0.85;
}
.apage-control input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  height: 100%;
}
.apage-control input::placeholder { color: #9aa3b8; }

.apage-eye {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-right: -0.35rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.apage-eye:hover { color: var(--blue); background: var(--blue-mist); }
.apage-eye .shop-icon { width: 18px; height: 18px; color: inherit; opacity: 1; }

.apage-meter {
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin-top: 0.15rem;
}
.apage-meter span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--blue);
  transition: width 0.25s ease, background 0.25s ease;
}
.apage-meter[data-level="1"] span { width: 33%; background: #fc2a00; }
.apage-meter[data-level="2"] span { width: 66%; background: #e8a400; }
.apage-meter[data-level="3"] span { width: 100%; background: #1a9f5c; }

.apage-hint {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.apage-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
  line-height: 1.4;
  cursor: pointer;
  margin-top: 0.15rem;
}
.apage-check input {
  margin-top: 0.15rem;
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
  flex-shrink: 0;
}

.apage-submit {
  margin-top: 0.4rem;
  min-height: 54px;
  border-radius: 16px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.apage-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(36, 72, 198, 0.28);
}

.apage-perk {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-top: 1.25rem;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue-mist), #f4f7ff);
  border: 1px solid rgba(36, 72, 198, 0.12);
}
.apage-perk .shop-icon {
  width: 28px;
  height: 28px;
  color: var(--blue);
  flex-shrink: 0;
}
.apage-perk strong {
  display: block;
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 0.15rem;
}
.apage-perk span {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.apage-switch {
  margin: 1.35rem 0 0;
  text-align: center;
  font-size: 0.92rem;
  color: var(--muted);
}
.apage-switch a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}
.apage-switch a:hover { text-decoration: underline; }

.apage-mobile-benefits {
  max-width: 460px;
  margin: 0 auto;
  width: 100%;
  padding: 0.15rem 0.15rem 0.5rem;
}
@media (min-width: 980px) {
  .apage-mobile-benefits { display: none; }
}
.apage-mobile-benefits h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.85rem;
  color: var(--ink);
}
.apage-feat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}
@media (min-width: 640px) {
  .apage-feat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 639px) {
  .apage-card {
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  .apage-form,
  .apage-row,
  .apage-field,
  .apage-control {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .apage-check span { overflow-wrap: anywhere; }
}
.apage-feat {
  background: #fff;
  border: 1px solid rgba(3, 27, 78, 0.07);
  border-radius: 16px;
  padding: 0.95rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  box-shadow: var(--shadow);
}
.apage-feat .shop-icon {
  width: 22px;
  height: 22px;
  color: var(--blue);
  margin-bottom: 0.25rem;
}
.apage-feat strong {
  font-size: 0.88rem;
  color: var(--ink);
}
.apage-feat span {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.apage-form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-top: 0.15rem;
}
.apage-check-inline {
  margin: 0;
  font-size: 0.88rem;
}
.apage-link {
  color: var(--blue);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
}
.apage-link:hover { text-decoration: underline; }
.apage-hint.is-error { color: #fc2a00; }

/* Reveal helpers */
.apage-reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: apage-rise 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.apage-reveal-d1 { animation-delay: 0.08s; }
.apage-reveal-d2 { animation-delay: 0.16s; }
.apage-reveal-d3 { animation-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .apage-aside-glow,
  .apage-rail-track,
  .apage-card,
  .apage-reveal {
    animation: none !important;
  }
  .apage-reveal { opacity: 1; transform: none; }
}

/* Modal auth extras (shop overlay) */
.auth-modal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin: 0.25rem 0 0.85rem;
  font-size: 0.85rem;
}
.auth-modal-meta a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}
.auth-modal-meta a:hover { text-decoration: underline; }
.af-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  cursor: pointer;
  margin: 0.15rem 0 0.75rem;
}
.af-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}
