:root {
  --auth-bg: #070b14;
  --auth-bg-soft: #0c1321;
  --auth-card: rgba(14, 23, 39, 0.94);
  --auth-card-solid: #0e1727;
  --auth-text: #f5f8ff;
  --auth-muted: #93a0b8;
  --auth-line: rgba(255, 255, 255, 0.1);
  --auth-line-strong: rgba(255, 255, 255, 0.16);
  --auth-blue: #56d7ff;
  --auth-blue-deep: #3a7cff;
  --auth-violet: #8169ff;
  --auth-green: #5ce3a1;
  --auth-red: #ff768f;
  --auth-radius-xl: 32px;
  --auth-radius-lg: 21px;
  --auth-radius-md: 15px;
  --auth-shadow: 0 34px 100px rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--auth-bg);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  color: var(--auth-text);
  background:
    radial-gradient(circle at 15% 10%, rgba(86, 215, 255, 0.1), transparent 28rem),
    radial-gradient(circle at 88% 88%, rgba(129, 105, 255, 0.12), transparent 30rem),
    linear-gradient(150deg, #070b14 0%, #09111d 52%, #060a12 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.auth-page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  padding: 34px;
}

.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.65) 60%, transparent 100%);
}

.auth-glow {
  position: fixed;
  z-index: -2;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  opacity: 0.16;
}

.auth-glow-one {
  top: -18rem;
  right: -8rem;
  background: var(--auth-blue);
}

.auth-glow-two {
  bottom: -22rem;
  left: -11rem;
  background: var(--auth-violet);
}

.auth-shell {
  width: min(1180px, 100%);
  min-height: calc(100vh - 68px);
  min-height: calc(100svh - 68px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 500px);
  align-items: center;
  gap: clamp(42px, 7vw, 100px);
}

.auth-story {
  min-width: 0;
  padding: 28px 0;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
}

.auth-brand-mark {
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(86, 215, 255, 0.35);
  border-radius: 17px;
  color: #ffffff;
  background: linear-gradient(145deg, #72e4ff, #6fa1ff 55%, #9c80ff);
  box-shadow: 0 14px 40px rgba(65, 160, 255, 0.24);
}

.auth-brand-mark svg {
  width: 29px;
  height: 29px;
}

.auth-brand strong,
.auth-brand small {
  display: block;
}

.auth-brand strong {
  font-size: 18px;
  letter-spacing: -0.02em;
}

.auth-brand small {
  margin-top: 2px;
  color: var(--auth-muted);
  font-size: 12px;
}

.auth-brand-mobile {
  display: none;
}

.auth-story-copy {
  max-width: 680px;
  margin-top: clamp(70px, 11vh, 130px);
}

.auth-kicker,
.auth-card-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 0 11px;
  border: 1px solid rgba(86, 215, 255, 0.2);
  border-radius: 999px;
  color: #aeeeff;
  background: rgba(86, 215, 255, 0.07);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-story h1 {
  margin: 24px 0 18px;
  max-width: 680px;
  font-size: clamp(46px, 5vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.auth-story-copy > p {
  max-width: 610px;
  margin: 0;
  color: #a6b2c7;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.65;
}

.auth-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 54px;
}

.auth-points > div {
  min-width: 0;
  min-height: 154px;
  padding: 20px;
  border: 1px solid var(--auth-line);
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.025);
}

.auth-points span,
.auth-points b,
.auth-points small {
  display: block;
}

.auth-points span {
  color: var(--auth-blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.auth-points b {
  margin-top: 28px;
  font-size: 15px;
}

.auth-points small {
  margin-top: 8px;
  color: var(--auth-muted);
  font-size: 12px;
  line-height: 1.5;
}

.auth-card-wrap {
  width: 100%;
  min-width: 0;
}

.auth-card {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border: 1px solid var(--auth-line-strong);
  border-radius: var(--auth-radius-xl);
  background: linear-gradient(180deg, rgba(18, 30, 50, 0.96), rgba(10, 18, 31, 0.98));
  box-shadow: var(--auth-shadow);
}

@supports (backdrop-filter: blur(16px)) {
  .auth-card {
    background: rgba(13, 22, 37, 0.86);
    backdrop-filter: blur(18px);
  }
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(125, 226, 255, 0.7), transparent);
}

.auth-card-head h2 {
  margin: 15px 0 8px;
  font-size: 32px;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.auth-card-head p {
  margin: 0;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.5;
}

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  padding: 13px 14px;
  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius-md);
  font-size: 13px;
  line-height: 1.45;
}

.auth-alert > span {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.auth-alert-error {
  border-color: rgba(255, 118, 143, 0.27);
  color: #ffd4dc;
  background: rgba(255, 118, 143, 0.09);
}

.auth-alert-error > span {
  color: #2b0710;
  background: var(--auth-red);
}

.auth-alert-success {
  border-color: rgba(92, 227, 161, 0.27);
  color: #d4ffea;
  background: rgba(92, 227, 161, 0.08);
}

.auth-alert-success > span {
  color: #04150d;
  background: var(--auth-green);
}

.auth-alert-muted {
  color: var(--auth-muted);
  background: rgba(255, 255, 255, 0.025);
}

.auth-alert-muted > span {
  color: var(--auth-text);
  background: rgba(255, 255, 255, 0.12);
}

.auth-telegram-block {
  margin-top: 20px;
}

.auth-telegram-button {
  min-height: 62px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 15px 10px 11px;
  border: 1px solid rgba(77, 190, 255, 0.45);
  border-radius: 18px;
  color: #06101b;
  background: linear-gradient(135deg, #6ddcff 0%, #5db8ff 48%, #8990ff 100%);
  box-shadow: 0 16px 42px rgba(72, 167, 255, 0.2);
  transition: transform 160ms ease, filter 160ms ease;
}

.auth-telegram-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.auth-telegram-button:active {
  transform: translateY(0);
}

.auth-telegram-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: rgba(4, 26, 44, 0.2);
}

.auth-telegram-icon svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.auth-telegram-button strong,
.auth-telegram-button small {
  display: block;
}

.auth-telegram-button strong {
  font-size: 14px;
}

.auth-telegram-button small {
  margin-top: 2px;
  color: rgba(6, 16, 27, 0.64);
  font-size: 11px;
}

.auth-button-arrow {
  font-size: 21px;
  font-weight: 700;
}

.auth-telegram-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 10px;
  padding: 13px 14px;
  border: 1px solid var(--auth-line);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.16);
}

