:root {
  --paper-ink: #17202a;
  --paper-muted: #738195;
  --paper-line: #e2e9ed;
  --paper-green: #31d17d;
  --paper-green-dark: #0bbf70;
  --paper-soft: #f4f7f8;
  --paper-shadow: 0 28px 90px rgba(25, 42, 61, 0.11);
}

body.paper-auth-page {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--paper-ink);
  background:
    linear-gradient(rgba(221, 231, 236, 0.46) 1px, transparent 1px),
    linear-gradient(90deg, rgba(221, 231, 236, 0.46) 1px, transparent 1px),
    radial-gradient(circle at 18% 22%, rgba(49, 209, 125, 0.12), transparent 28%),
    radial-gradient(circle at 88% 74%, rgba(49, 209, 125, 0.08), transparent 30%),
    #fff;
  background-size: 72px 72px, 72px 72px, 100% 760px, 100% 760px, auto;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

body.paper-auth-page a {
  color: inherit;
}

.paper-auth-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 72px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.paper-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #111922;
  text-decoration: none;
  font-weight: 900;
}

.paper-brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 2px solid var(--paper-ink);
  border-radius: 9px;
  color: var(--paper-green-dark);
  transform: rotate(-7deg);
}

.paper-auth-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
  color: #26313d;
  font-size: 14px;
  font-weight: 750;
}

.paper-auth-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 76px 24px 110px;
}

.paper-auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.74fr);
  gap: 72px;
  align-items: center;
}

.paper-kicker {
  color: #a8b2be;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 1000;
}

.paper-auth-copy h1 {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--paper-ink);
  font-size: clamp(48px, 5vw, 76px);
  line-height: 0.98;
  letter-spacing: 0;
}

.paper-auth-copy > p {
  max-width: 660px;
  margin: 28px 0 0;
  color: var(--paper-muted);
  font-size: 18px;
  line-height: 1.68;
}

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

.paper-auth-benefits article {
  min-height: 122px;
  padding: 18px;
  border: 1px solid var(--paper-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 35px rgba(25, 42, 61, 0.07);
}

.paper-auth-benefits strong {
  display: block;
  color: #1d2630;
  margin-bottom: 10px;
  font-size: 17px;
}

.paper-auth-benefits span {
  color: var(--paper-muted);
  font-size: 14px;
  line-height: 1.5;
}

.paper-auth-preview {
  position: relative;
  display: grid;
  gap: 12px;
  max-width: 640px;
  margin-top: 30px;
  padding: 22px;
  border: 1px solid #dce8ee;
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 10%, rgba(49, 209, 125, 0.14), transparent 30%),
    rgba(255, 255, 255, 0.9);
  box-shadow: var(--paper-shadow);
}

.paper-auth-preview div {
  padding: 18px;
  border: 1px solid var(--paper-line);
  border-radius: 16px;
  background: #fff;
}

.paper-auth-preview span {
  color: #8b99a9;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.paper-auth-preview p {
  margin: 8px 0 0;
  color: #4d5d70;
  line-height: 1.55;
}

.paper-auth-preview i {
  position: absolute;
  right: 26px;
  top: 50%;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--paper-ink);
  color: var(--paper-green);
  font-style: normal;
  font-weight: 1000;
  transform: translateY(-50%);
  box-shadow: 0 14px 30px rgba(17, 26, 37, 0.22);
}

.paper-auth-card {
  width: 100%;
  border: 1px solid #dce8ee;
  border-radius: 26px;
  padding: 28px;
  background:
    radial-gradient(circle at 90% 0%, rgba(49, 209, 125, 0.12), transparent 28%),
    rgba(255, 255, 255, 0.94);
  box-shadow: var(--paper-shadow);
}

.paper-back-link {
  display: inline-block;
  margin-bottom: 24px;
  color: #8b99a9;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.paper-auth-card h2 {
  margin: 14px 0 0;
  color: var(--paper-ink);
  font-size: 42px;
  line-height: 1;
  letter-spacing: 0;
}

.paper-card-subtitle {
  margin: 14px 0 24px;
  color: var(--paper-muted);
  line-height: 1.55;
}

.paper-auth-card .auth-tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 14px;
  padding: 5px;
  border: 1px solid var(--paper-line);
  border-radius: 14px;
  background: #f7fafb;
}

.paper-auth-card .auth-tab {
  flex: 1;
  min-height: 42px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #728295;
  cursor: pointer;
  font-weight: 900;
}

.paper-auth-card .auth-tab.active {
  background: #111a25;
  color: #fff;
  box-shadow: 0 10px 24px rgba(17, 26, 37, 0.12);
}

.paper-auth-card .yandex-login-button {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  border: 1px solid var(--paper-line);
  border-radius: 14px;
  background: #fff;
  color: #17202a;
  text-decoration: none;
  font-weight: 900;
}

.paper-auth-card .yandex-login-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fc3f1d;
  color: #fff;
  font-weight: 1000;
}

.paper-auth-card .auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: #9aa7b3;
  font-size: 12px;
  font-weight: 900;
}

.paper-auth-card .auth-divider::before,
.paper-auth-card .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--paper-line);
}

.paper-auth-card .auth-form {
  display: grid;
  gap: 12px;
}

