:root {
  color-scheme: light;
  --ink: #17243a;
  --muted: #6b7a92;
  --line: #e4ecf7;
  --panel: #ffffff;
  --soft: #f5f9ff;
  --blue: #3769e8;
  --blue-deep: #2854cf;
  --blue-soft: #eaf2ff;
  --green: #27b879;
  --green-soft: #e8f9f0;
  --amber: #d49319;
  --amber-soft: #fff3d9;
  --shadow: 0 28px 72px rgb(33 80 150 / 13%);
  --shadow-soft: 0 16px 42px rgb(33 80 150 / 10%);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 20% 12%, rgb(214 232 255 / 70%), transparent 28%),
    radial-gradient(circle at 86% 18%, rgb(230 244 255 / 80%), transparent 30%),
    linear-gradient(135deg, #f7fbff 0%, #eef6ff 48%, #f9fcff 100%);
}

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

svg {
  display: block;
}

.auth-page {
  position: relative;
  display: grid;
  grid-template-columns: minmax(360px, 520px) minmax(440px, 680px);
  gap: clamp(32px, 5vw, 76px);
  width: min(1220px, calc(100% - 56px));
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 52px) 0;
  overflow: hidden;
}

.auth-page::before {
  position: absolute;
  inset: auto auto 5% -12%;
  width: 520px;
  height: 520px;
  content: "";
  background: radial-gradient(circle, rgb(90 146 239 / 18%), transparent 62%);
  pointer-events: none;
}

.auth-story {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: calc(100vh - 104px);
  flex-direction: column;
  justify-content: center;
  padding: 24px 0;
}

.back-link {
  position: absolute;
  top: 4px;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: #49617f;
  font-size: 15px;
  font-weight: 750;
  transition: color .18s var(--ease), transform .18s var(--ease);
}

.back-link:hover {
  color: var(--blue);
  transform: translateX(-2px);
}

.auth-copy {
  max-width: 440px;
}

.auth-copy h1 {
  max-width: 430px;
  margin: 0;
  color: #17243a;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.13;
  letter-spacing: 0;
}

.auth-copy p {
  max-width: 400px;
  margin: 34px 0 0;
  color: #627390;
  font-size: 21px;
  line-height: 1.55;
}

.value-list {
  display: grid;
  gap: 28px;
  margin: 58px 0 0;
  padding: 0;
  list-style: none;
}

.value-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.value-icon {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
}

.value-icon svg {
  width: 32px;
  height: 32px;
}

.value-icon.chat {
  color: var(--blue);
  background: #eaf2ff;
}

.value-icon.time {
  color: var(--amber);
  background: #fff1d4;
}

.value-icon.finance {
  color: var(--green);
  background: #def8eb;
}

.value-item strong {
  display: block;
  margin-bottom: 8px;
  color: #17243a;
  font-size: 19px;
  line-height: 1.2;
}

.value-text,
.value-text span {
  display: block;
  color: #657693;
  font-size: 18px;
  line-height: 1.45;
}

.auth-illustration {
  position: relative;
  width: min(520px, 100%);
  min-height: 360px;
  margin-top: 58px;
}

.grid-map {
  position: absolute;
  inset: 18px 0 0;
  border-radius: 34px;
  opacity: .72;
  background:
    linear-gradient(120deg, rgb(114 161 232 / 18%) 1px, transparent 1px),
    linear-gradient(35deg, rgb(114 161 232 / 14%) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 82%, transparent);
}

.puzzle {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 26px;
  box-shadow: 0 24px 44px rgb(58 107 177 / 18%), inset 0 1px 0 rgb(255 255 255 / 80%);
  transform: rotateX(58deg) rotateZ(-34deg);
  transform-style: preserve-3d;
}

.puzzle::after {
  position: absolute;
  inset: 8px;
  border: 1px solid rgb(255 255 255 / 46%);
  border-radius: 20px;
  content: "";
}

.puzzle svg {
  width: 46px;
  height: 46px;
  transform: rotateZ(34deg) rotateX(-58deg);
}

