/* TG Target auth — landing composition (overrides legacy auth glass card) */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Unbounded:wght@500;700;800&display=swap');

body.auth-page.auth-page--landing {
  --ink: #111111;
  --ink-2: #4a5160;
  --bg: #eef1f4;
  --line: rgba(17, 17, 17, 0.08);
  --lime: #d8f26a;
  --font: 'Manrope', system-ui, sans-serif;
  --display: 'Unbounded', 'Manrope', system-ui, sans-serif;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100vh;
  width: 100%;
  max-width: 100% !important;
  /* Kill legacy .auth-page flex centering that collapses the layout */
  display: block !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  background: var(--bg) !important;
  color: var(--ink);
  font-family: var(--font) !important;
  overflow-x: hidden !important;
}

html:has(body.auth-page--landing) {
  overflow-x: hidden;
  max-width: 100%;
}

body.auth-page.auth-page--landing .animated-bg,
body.auth-page.auth-page--landing .blob {
  display: none !important;
}

/* ── Top bar (landing nav) ── */
.auth-top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
  min-height: 76px;
  padding: 0.85rem clamp(1.25rem, 4vw, 2.75rem);
  background: rgba(238, 241, 244, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.auth-top__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-right: auto;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  flex: none;
}

.auth-top__brand .brand-mark {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #111;
  display: inline-block;
  flex: none;
}

.auth-top__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-left: auto;
  flex: none;
}

.auth-top__right .auth-lang-switcher-inline,
.auth-top__right .site-lang {
  margin: 0 !important;
}

.auth-top__link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
}

.auth-top__link:hover {
  color: var(--ink);
}

/* ── Stage: hero + panel ── */
.auth-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 400px);
  gap: clamp(1.75rem, 4vw, 3.25rem);
  align-items: start;
  align-content: start;
  width: min(1180px, calc(100% - 2.75rem));
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 3rem) 0 clamp(2.5rem, 5vw, 4rem);
  box-sizing: border-box;
  min-height: calc(100vh - 76px);
  min-height: calc(100dvh - 76px);
}

.auth-hero {
  padding-top: 0;
  min-width: 0;
}

.auth-hero__brand {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 4.75rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--ink);
  overflow-wrap: normal;
  word-break: keep-all;
  white-space: nowrap;
}

.auth-hero__tag {
  max-width: 28ch;
  margin: clamp(1.1rem, 2.5vw, 1.75rem) 0 0;
  font-size: clamp(1.02rem, 1.6vw, 1.28rem);
  line-height: 1.4;
  font-weight: 500;
  color: var(--ink-2);
}

.auth-hero__phrase {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  margin-top: 1.6rem;
  min-height: 2.2rem;
}

.auth-hero__bar {
  width: 1.5px;
  height: 1.35rem;
  background: var(--ink);
  flex: none;
}

.auth-hero__phrase-text {
  font-size: clamp(0.98rem, 1.4vw, 1.15rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.auth-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.25rem;
}

.auth-hero__chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: transparent;
}

.auth-hero__chip--lime {
  background: var(--lime);
  border-color: transparent;
}

/* ── Form panel ── */
.auth-panel {
  background: #fff;
  border-radius: 36px;
  padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: none;
  border: 1px solid var(--line);
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.auth-panel__inner {
  max-width: 100%;
  margin: 0;
  min-width: 0;
}

body.auth-page.auth-page--landing .auth-container,
body.auth-page.auth-page--landing .auth-card,
body.auth-page.auth-page--landing .glass-card {
  all: unset;
  display: block;
}

body.auth-page.auth-page--landing .auth-logo {
  display: none !important;
}

body.auth-page.auth-page--landing .auth-lang-switcher-inline {
  margin: 0 !important;
  justify-content: flex-end;
}

body.auth-page.auth-page--landing .auth-header {
  margin: 0 0 1.25rem;
  text-align: left;
}

body.auth-page.auth-page--landing .auth-title {
  margin: 0;
  font-family: var(--display) !important;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem) !important;
  font-weight: 700 !important;
  letter-spacing: -0.04em !important;
  line-height: 1.2 !important;
  color: var(--ink) !important;
  text-transform: none !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

body.auth-page.auth-page--landing .auth-subtitle {
  margin: 0.55rem 0 0;
  font-size: 0.98rem !important;
  line-height: 1.45;
  font-weight: 500;
  color: var(--ink-2) !important;
}

/* Tabs → landing chips */
body.auth-page.auth-page--landing .auth-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.25rem;
  padding: 0;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
}