.paper-auth-card .input {
  width: 100%;
  min-height: 52px;
  border: 2px solid #bfd1dc;
  border-radius: 13px;
  padding: 0 16px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, rgba(191, 209, 220, 0.92), rgba(226, 235, 240, 0.82)) border-box;
  color: var(--paper-ink) !important;
  -webkit-text-fill-color: var(--paper-ink) !important;
  outline: none;
  font: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 10px 26px rgba(25, 42, 61, 0.045);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.paper-auth-card .input:focus {
  border-color: var(--paper-green-dark);
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, var(--paper-green-dark), rgba(49, 209, 125, 0.55)) border-box;
  box-shadow:
    0 0 0 4px rgba(11, 191, 112, 0.13),
    0 14px 32px rgba(25, 42, 61, 0.08);
}

.paper-auth-card .input::placeholder {
  color: #98a6b5 !important;
  -webkit-text-fill-color: #98a6b5 !important;
}

body.paper-auth-page .paper-auth-card input.input,
body.paper-auth-page .paper-auth-card input.input:-webkit-autofill {
  color: var(--paper-ink) !important;
  -webkit-text-fill-color: var(--paper-ink) !important;
  caret-color: var(--paper-ink) !important;
  background-color: #fff !important;
}

.paper-auth-card .consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #708094;
  font-size: 12px;
  line-height: 1.5;
}

.paper-auth-card .consent-row input[type="checkbox"] {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 2px;
  accent-color: var(--paper-green-dark);
}

.paper-auth-card .consent-row a {
  color: var(--paper-green-dark);
  text-decoration: none;
  border-bottom: 1px dashed rgba(11, 191, 112, 0.4);
}

.paper-auth-card .captcha-box {
  border: 1px dashed #cbd8df;
  border-radius: 14px;
  padding: 14px;
  color: #8b99a9;
  text-align: center;
  font-size: 12px;
}

.paper-auth-card .primary-button {
  width: 100%;
  min-height: 52px;
  border: none;
  border-radius: 13px;
  background: var(--paper-ink);
  color: #fff;
  cursor: pointer;
  font-weight: 1000;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.paper-auth-card .primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.paper-auth-card .primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.paper-auth-card .auth-referral-note,
.paper-auth-card .auth-promo-note {
  display: grid;
  gap: 5px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(11, 191, 112, 0.22);
  border-radius: 15px;
  background: #eefbf4;
}

.paper-auth-card .auth-referral-note strong,
.paper-auth-card .auth-promo-note strong {
  color: var(--paper-green-dark);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.paper-auth-card .auth-referral-note span,
.paper-auth-card .auth-promo-note span {
  color: #4d5d70;
  font-size: 13px;
  line-height: 1.45;
}

.paper-auth-card .status-line {
  min-height: 18px;
  margin: 14px 0 0;
  color: #647388;
  font-size: 13px;
  line-height: 1.45;
}

body.paper-auth-page .hidden {
  display: none !important;
}

body.paper-auth-page .cookie-consent {
  left: 50%;
  right: auto;
  bottom: 18px;
  width: min(900px, calc(100% - 32px));
  max-height: min(72vh, 460px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid #c9d9e3;
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 12%, rgba(49, 209, 125, 0.14), transparent 32%),
    rgba(255, 255, 255, 0.96);
  color: var(--paper-ink);
  box-shadow: 0 24px 70px rgba(25, 42, 61, 0.16);
  backdrop-filter: blur(22px);
  transform: translate(-50%, 18px) scale(0.98);
}

body.paper-auth-page .cookie-consent.visible {
  transform: translate(-50%, 0) scale(1);
}

body.paper-auth-page .cookie-copy strong {
  color: var(--paper-ink);
}

body.paper-auth-page .cookie-copy p {
  color: #62748a;
}

body.paper-auth-page .cookie-actions .primary-button {
  background: var(--paper-green);
  color: #101820;
}

body.paper-auth-page .cookie-actions .ghost-button {
  border: 1px solid #c9d9e3;
  background: rgba(255, 255, 255, 0.7);
  color: #52647a;
}

@media (max-width: 980px) {
  .paper-auth-layout {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .paper-auth-copy {
    text-align: center;
  }

  .paper-auth-copy > p,
  .paper-auth-preview {
    margin-right: auto;
    margin-left: auto;
  }

  .paper-auth-benefits {
    grid-template-columns: 1fr;
  }

  .paper-auth-card {
    max-width: 480px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .paper-auth-nav {
    display: none;
  }

  .paper-auth-header {
    min-height: 66px;
    padding: 0 18px;
  }

  .paper-auth-shell {
    padding: 52px 18px 80px;
  }

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

  .paper-auth-copy > p {
    font-size: 16px;
  }

  .paper-auth-preview {
    display: none;
  }

  .paper-auth-card {
    padding: 22px;
    border-radius: 22px;
  }

  .paper-auth-card h2 {
    font-size: 36px;
  }

  body.paper-auth-page .cookie-consent {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-width: none;
    grid-template-columns: 1fr;
    overflow-y: auto;
    transform: translateY(18px) scale(0.98);
  }

  body.paper-auth-page .cookie-consent.visible {
    transform: translateY(0) scale(1);
  }

  body.paper-auth-page .cookie-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  body.paper-auth-page .cookie-actions .primary-button,
  body.paper-auth-page .cookie-actions .ghost-button {
    width: 100%;
    justify-content: center;
  }
}