.auth-telegram-code > div {
  min-width: 0;
}

.auth-telegram-code span,
.auth-telegram-code strong,
.auth-telegram-code small {
  display: block;
}

.auth-telegram-code span {
  color: var(--auth-muted);
  font-size: 10px;
  line-height: 1.3;
}

.auth-telegram-code strong {
  margin-top: 4px;
  font-size: 20px;
  letter-spacing: 0.18em;
}

.auth-telegram-code small {
  margin-top: 3px;
  color: #b8c4d8;
  font-size: 11px;
}

.auth-copy-button,
.auth-password-toggle {
  border: 0;
  color: #cbd5e6;
  background: transparent;
  cursor: pointer;
}

.auth-copy-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--auth-line);
  border-radius: 11px;
  font-size: 11px;
  font-weight: 800;
}

.auth-copy-button:hover,
.auth-password-toggle:hover {
  color: #fff;
}

.auth-telegram-status {
  min-height: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--auth-muted);
  font-size: 11px;
}

.auth-telegram-status small {
  margin-left: auto;
  color: #75839b;
}

.auth-status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--auth-green);
  box-shadow: 0 0 0 5px rgba(92, 227, 161, 0.08);
}

.auth-telegram-status.is-error .auth-status-dot {
  background: var(--auth-red);
  box-shadow: 0 0 0 5px rgba(255, 118, 143, 0.08);
}

.auth-divider {
  position: relative;
  height: 20px;
  display: grid;
  place-items: center;
  margin: 16px 0 12px;
}

.auth-divider::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 1px;
  background: var(--auth-line);
}

.auth-divider span {
  position: relative;
  z-index: 1;
  padding: 0 10px;
  color: #6f7c92;
  background: var(--auth-card-solid);
  font-size: 10px;
  text-transform: uppercase;
}

@supports (backdrop-filter: blur(16px)) {
  .auth-divider span {
    background: #0d1625;
  }
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--auth-line);
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.17);
}

.auth-tabs a {
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--auth-muted);
  font-size: 12px;
  font-weight: 800;
  transition: color 160ms ease, background 160ms ease;
}

.auth-tabs a[aria-selected="true"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.auth-form-panel {
  padding-top: 17px;
}

.auth-field {
  display: block;
  margin-top: 13px;
}

.auth-field:first-child {
  margin-top: 0;
}

.auth-field > span:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  color: #d8dfec;
  font-size: 12px;
  font-weight: 750;
}

