/* ============== PAI WALLET — AUTH (Login) ============== */
/* Modeled on the PAI Subtitles auth design, periwinkle brand. */

.auth-page {
  --auth-bg: #0a0a0e;
  --auth-input-bg: #121218;
  --auth-border: #34343f;
  --auth-text-heading: #ededf2;
  --auth-text-body: #c7c7d2;
  --auth-text-muted: #8a8a98;
  --auth-primary: #7d74ea;
  --auth-primary-hover: #6b61e0;
  --auth-on-primary: #f4f2ff;

  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--auth-bg);
  color: var(--auth-text-body);
  font-family: 'Inter', sans-serif;
  position: relative;
  overflow: hidden;
}

/* Cinematic hero backdrop — matches the PAI Wallet landing hero */
.auth-page::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 110vh;
  background:
    linear-gradient(180deg, rgba(10, 10, 14, 0.48) 0%, rgba(10, 10, 14, 0.56) 55%, rgba(10, 10, 14, 0.82) 82%, var(--auth-bg) 100%),
    url("hero-bg.png") center top / cover no-repeat,
    var(--auth-bg);
  pointer-events: none;
  z-index: 0;
}
.auth-page > .auth-brand,
.auth-page > .auth-main { position: relative; z-index: 1; }

/* LEFT — brand panel */
.auth-brand {
  position: relative;
  overflow: hidden;
}
.auth-brand::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* ============== PAI WALLET BRANDED AUTH ASIDE (periwinkle) ============== */
.auth-brand.pai-aside-wallet {
  background:
    radial-gradient(85% 55% at 50% 0%, rgba(125, 116, 234, 0.30), transparent 62%),
    radial-gradient(70% 60% at 50% 100%, rgba(125, 116, 234, 0.14), transparent 70%),
    linear-gradient(180deg, rgba(12, 11, 22, 0.50) 0%, rgba(9, 9, 16, 0.60) 55%, rgba(8, 8, 14, 0.72) 100%);
  padding: 56px 56px;
  font-family: 'Geist', 'Inter', system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  color: #fff;
}
/* Logo pinned top-left; feature block vertically centred for a balanced panel */
.auth-brand.pai-aside-wallet .pai-aside-body {
  margin: auto 0;
  padding: 8px 0;
}
.auth-brand.pai-aside-wallet::after {
  background:
    linear-gradient(rgba(125, 116, 234, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 116, 234, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(80% 70% at 50% 40%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(80% 70% at 50% 40%, #000 30%, transparent 100%);
}

.pai-aside-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 2;
}
.pai-aside-logo { display: inline-flex; text-decoration: none; }
.pai-aside-logo svg { height: 32px; width: auto; display: block; }
.pai-aside-eyebrow {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(200, 193, 255, 0.65);
}

.pai-aside-body {
  position: relative;
  z-index: 2;
  max-width: 520px;
}
.pai-aside-title {
  font-family: 'Geist', system-ui, sans-serif;
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: #fff;
  margin: 0 0 12px;
}
.pai-aside-sub {
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.62);
  margin: 0 0 28px;
}

.pai-aside-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.pai-aside-feat {
  position: relative;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 16px;
  align-items: start;
  padding: 16px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  opacity: 0;
  transform: translateY(8px);
  animation: pai-aside-feat-in 700ms cubic-bezier(0.32, 0.72, 0, 1) forwards;
  animation-delay: var(--d, 0s);
}
.pai-aside-feat:first-child { border-top: 0; padding-top: 8px; }
.pai-aside-feat:last-child { padding-bottom: 8px; }
@keyframes pai-aside-feat-in { to { opacity: 1; transform: translateY(0); } }

.pai-feat-ico {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: rgba(125, 116, 234, 0.13);
  border: 1px solid rgba(125, 116, 234, 0.22);
  color: rgba(210, 205, 255, 0.96);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transition: background 380ms cubic-bezier(0.32, 0.72, 0, 1),
              border-color 380ms cubic-bezier(0.32, 0.72, 0, 1),
              transform 380ms cubic-bezier(0.32, 0.72, 0, 1);
}
.pai-feat-ico svg { width: 22px; height: 22px; }
.pai-aside-feat:hover .pai-feat-ico {
  background: rgba(125, 116, 234, 0.22);
  border-color: rgba(125, 116, 234, 0.42);
  transform: translateY(-1px);
}

.pai-aside-feat > .pai-feat-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.pai-feat-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.pai-aside-feat strong {
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.022em;
  line-height: 1.1;
}
.pai-feat-tag {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(200, 193, 255, 0.78);
  white-space: nowrap;
}
.pai-feat-desc {
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
  letter-spacing: -0.005em;
  max-width: 52ch;
}

@media (max-width: 980px) {
  .auth-brand.pai-aside-wallet { padding: 32px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .pai-aside-feat { opacity: 1 !important; transform: none !important; animation: none !important; }
}

/* RIGHT — form panel */
.auth-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px clamp(36px, 5vw, 104px);
  gap: 32px;
  position: relative;
}

/* Glass card */
.auth-card {
  width: 100%;
  max-width: 400px;
  position: relative;
  background: rgba(16, 15, 26, 0.55);
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 20px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  box-shadow:
    0 30px 80px -40px rgba(125, 116, 234, 0.40),
    0 24px 60px -30px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
  overflow: hidden;
}
/* Periwinkle top highlight */
.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(125, 116, 234, 0) 0%, rgba(125, 116, 234, 0.4) 50%, rgba(125, 116, 234, 0) 100%);
  pointer-events: none;
}