body.auth-page.auth-page--landing .auth-tab {
  min-height: 2.35rem;
  padding: 0.4rem 0.95rem !important;
  border-radius: 999px !important;
  border: 1px solid var(--line) !important;
  background: transparent !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}

body.auth-page.auth-page--landing .auth-tab.active,
body.auth-page.auth-page--landing .auth-tab:hover {
  background: var(--ink) !important;
  border-color: var(--ink) !important;
  color: #fff !important;
}

/* Forms */
body.auth-page.auth-page--landing .auth-form {
  display: none;
  gap: 0.9rem;
}

body.auth-page.auth-page--landing .auth-form.active {
  display: grid;
}

body.auth-page.auth-page--landing .form-group {
  margin: 0 !important;
  display: grid;
  gap: 0.35rem;
}

body.auth-page.auth-page--landing .form-group label {
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  color: var(--ink-2) !important;
}

body.auth-page.auth-page--landing .input-wrapper {
  position: relative;
}

body.auth-page.auth-page--landing .input-icon {
  display: none !important;
}

body.auth-page.auth-page--landing .form-input,
body.auth-page.auth-page--landing .form-input.with-icon {
  width: 100%;
  min-height: 3.05rem;
  padding: 0.75rem 1rem !important;
  padding-left: 1rem !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  background: var(--bg) !important;
  color: var(--ink) !important;
  font-size: 0.98rem !important;
  font-weight: 500;
  box-shadow: none !important;
  transition: border-color 0.15s ease, background 0.15s ease;
}

body.auth-page.auth-page--landing .form-input:focus {
  outline: none;
  border-color: rgba(17, 17, 17, 0.35) !important;
  background: #fff !important;
}

body.auth-page.auth-page--landing .password-field .form-input {
  padding-right: 2.85rem !important;
}

body.auth-page.auth-page--landing .password-toggle {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  background: transparent;
  border: none;
  cursor: pointer;
}

body.auth-page.auth-page--landing .password-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
}

body.auth-page.auth-page--landing .field-hint {
  font-size: 0.78rem;
  color: var(--ink-2);
}

body.auth-page.auth-page--landing .auth-submit.btn,
body.auth-page.auth-page--landing .auth-submit {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 3.15rem !important;
  margin-top: 0.35rem;
  padding: 0.9rem 1.55rem !important;
  border-radius: 999px !important;
  border: 1.5px solid #111 !important;
  background: #111 !important;
  color: #fff !important;
  font-size: 0.98rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  box-shadow: none !important;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

body.auth-page.auth-page--landing .auth-submit:hover {
  background: #000 !important;
  transform: translateY(-1px);
}

body.auth-page.auth-page--landing .auth-submit svg {
  display: none;
}

/* Messages */
body.auth-page.auth-page--landing .auth-error,
body.auth-page.auth-page--landing .auth-success,
body.auth-page.auth-page--landing #inviteBanner {
  border-radius: 14px !important;
  padding: 0.75rem 0.9rem !important;
  font-size: 0.9rem !important;
  font-weight: 500;
  margin-bottom: 0.85rem !important;
}

body.auth-page.auth-page--landing .auth-error {
  background: rgba(180, 35, 24, 0.08) !important;
  color: #8f1f16 !important;
  border: 1px solid rgba(180, 35, 24, 0.18) !important;
}

