:root {
  color-scheme: light;
  --navy-950: #061321;
  --navy-900: #0b1d33;
  --navy-800: #132b49;
  --gold-500: #c79a3a;
  --gold-300: #e5c77f;
  --ivory: #f7f6f2;
  --white: #ffffff;
  --charcoal: #2b2d31;
  --muted: #68717c;
  --line: rgba(11, 29, 51, 0.12);
  --danger: #9b3434;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--charcoal);
  background: var(--ivory);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
}

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

a:focus-visible {
  outline: 3px solid var(--gold-300);
  outline-offset: 4px;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(360px, 0.88fr) minmax(520px, 1.12fr);
  min-height: 100vh;
}

.auth-context {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(34px, 5vw, 68px);
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 15% 68%, rgba(199, 154, 58, 0.12), transparent 31%),
    linear-gradient(145deg, var(--navy-950), var(--navy-800));
}

.auth-context::before {
  position: absolute;
  top: 20%;
  right: -44%;
  width: 92%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  content: '';
}

.auth-context::after {
  position: absolute;
  right: 9%;
  bottom: -21%;
  width: 58%;
  aspect-ratio: 1;
  border: 1px solid rgba(199, 154, 58, 0.14);
  border-radius: 50%;
  content: '';
}

.brand,
.auth-context__copy,
.back-link {
  position: relative;
  z-index: 2;
}

.brand {
  display: inline-flex;
  width: fit-content;
  min-height: 56px;
  align-items: center;
  gap: 13px;
}

.brand__mark {
  display: grid;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
}

.brand__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand__wordmark {
  display: grid;
  gap: 1px;
  line-height: 1.1;
}

.brand__wordmark strong {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.brand__wordmark small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.auth-context__copy {
  max-width: 560px;
  margin-block: auto;
  padding-block: 64px;
}

.eyebrow {
  margin: 0 0 17px;
  color: var(--gold-500);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.17em;
  line-height: 1.4;
  text-transform: uppercase;
}

.auth-context h1,
.auth-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.auth-context h1 {
  max-width: 610px;
  font-size: clamp(46px, 5vw, 70px);
  line-height: 1.02;
}

.auth-context__copy > p:last-child {
  max-width: 500px;
  margin: 26px 0 0;
  color: rgba(255, 255, 255, 0.64);
  font-size: 17px;
  line-height: 1.7;
}

.back-link {
  display: inline-flex;
  width: fit-content;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  font-weight: 700;
  transition: color 160ms ease;
}

.back-link:hover {
  color: var(--white);
}

.auth-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(28px, 6vw, 88px);
  background:
    radial-gradient(circle at 78% 18%, rgba(199, 154, 58, 0.09), transparent 28%),
    var(--ivory);
}

.auth-card {
  width: min(100%, 520px);
  padding: clamp(30px, 4vw, 48px);
  border: 1px solid rgba(11, 29, 51, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 28px 75px rgba(6, 19, 33, 0.12);
}

.auth-card__heading {
  margin-bottom: 30px;
}

.auth-card h2 {
  color: var(--navy-900);
  font-size: clamp(36px, 4.4vw, 50px);
  line-height: 1.06;
}

.notice {
  display: grid;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(155, 52, 52, 0.24);
  border-radius: 12px;
  color: var(--danger);
  background: rgba(155, 52, 52, 0.055);
  gap: 3px;
}

.notice strong {
  font-size: 13px;
}

.notice span {
  font-size: 12px;
  line-height: 1.45;
}

.provider-card {
  padding: 20px;
  border: 1px solid rgba(11, 29, 51, 0.12);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 12px 34px rgba(11, 29, 51, 0.055);
}

.provider-card--disabled {
  background: #f5f4f0;
}

.provider-card__header {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
}

.provider-card__icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 13px;
  color: var(--white);
  background: #229ed9;
  box-shadow: 0 10px 22px rgba(34, 158, 217, 0.2);
}

.provider-card__icon svg {
  width: 25px;
  height: 25px;
  fill: currentcolor;
}

.provider-card__name {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.provider-card__name strong {
  color: var(--navy-900);
  font-size: 15px;
}

.provider-card__state {
  padding: 5px 8px;
  border-radius: 999px;
  color: #287150;
  background: #e8f3ed;
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.telegram-widget {
  display: grid;
  min-height: 58px;
  margin-top: 20px;
  place-items: center;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.telegram-widget iframe {
  max-width: 100%;
}

.provider-card__unavailable {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.auth-card__support {
  margin: 19px 0 0;
  color: #899098;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-context {
    min-height: 330px;
    padding: 28px 32px 32px;
  }

  .auth-context__copy {
    margin: 34px 0 24px;
    padding: 0;
  }

  .auth-context h1 {
    max-width: 680px;
    font-size: clamp(42px, 8vw, 58px);
  }

  .auth-context__copy > p:last-child {
    margin-top: 18px;
  }

  .auth-panel {
    min-height: auto;
    padding: 50px 24px 72px;
  }
}

@media (max-width: 560px) {
  .auth-context {
    min-height: 292px;
    padding: 20px 20px 24px;
  }

  .brand {
    min-height: 46px;
    gap: 10px;
  }

  .brand__mark {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    border-radius: 13px;
  }

  .brand__wordmark strong {
    font-size: 20px;
  }

  .brand__wordmark small {
    font-size: 8px;
    letter-spacing: 0.09em;
  }

  .auth-context__copy {
    margin: 25px 0 15px;
  }

  .auth-context .eyebrow {
    margin-bottom: 10px;
  }

  .auth-context h1 {
    max-width: 390px;
    font-size: clamp(34px, 10.5vw, 44px);
  }

  .auth-context__copy > p:last-child {
    display: none;
  }

  .back-link {
    min-height: 36px;
    font-size: 12px;
  }

  .auth-panel {
    align-items: start;
    padding: 26px 14px 48px;
  }

  .auth-card {
    padding: 26px 20px;
    border-radius: 18px;
  }

  .auth-card h2 {
    font-size: clamp(34px, 10vw, 42px);
  }

  .auth-card__heading {
    margin-bottom: 24px;
  }

  .provider-card {
    padding: 16px;
  }

  .provider-card__header {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 11px;
  }

  .provider-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .provider-card__state {
    display: none;
  }

  .telegram-widget {
    margin-top: 16px;
    padding-top: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