.auth-field > span small {
  color: #728096;
  font-size: 10px;
  font-weight: 600;
}

.auth-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--auth-line);
  border-radius: 14px;
  outline: none;
  color: #fff;
  background: rgba(3, 8, 15, 0.34);
  font-size: 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-field input::placeholder {
  color: #657187;
}

.auth-field input:focus {
  border-color: rgba(86, 215, 255, 0.55);
  background: rgba(3, 8, 15, 0.5);
  box-shadow: 0 0 0 4px rgba(86, 215, 255, 0.08);
}

.auth-password-wrap {
  position: relative;
  display: block;
}

.auth-password-wrap input {
  padding-right: 82px;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  min-height: 32px;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 800;
}

.auth-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auth-fields-grid .auth-field {
  margin-top: 0;
}

.auth-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  margin-top: 15px;
  color: var(--auth-muted);
  font-size: 11px;
  line-height: 1.45;
  cursor: pointer;
}

.auth-check input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--auth-blue-deep);
}

.auth-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 17px;
  border: 0;
  border-radius: 15px;
  color: #07111d;
  background: linear-gradient(135deg, #6ee5ff, #64a9ff 52%, #917eff);
  box-shadow: 0 16px 40px rgba(74, 159, 255, 0.18);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, opacity 160ms ease;
}

.auth-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.auth-form-note {
  margin: 12px 0 0;
  color: #748197;
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

.auth-home-link {
  width: fit-content;
  display: block;
  margin: 18px auto 0;
  color: #7f8ca2;
  font-size: 12px;
  transition: color 160ms ease;
}

.auth-home-link:hover {
  color: #fff;
}

@media (max-width: 1020px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr) minmax(400px, 470px);
    gap: 40px;
  }

  .auth-points {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  .auth-points > div {
    min-height: 0;
  }

  .auth-points b {
    margin-top: 15px;
  }
}

@media (max-width: 820px) {
  .auth-page {
    padding: 24px 16px;
  }

  .auth-shell {
    width: min(500px, 100%);
    min-height: calc(100svh - 48px);
    display: block;
  }

  .auth-story {
    display: none;
  }

  .auth-brand-mobile {
    display: inline-flex;
    margin: 0 0 18px 4px;
  }

  .auth-card {
    padding: 25px;
  }
}

@media (max-width: 520px) {
  .auth-page {
    padding: max(14px, env(safe-area-inset-top)) 10px max(18px, env(safe-area-inset-bottom));
  }

  .auth-shell {
    min-height: auto;
  }

  .auth-brand-mobile {
    margin: 3px 0 14px 5px;
  }

  .auth-brand-mark {
    width: 43px;
    height: 43px;
    border-radius: 14px;
  }

  .auth-brand-mark svg {
    width: 25px;
    height: 25px;
  }

  .auth-brand strong {
    font-size: 16px;
  }

  .auth-card {
    padding: 20px 16px;
    border-radius: 25px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.42);
    backdrop-filter: none;
    background: #0d1727;
  }

  .auth-card-head h2 {
    font-size: 27px;
  }

  .auth-telegram-code {
    align-items: flex-end;
  }

  .auth-copy-button {
    padding: 0 9px;
  }

  .auth-fields-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .auth-telegram-status {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .auth-telegram-status small {
    width: 100%;
    margin-left: 15px;
  }
}

@media (max-width: 360px) {
  .auth-card {
    padding-inline: 13px;
  }

  .auth-telegram-button {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 9px;
    padding-right: 11px;
  }

  .auth-telegram-icon {
    width: 36px;
    height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.auth-submit-link {
  display: grid;
  place-items: center;
  text-align: center;
}


/* NEWLIFE_AUTH_V2_1_RECOVERY */
.auth-brand-mark > svg,
.auth-brand-mark > img,
.auth-brand-mark > picture,
.auth-brand-mark > span {
  max-width: 100%;
  max-height: 100%;
}

.auth-brand-mark > img,
.auth-brand-mark picture img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.auth-forgot-link {
  margin-left: auto;
  color: #86dcff;
  font-size: 10px;
  font-weight: 800;
  transition: color 160ms ease;
}

.auth-forgot-link:hover {
  color: #fff;
}

.auth-recovery-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.auth-secondary-link {
  min-height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--auth-line);
  border-radius: 14px;
  color: #c9d3e2;
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  font-weight: 800;
}

.auth-secondary-link:hover {
  color: #fff;
  border-color: rgba(86, 215, 255, 0.32);
}