body.auth-page.auth-page--landing .auth-success {
  background: rgba(216, 242, 106, 0.35) !important;
  color: #111 !important;
  border: 1px solid rgba(17, 17, 17, 0.08) !important;
}

/* Terms */
body.auth-page.auth-page--landing .checkbox-label {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--ink-2);
  font-weight: 500;
}

body.auth-page.auth-page--landing .checkbox-label a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.auth-page.auth-page--landing .checkbox-error {
  font-size: 0.8rem;
  color: #8f1f16;
}

/* Verification */
body.auth-page.auth-page--landing .verification-icon {
  display: none;
}

body.auth-page.auth-page--landing .verification-text {
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--ink-2);
  margin: 0 0 0.5rem;
}

body.auth-page.auth-page--landing .verification-code-inputs {
  display: flex;
  gap: 0.45rem;
  justify-content: space-between;
}

body.auth-page.auth-page--landing .code-input {
  width: 2.65rem;
  height: 3rem;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
}

body.auth-page.auth-page--landing .resend-code-section {
  text-align: center;
  margin-top: 0.35rem;
}

body.auth-page.auth-page--landing .resend-text {
  font-size: 0.86rem;
  color: var(--ink-2);
  margin: 0 0 0.25rem;
}

body.auth-page.auth-page--landing .btn-link {
  background: none;
  border: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  justify-content: center;
}

body.auth-page.auth-page--landing .back-to-register {
  margin-top: 0.75rem;
  width: 100%;
}

/* Footer */
body.auth-page.auth-page--landing .auth-footer {
  margin-top: 1.5rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
  text-align: left;
}

body.auth-page.auth-page--landing .auth-footer p {
  font-size: 0.86rem;
  color: var(--ink-2);
  margin: 0 0 0.55rem;
  font-weight: 500;
}

body.auth-page.auth-page--landing .auth-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 600;
}

body.auth-page.auth-page--landing .auth-footer-links a {
  color: var(--ink);
  text-decoration: none;
}

body.auth-page.auth-page--landing .auth-footer-links a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.auth-page.auth-page--landing .footer-divider {
  color: var(--ink-2);
  opacity: 0.5;
}

/* Atmosphere: soft lime wash behind hero */
.auth-atmosphere {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 55% 40% at 12% 18%, rgba(216, 242, 106, 0.28), transparent 70%),
    radial-gradient(ellipse 40% 35% at 88% 82%, rgba(17, 17, 17, 0.04), transparent 65%),
    var(--bg);
}

@media (max-width: 920px) {
  .auth-top {
    gap: 0.5rem;
    min-height: 64px;
    padding: 0.7rem 1rem;
  }

  .auth-top__brand {
    font-size: 0.95rem;
    min-width: 0;
  }

  .auth-top__right {
    gap: 0.45rem;
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-end;
  }

  .auth-top__right .site-lang-name {
    display: none;
  }

  .auth-stage {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 0.5rem 1rem 2.5rem;
    align-content: start;
    min-height: auto;
    gap: 1.25rem;
  }

  .auth-hero__brand {
    display: none;
  }

  .auth-hero__tag {
    margin-top: 0.35rem;
    max-width: none;
    font-size: 1rem;
  }

  .auth-hero__phrase {
    margin-top: 1rem;
  }

  .auth-hero__meta {
    display: none;
  }

  .auth-panel {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .auth-top__link {
    font-size: 0.85rem;
  }

  .auth-panel {
    border-radius: 28px;
    padding: 1.15rem 0.95rem 1.25rem;
  }

  body.auth-page.auth-page--landing .auth-tabs {
    gap: 0.35rem;
  }

  body.auth-page.auth-page--landing .auth-tab {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.4rem 0.65rem !important;
    font-size: 0.82rem !important;
  }

  body.auth-page.auth-page--landing .code-input {
    width: 2.35rem;
    height: 2.7rem;
  }
}
