html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(31, 73, 118, 0.24), transparent 38%),
    linear-gradient(180deg, #0e1622 0%, #111b27 100%);
  color: #eef5fb;
  font-family: Georgia, "Times New Roman", serif;
}

body.auth-screen {
  min-height: 100vh;
}

.auth-shell {
  min-height: 100vh;
  padding: 36px 44px;
  box-sizing: border-box;
}

.auth-header {
  width: 100%;
  margin: 0 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.auth-brand {
  display: inline-block;
  color: #79bf6d;
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(65, 102, 136, 0.42);
  color: #d8e8f4;
  text-decoration: none;
  background: rgba(17, 28, 41, 0.72);
}

.auth-main {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(320px, 520px);
  justify-content: center;
  gap: 24px;
  align-items: stretch;
}

.auth-main-single {
  grid-template-columns: minmax(320px, 520px);
}

.auth-hero,
.auth-card {
  border-radius: 26px;
  border: 1px solid rgba(83, 113, 145, 0.26);
  background: linear-gradient(180deg, rgba(15, 23, 36, 0.96) 0%, rgba(12, 18, 28, 0.98) 100%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

.auth-hero {
  padding: 28px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 520px;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(76, 136, 205, 0.25);
  background: rgba(43, 95, 155, 0.18);
  color: #8dc7ff;
  font-size: 13px;
  font-weight: 700;
}

.auth-illustration {
  position: relative;
  width: min(100%, 320px);
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-illustration-grid {
  position: absolute;
  inset: 8% 6%;
  border-radius: 24px;
  background:
    linear-gradient(rgba(141, 199, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(141, 199, 255, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.8;
}

.auth-illustration-card {
  position: absolute;
  border-radius: 22px;
  border: 1px solid rgba(83, 113, 145, 0.28);
  background: linear-gradient(180deg, rgba(16, 24, 36, 0.92) 0%, rgba(12, 18, 28, 0.96) 100%);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
}

.auth-illustration-card-main {
  left: 7%;
  top: 18%;
  width: 68%;
  min-height: 250px;
  padding: 18px;
}

.auth-illustration-card-side {
  right: 5%;
  bottom: 16%;
  width: 38%;
  min-height: 190px;
  padding: 16px;
}

.auth-illustration-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.auth-illustration-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #25c06d;
  box-shadow: 0 0 0 6px rgba(37, 192, 109, 0.12);
}

.auth-illustration-line {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(141, 199, 255, 0.24);
  width: 100%;
}

.auth-illustration-line-short {
  width: 40%;
}

.auth-illustration-line-medium {
  width: 64%;
}

.auth-illustration-panel {
  border-radius: 16px;
  border: 1px solid rgba(80, 120, 160, 0.2);
  background: rgba(19, 31, 46, 0.72);
}

.auth-illustration-panel-large {
  height: 94px;
  margin-bottom: 14px;
}

.auth-illustration-panel-small {
  height: 64px;
  margin-bottom: 14px;
}

.auth-illustration-row {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 12px;
}

.auth-illustration-widget {
  min-height: 76px;
  border-radius: 14px;
  border: 1px solid rgba(76, 136, 205, 0.18);
  background: rgba(14, 22, 32, 0.78);
}

.auth-illustration-widget-accent {
  background:
    radial-gradient(circle at top right, rgba(37, 192, 109, 0.18), transparent 42%),
    rgba(14, 22, 32, 0.78);
}

.auth-illustration-stack {
  display: grid;
  gap: 10px;
}

.auth-title {
  margin: 20px 0 14px;
  font-size: 42px;
  line-height: 1.08;
  color: #f5fbff;
  letter-spacing: -0.03em;
}

.auth-copy {
  margin: 0;
  color: #b7c8d8;
  font-size: 16px;
  line-height: 1.6;
}

.auth-highlights {
  margin-top: 20px;
  display: grid;
  gap: 14px;
}

.auth-highlight {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(63, 90, 116, 0.32);
  background: rgba(11, 18, 27, 0.48);
}

.auth-highlight strong {
  display: block;
  margin-bottom: 8px;
  color: #eef6fd;
}

.auth-highlight span {
  color: #91a6ba;
  font-size: 14px;
  line-height: 1.55;
}

.auth-card {
  padding: 32px 30px 28px;
}

.auth-card-title {
  width: min(100%, 420px);
  margin: 0 auto 10px;
  color: #f6fbff;
  font-size: 28px;
  line-height: 1.08;
}

.auth-card-copy {
  width: min(100%, 420px);
  margin: 0 auto 24px;
  color: #afc2d3;
  font-size: 15px;
  line-height: 1.6;
}

.auth-provider-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
  justify-items: center;
  width: min(100%, 420px);
  margin-left: auto;
  margin-right: auto;
}

.auth-social-block {
  width: 100%;
}

.auth-provider-slot {
  width: 100%;
  display: flex;
  justify-content: center;
  overflow: visible;
}

.auth-google-button {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 440px;
  min-height: 50px;
  margin: 0 auto;
  overflow: visible;
}

.auth-google-button > div,
.auth-google-button iframe {
  max-width: 100%;
}

.auth-google-button > div,
.auth-google-button iframe,
.auth-google-button iframe html,
.auth-google-button [role="button"] {
  width: 100% !important;
  max-width: 100% !important;
}

.auth-provider {
  width: min(100%, 440px);
  min-height: 50px;
  border-radius: 14px;
  border: 1px solid #314559;
  background: #121b25;
  color: #edf4fb;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-sizing: border-box;
}

.auth-provider:hover {
  filter: brightness(1.04);
}

.auth-provider.apple {
  background: #0b0f14;
  border-color: #2a3642;
}

.auth-provider-manual {
  margin: 2px auto 8px;
  background: linear-gradient(180deg, rgba(25, 40, 58, 0.92) 0%, rgba(17, 28, 41, 0.96) 100%);
  border-color: #36516d;
  color: #e8f2fb;
  width: min(100%, 440px);
  min-height: 42px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.auth-manual-close-wrap {
  width: min(100%, 420px);
  margin: 0 auto 10px;
  display: flex;
  justify-content: flex-end;
}

.auth-manual-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(76, 136, 205, 0.25);
  background: rgba(17, 28, 41, 0.72);
  color: #c8d9e7;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.auth-provider-manual:hover {
  border-color: #4c6f90;
}

.auth-provider.disabled {
  opacity: 0.7;
  cursor: default;
}

.provider-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-divider {
  position: relative;
  margin: 18px 0 22px;
  text-align: center;
  width: min(100%, 420px);
  margin-left: auto;
  margin-right: auto;
}

.auth-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid rgba(126, 151, 167, 0.22);
}

.auth-divider span {
  position: relative;
  padding: 0 10px;
  background: #111b27;
  color: #8ea3b6;
  font-size: 13px;
}

.auth-form {
  display: grid;
  gap: 16px;
  width: min(100%, 420px);
  margin: 0 auto;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field-inline {
  gap: 10px;
}

.auth-field label {
  color: #ebf2f8;
  font-size: 15px;
  font-weight: 700;
}

.auth-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: #9ab0c3;
}

.auth-checkbox input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  border: 1px solid #314458;
  border-radius: 4px;
  background: #0d141d;
  box-shadow: none;
  appearance: auto;
  flex: 0 0 18px;
}

.auth-field input {
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid #314458;
  background: #0d141d;
  color: #f3f8fc;
  padding: 0 14px;
  box-sizing: border-box;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

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

.auth-field input:focus {
  outline: none;
  border-color: #2e8f63;
  box-shadow: 0 0 0 3px rgba(46, 143, 99, 0.16);
  background: #0f1822;
}

.auth-input-wrap {
  position: relative;
}

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

.auth-validation-icon {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.auth-feedback {
  min-height: 18px;
  font-size: 13px;
  color: #8ea3b6;
}

.success-border {
  border-color: #25c06d !important;
}

.error-border {
  border-color: #f15c6d !important;
}

.success-text {
  color: #25c06d !important;
}

.error-text {
  color: #f15c6d !important;
}

.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #1b8f5f 0%, #156f4a 100%);
  color: #f5fff9;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}

.auth-submit:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.auth-message {
  margin-top: 14px;
  width: min(100%, 420px);
  margin-left: auto;
  margin-right: auto;
}

.auth-message .error,
.auth-message .success {
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
}

.auth-message .error {
  background: rgba(126, 31, 45, 0.18);
  border: 1px solid rgba(190, 62, 81, 0.28);
  color: #ffc1cb;
}

.auth-message .success {
  background: rgba(21, 111, 74, 0.18);
  border: 1px solid rgba(35, 167, 111, 0.28);
  color: #b8ffd8;
}

.auth-meta {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: #9cb1c2;
  font-size: 14px;
  width: min(100%, 420px);
  margin-left: auto;
  margin-right: auto;
}

.auth-meta a {
  color: #8dc7ff;
  text-decoration: none;
}

.is-hidden {
  display: none;
}

.spinner {
  animation: spin 1s linear infinite;
}

.spinner .path {
  stroke: #8dc7ff;
  stroke-linecap: round;
}

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

@media (max-width: 960px) {
  .auth-shell {
    padding: 24px;
  }

  .auth-main {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .auth-title {
    font-size: 42px;
  }
}
