:root {
  --access-text: var(--sb-text-primary, #111827);
  --access-muted: var(--sb-text-secondary, #4b5563);
  --access-line: var(--sb-border-soft, #dbe5f2);
  --access-blue: var(--sb-blue, #1572e8);
  --access-blue-dark: #073fb8;
  --access-green: var(--sb-green, #31ce36);
}

.access-page {
  position: relative;
  min-height: calc(100vh - 88px);
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 0%, rgba(21, 114, 232, 0.10) 0%, rgba(21, 114, 232, 0.04) 24%, rgba(255, 255, 255, 0) 42%),
    radial-gradient(circle at 86% 0%, rgba(49, 206, 54, 0.08) 0%, rgba(49, 206, 54, 0.025) 24%, rgba(255, 255, 255, 0) 40%),
    #ffffff;
  padding: 92px 0 110px;
}

.access-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(17, 24, 39, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.045) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.28) 48%, rgba(0, 0, 0, 0) 88%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.28) 48%, rgba(0, 0, 0, 0) 88%);
  pointer-events: none;
}

.access-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 560px);
  gap: 56px;
  align-items: center;
  width: min(1520px, calc(100% - 224px));
  margin: 0 auto;
  padding: 0 15px;
}

.access-copy {
  max-width: 760px;
}

.access-copy h1 {
  max-width: 760px;
  margin: 0 0 24px;
  color: var(--access-text);
  font-size: 56px;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0;
}

.access-copy p {
  max-width: 660px;
  margin: 0;
  color: var(--access-muted);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.68;
}

.access-card {
  width: 100%;
  border: 1px solid var(--access-line);
  border-radius: 22px;
  background: #ffffff;
  padding: 36px 34px 42px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.access-card h2,
.access-card-title h2 {
  margin: 0 0 10px;
  color: var(--access-text);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
}

.access-card > p,
.access-card-title p {
  margin: 0 0 26px;
  color: var(--access-muted);
  font-size: 16px;
  line-height: 1.6;
}

.access-label {
  display: block;
  margin: 0 0 10px;
  color: var(--access-text);
  font-size: 15px;
  font-weight: 700;
}

.access-input,
.access-code {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--access-line);
  border-radius: 999px;
  color: var(--access-text);
  background: #ffffff;
  font-size: 17px;
  line-height: 1.3;
  padding: 14px 20px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.access-input:focus,
.access-code:focus,
.otp-digit:focus {
  border-color: var(--access-blue);
  box-shadow: 0 0 0 4px rgba(21, 114, 232, 0.14);
}

.access-button,
.access-provider {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.15;
  text-decoration: none;
  cursor: pointer;
  transition: background-position 0.34s ease, border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.access-button {
  margin-top: 22px;
  border: 0;
  color: #ffffff;
  background-image: linear-gradient(90deg, var(--access-blue-dark) 0 50%, var(--access-blue) 50% 100%);
  background-size: 200% 100%;
  background-position: 100% 0;
}

.access-button:hover,
.access-button:focus {
  color: #ffffff;
  background-position: 0 0;
}

.access-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0 18px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 700;
}

.access-divider::before,
.access-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #e5e7eb;
}

.access-provider {
  gap: 12px;
  border: 1px solid var(--access-line);
  color: var(--access-text);
  background: #ffffff;
}

.access-provider:hover,
.access-provider:focus {
  border-color: #b6c7dc;
  color: var(--access-blue);
  background: #f8fbff;
}

.access-google {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.access-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid #e5e7eb;
}

.access-actions a,
.access-actions button,
.resend {
  border: 0;
  padding: 0;
  color: var(--access-blue);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
}

.access-note-wrap {
  padding-top: 24px;
}

.access-note {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.access-connected {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  margin: 8px 0 20px;
  padding: 10px 14px;
  border: 1px solid var(--access-line);
  border-radius: 999px;
  background: #f8fbff;
}

.access-connected img {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 999px;
  object-fit: cover;
}

.access-connected-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 999px;
  color: #159447;
  background: #e9f9ef;
  font-size: 15px;
}