.puzzle.chat {
  top: 54px;
  left: 110px;
  width: 190px;
  height: 144px;
  color: #2f69db;
  background: linear-gradient(145deg, #cfe2ff, #8bb5ff);
}

.puzzle.time {
  top: 150px;
  left: 252px;
  width: 176px;
  height: 132px;
  color: #c88713;
  background: linear-gradient(145deg, #fff3cf, #ffd274);
}

.puzzle.finance {
  top: 210px;
  left: 122px;
  width: 188px;
  height: 134px;
  color: #16a86d;
  background: linear-gradient(145deg, #cef7df, #86dfb6);
}

.mini-card {
  position: absolute;
  display: grid;
  place-items: center;
  width: 104px;
  height: 72px;
  border: 1px solid rgb(200 217 239 / 70%);
  border-radius: 16px;
  background: rgb(255 255 255 / 82%);
  box-shadow: 0 18px 38px rgb(53 91 143 / 10%);
  color: #9ab0ca;
  backdrop-filter: blur(12px);
}

.mini-card.chart {
  left: 4px;
  bottom: 62px;
}

.mini-card.profile {
  right: 16px;
  bottom: 42px;
}

.mini-card.calendar {
  left: 84px;
  bottom: -6px;
  color: #7f95b2;
  font-size: 24px;
  font-weight: 850;
}

.coin {
  position: absolute;
  right: 134px;
  bottom: 48px;
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border-radius: 50%;
  color: #d49319;
  background: linear-gradient(145deg, #fff8dd, #ffd87f);
  box-shadow: var(--shadow-soft);
  font-size: 30px;
  font-weight: 850;
}

.auth-panel-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - 104px);
}

.auth-panel {
  display: grid;
  width: 100%;
  min-height: 760px;
  padding: clamp(36px, 5vw, 72px);
  border: 1px solid rgb(222 233 248 / 84%);
  border-radius: 36px;
  background: rgb(255 255 255 / 86%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px);
}

.auth-panel-inner {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.brand-center {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: #17243a;
  font-size: clamp(38px, 5vw, 56px);
  font-weight: 850;
  letter-spacing: 0;
}

.brand-center svg {
  width: 64px;
  height: 64px;
  color: var(--blue);
}

.auth-panel h2 {
  max-width: 440px;
  margin: 24px auto 0;
  color: #74839b;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.45;
}

.auth-actions {
  display: grid;
  gap: 14px;
  width: min(430px, 100%);
  margin: 58px auto 0;
}

.telegram-auth {
  display: inline-flex;
  min-height: 74px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #4677f1, #2859dc);
  box-shadow: 0 18px 36px rgb(43 91 222 / 28%);
  font-size: 20px;
  font-weight: 850;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}

.telegram-auth:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 44px rgb(43 91 222 / 34%);
}

.telegram-auth svg {
  width: 28px;
  height: 28px;
}

.secure-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #8a99af;
  font-size: 17px;
  font-weight: 700;
}

.secure-note svg {
  width: 18px;
  height: 18px;
}

.auth-flow {
  display: grid;
  gap: 14px;
  width: min(500px, 100%);
  margin: 58px auto 0;
  text-align: left;
}

.flow-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgb(246 250 255 / 78%);
}

.flow-step mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: var(--blue);
  background: var(--blue-soft);
  font-weight: 850;
}

.flow-step strong {
  display: block;
  margin-bottom: 4px;
  color: #17243a;
  font-size: 16px;
}

.flow-step span {
  display: block;
  color: #667792;
  font-size: 15px;
  line-height: 1.4;
}

.panel-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: auto;
  padding-top: 48px;
  color: #667792;
  font-size: 17px;
  font-weight: 700;
}

.panel-footer a {
  color: var(--blue);
}

.copyright {
  margin: 68px 0 0;
  color: #8b9ab0;
  font-size: 16px;
  font-weight: 700;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  .auth-page {
    grid-template-columns: 1fr;
    width: min(720px, calc(100% - 32px));
  }

  .auth-story,
  .auth-panel-wrap {
    min-height: auto;
  }

  .back-link {
    position: static;
    margin-bottom: 34px;
  }

  .auth-copy {
    max-width: none;
  }

  .auth-copy p {
    max-width: 580px;
  }

  .auth-illustration {
    display: none;
  }

  .auth-panel {
    min-height: auto;
    border-radius: 28px;
  }
}

@media (max-width: 620px) {
  .auth-page {
    width: min(100% - 24px, 520px);
    padding: 18px 0 28px;
  }

  .auth-copy h1 {
    font-size: 34px;
  }

  .auth-copy p {
    margin-top: 20px;
    font-size: 17px;
  }

  .value-list {
    gap: 18px;
    margin-top: 34px;
  }

  .value-item {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 14px;
  }

  .value-icon {
    width: 58px;
    height: 58px;
  }

  .value-icon svg {
    width: 26px;
    height: 26px;
  }

  .value-item strong {
    font-size: 16px;
  }

  .value-item span {
    font-size: 15px;
  }

  .auth-panel {
    padding: 30px 18px;
    border-radius: 22px;
  }

  .brand-center {
    gap: 12px;
    font-size: 34px;
  }

  .brand-center svg {
    width: 44px;
    height: 44px;
  }

  .auth-panel h2 {
    font-size: 17px;
  }

  .telegram-auth {
    min-height: 62px;
    font-size: 17px;
  }

  .auth-flow {
    margin-top: 34px;
  }

  .flow-step {
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 14px;
  }

  .flow-step mark {
    width: 34px;
    height: 34px;
  }

  .panel-footer {
    flex-wrap: wrap;
    gap: 10px;
    font-size: 15px;
  }
}