/* Heading */
.auth-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.auth-title {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 31.2px;
  color: var(--auth-text-heading);
  margin: 0;
}
.auth-sub {
  font-size: 14px;
  line-height: 19.6px;
  color: var(--auth-text-body);
  margin: 0;
}
.auth-sub a {
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 500;
}
.auth-sub a:hover { text-decoration: underline; }

/* Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.auth-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--auth-text-body);
  letter-spacing: 0.7px;
  line-height: 14px;
}
.auth-input-wrap {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  padding: 15px 17px;
  display: flex;
  align-items: center;
  transition: border-color 0.15s, background 0.15s;
}
.auth-input-wrap:focus-within {
  border-color: var(--auth-primary);
  background: rgba(255, 255, 255, 0.065);
}
.auth-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--auth-text-heading);
  font-family: inherit;
  font-size: 16px;
  line-height: normal;
  outline: none;
  padding: 0;
  min-width: 0;
}
.auth-input::placeholder { color: var(--auth-text-muted); }
.auth-input-toggle {
  background: transparent;
  border: none;
  color: var(--auth-text-muted);
  cursor: pointer;
  padding: 0 0 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.auth-input-toggle:hover { color: var(--auth-text-heading); }
.auth-input-toggle svg { width: 18px; height: 18px; }

/* Options row (checkbox + forgot link) */
.auth-options-row {
  padding-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.auth-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 19.6px;
  color: var(--auth-text-body);
  cursor: pointer;
}
.auth-checkbox input {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--auth-border);
  background: var(--auth-input-bg);
  cursor: pointer;
  accent-color: var(--auth-primary);
}
.auth-link {
  font-size: 14px;
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.7px;
}
.auth-link:hover { text-decoration: underline; }

/* Submit button */
.auth-submit-wrap { padding-top: 8px; }
.auth-submit {
  width: 100%;
  background: var(--auth-primary);
  color: var(--auth-on-primary);
  border: none;
  border-radius: 10px;
  padding: 13px 24px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.4px;
  line-height: 14px;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.auth-submit:hover { background: var(--auth-primary-hover); }
.auth-submit:active { transform: scale(0.985); }
.auth-submit svg { width: 16px; height: 16px; }

/* Divider "OR CONTINUE WITH" */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--auth-border);
}
.auth-divider span {
  font-size: 12px;
  font-weight: 600;
  color: var(--auth-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  line-height: 12px;
}

/* Social buttons */
.auth-sso {
  display: flex;
  gap: 8px;
}
.auth-sso-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 11px 1px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.7px;
  line-height: 14px;
  color: var(--auth-text-heading);
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
}
.auth-sso-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
}
.auth-sso-btn svg { width: 20px; height: 20px; flex-shrink: 0; }

/* Footer links */
.auth-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding-top: 8px;
}
.auth-foot a {
  font-size: 14px;
  line-height: 19.6px;
  color: var(--auth-text-body);
  text-decoration: none;
  transition: color 0.15s;
}
.auth-foot a:hover { color: var(--auth-text-heading); }
.auth-foot-dot {
  width: 4px;
  height: 4px;
  border-radius: 9999px;
  background: var(--auth-border);
}

/* Mobile (<= 900px) — hide visual panel, allow scroll */
@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; overflow: visible; min-height: 100dvh; }
  .auth-brand { display: none; }
  .auth-main { padding: 64px 32px; }
}
@media (max-width: 480px) {
  .auth-main { padding: 64px 20px; }
  .auth-card { padding: 28px 24px; gap: 24px; }
}