.access-connected strong {
  min-width: 0;
  color: var(--access-text);
  font-size: 15px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.access-provider-secondary {
  margin-top: 14px;
}

.start-alert {
  margin: 0 0 22px;
  padding: 12px 14px;
  border: 1px solid #dbe6f4;
  border-radius: 12px;
  color: #344054;
  background: #ffffff;
  font-size: 13px;
  line-height: 1.45;
}

.start-alert.is-error {
  color: #8a1f11;
  background: #fff4f2;
  border-color: #ffd2ca;
}

.start-alert.is-ok {
  color: #136c2d;
  background: #f0fff4;
  border-color: #c8f2d0;
}

.otp-form {
  display: grid;
  gap: 20px;
}

.otp-grid {
  display: grid;
  grid-template-columns: repeat(6, 56px);
  justify-content: center;
  gap: 10px;
  margin: 10px 0 4px;
}

.otp-digit {
  width: 100%;
  height: 64px;
  border: 1px solid var(--access-line);
  border-radius: 16px;
  background: #ffffff;
  color: var(--access-text);
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  outline: none;
}

.resend {
  display: inline-flex;
  margin: 0;
}

.resend.is-disabled,
.resend:disabled {
  color: #7d8da1;
  cursor: not-allowed;
}

.otp-email {
  display: inline-flex;
  max-width: 100%;
  margin: 2px 0 26px;
  padding: 10px 14px;
  border: 1px solid var(--access-line);
  border-radius: 999px;
  color: var(--access-text);
  background: #f8fbff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.access-card .otp-help {
  max-width: 440px;
  margin: 10px auto 0;
  color: #6b7280;
  font-size: 12px !important;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
}

.otp-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 12px;
  margin-top: 16px;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
}

.otp-actions form {
  display: inline-flex;
  margin: 0;
}

.otp-actions a,
.otp-actions .resend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 152px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--access-blue);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}

.otp-actions a:hover,
.otp-actions a:focus,
.otp-actions .resend:hover,
.otp-actions .resend:focus {
  background: #f3f7ff;
}

.otp-actions .resend.is-disabled,
.otp-actions .resend:disabled {
  color: #8a97aa;
  background: transparent;
  cursor: not-allowed;
}

#resend-timer {
  display: inline-block;
  min-width: 2ch;
  margin-left: 2px;
  text-align: right;
}

.password-form {
  display: grid;
  gap: 16px;
}

.password-help {
  margin: 0;
  color: #6b7280;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.install-box {
  display: grid;
  gap: 20px;
}

.install-loader {
  width: 58px;
  height: 58px;
  border: 5px solid #dbe6f4;
  border-top-color: var(--access-blue);
  border-radius: 999px;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1199px) {
  .access-shell {
    width: min(100%, calc(100% - 120px));
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .access-copy {
    max-width: 920px;
    text-align: center;
    margin: 0 auto;
  }

  .access-copy h1,
  .access-copy p {
    margin-left: auto;
    margin-right: auto;
  }

  .access-card {
    max-width: 620px;
    margin: 0 auto;
  }
}

@media (max-width: 767px) {
  .access-page {
    min-height: calc(100svh - 170px);
    display: grid;
    align-items: center;
    padding: 24px 0 40px;
  }

  .access-shell {
    width: calc(100% - 56px);
    align-items: center;
  }

  .access-copy {
    display: none;
  }

  .access-card {
    padding: 30px 24px 28px;
  }
}

@media (max-width: 575px) {
  .access-shell {
    width: calc(100% - 24px);
  }

  .access-card {
    border-radius: 18px;
    padding: 28px 18px 24px;
  }

  .access-card h2,
  .access-card-title h2 {
    font-size: 28px;
  }

  .otp-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 7px;
  }

  .otp-digit {
    height: 54px;
    border-radius: 14px;
    font-size: 22px;
  }
}
