/* Auth M16 — Stack Desain 1 (ASCII atas, form horizontal) — production + theme-guide */

.auth-page--m16-stack {
  --am16-form-scale: 0.85;
  min-height: 100dvh;
}

.am16-stack-root {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

.am16-stack-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, var(--surface-accent-strong), transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 100%, var(--surface-accent), transparent 50%),
    linear-gradient(180deg, transparent 0%, rgba(5, 5, 8, 0.45) 100%);
}

.am16-stack-guide-bar {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1rem;
  padding: 0.65rem 1.15rem;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
}

.am16-stack-guide-bar a {
  color: var(--accent-2);
  text-decoration: none;
}

.am16-stack-guide-bar__tabs {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 100px;
  overflow: hidden;
  background: var(--surface);
}

.am16-stack-guide-bar__tabs a {
  padding: 0.35rem 0.85rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
}

.am16-stack-guide-bar__tabs a.is-active {
  background: var(--surface-accent-strong);
  color: var(--text);
}

.am16-stack {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  width: 100%;
  max-width: 68.75rem;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding:
    max(0.75rem, env(safe-area-inset-top, 0px))
    max(1.5rem, env(safe-area-inset-right, 0px))
    max(1rem, env(safe-area-inset-bottom, 0px))
    max(1.5rem, env(safe-area-inset-left, 0px));
}

.am16-stack-root .am16-stack {
  min-height: calc(100dvh - 48px);
}

.am16-stack__inner {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2rem, 5vh, 3.25rem);
}

.am16-stack__art {
  width: 100%;
  max-width: 100%;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  container-type: inline-size;
  container-name: hero-ascii;
}

/* Skala ASCII = sama dengan landing (.hero--ascii-compact + .hero-ascii__block) */
.am16-stack__art-frame {
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.am16-stack__art-block.hero-ascii__block {
  width: 100%;
  align-items: center;
  max-width: 100%;
  font-size: clamp(0.2975rem, calc(100cqi / 61.2), 1.632rem);
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--glow) 50%, transparent));
}

.am16-stack__art-pre.hero-ascii__art {
  line-height: 1.08;
  letter-spacing: 0;
  text-align: left;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
}

.am16-stack__caption {
  margin-top: clamp(0.4rem, 1vh, 0.65rem);
  text-align: center;
  max-width: 36ch;
}

.am16-stack__caption p {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.am16-stack__form-zone {
  width: 100%;
  max-width: 42rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: calc(0.55rem * var(--am16-form-scale, 0.85));
  font-size: calc(1rem * var(--am16-form-scale, 0.85));
}

.am16-form-h {
  display: flex;
  flex-direction: column;
  gap: calc(0.55rem * var(--am16-form-scale, 0.85));
}

.am16-form-h__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: calc(0.55rem * var(--am16-form-scale, 0.85)) calc(0.85rem * var(--am16-form-scale, 0.85));
}

@media (max-width: 620px) {
  .am16-form-h__row {
    grid-template-columns: 1fr;
  }
}

.am16-form-h label {
  display: block;
  margin-bottom: 0;
}

.am16-form-h label span {
  display: block;
  font-size: 0.75em;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.28em;
}

.am16-form-h input {
  width: 100%;
  padding: 0.62em 0.85em;
  border-radius: calc(10px * var(--am16-form-scale, 0.85));
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88em;
}

.am16-form-h input:focus {
  outline: none;
  border-color: var(--accent);
}

.am16-stack__form-zone .alert {
  margin-bottom: 0;
  padding: 0.55em 0.75em;
  font-size: 0.82em;
}

.am16-stack__form-zone .btn-full {
  width: 100%;
  margin-top: 0.05em;
  padding: 0.65em 1em;
  font-size: 0.95em;
}

.am16-stack__form-zone .auth-footer {
  margin-top: 0;
  text-align: center;
  font-size: 0.82em;
}

.am16-stack__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  align-self: center;
  padding: 0.45em 0.85em;
  border-radius: calc(10px * var(--am16-form-scale, 0.85));
  border: 1px solid var(--border);
  background: rgba(10, 10, 15, 0.82);
  backdrop-filter: blur(12px);
  color: var(--text);
  font-size: 0.8em;
  font-weight: 500;
  text-decoration: none;
}

.am16-stack__back svg {
  width: calc(18px * var(--am16-form-scale, 0.85));
  height: calc(18px * var(--am16-form-scale, 0.85));
}

.am16-stack__back:hover {
  border-color: var(--border-accent-strong);
  background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 768px) {
  .am16-stack__art-block.hero-ascii__block {
    font-size: clamp(0.255rem, calc(100cqi / 61.2), 1.36rem);
  }
}

.auth-turnstile {
  margin: 0.85rem 0 0.35rem;
  min-height: 65px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-turnstile .cf-turnstile {
  transform-origin: center top;
}
