:root {
  color-scheme: light;
  --bg: #eef8f6;
  --surface: rgba(255, 255, 255, 0.94);
  --text: #173a3f;
  --muted: #688186;
  --border: #d6eae7;
  --accent: #1dbf9b;
  --accent-dark: #177b73;
  --blue: #4b9fdc;
  --danger: #b44b4b;
  --danger-bg: #fff1f1;
  --success: #177b73;
  --success-bg: #e6f7f1;
  --shadow: 0 22px 50px rgba(34, 99, 109, 0.12);
  --radius: 18px;
  --radius-small: 12px;
  font-family: Aptos, "Segoe UI Variable", "Segoe UI", Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(187, 244, 224, 0.88), transparent 24rem),
    radial-gradient(circle at top right, rgba(201, 232, 255, 0.88), transparent 28rem),
    linear-gradient(180deg, #f5fbfa 0%, #edf7f8 100%);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-shell-inner {
  width: min(100%, 540px);
}

.auth-card {
  width: min(100%, 460px);
  padding: 28px;
  border: 1px solid rgba(214, 234, 231, 0.92);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-card-wide {
  width: min(100%, 540px);
}

.auth-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
  padding-bottom: 6px;
}

.auth-legal-links a {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.auth-legal-links a:hover {
  text-decoration: underline;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(29, 191, 155, 0.16), rgba(75, 159, 220, 0.18));
  color: var(--accent-dark);
  font-size: 16px;
  font-weight: 800;
}

.auth-brand p,
.auth-brand small {
  display: block;
  margin: 0;
}

.auth-brand p {
  font-size: 20px;
  font-weight: 800;
}

.auth-brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.auth-copy {
  margin-top: 22px;
}

.auth-copy h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.02;
}

.auth-copy p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.auth-landing-link {
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 800;
}

.auth-landing-link a {
  color: var(--accent-dark);
  text-decoration: none;
}

.auth-landing-link a:hover {
  text-decoration: underline;
}

.auth-message {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: var(--radius-small);
  font-size: 13px;
  font-weight: 700;
}

.auth-message-error {
  color: var(--danger);
  background: var(--danger-bg);
}

.auth-message-success {
  color: var(--success);
  background: var(--success-bg);
}

.auth-message-info {
  color: var(--accent-dark);
  background: #ebfaf3;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.auth-tab {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: #fff;
  color: #42636a;
  font-size: 13px;
  font-weight: 800;
}

.auth-tab.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: #fff;
}

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

.auth-form.is-hidden {
  display: none;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: #42636a;
  font-size: 13px;
  font-weight: 760;
}

.auth-form .auth-checkbox {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.auth-form .auth-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  padding: 0;
}

.auth-form .auth-checkbox span {
  display: block;
}

.auth-form .auth-checkbox a {
  color: var(--accent-dark);
  text-decoration: none;
}

.auth-form .auth-checkbox a:hover {
  text-decoration: underline;
}

.auth-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.auth-form input {
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: #fff;
  color: var(--text);
  outline: none;
}

.auth-form input:focus {
  border-color: #8bdcc9;
  box-shadow: 0 0 0 3px rgba(29, 191, 155, 0.13);
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.password-field input {
  min-width: 0;
}

.secondary-button {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: #fff;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.auth-form .secondary-button,
.auth-inline-form .secondary-button {
  height: auto;
  background: #fff;
  color: var(--accent-dark);
}

.auth-hint,
.generated-password {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.auth-captcha {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.generated-password {
  display: block;
  padding: 10px 12px;
  border: 1px dashed #bddad4;
  border-radius: 10px;
  background: #f7fcfb;
  color: var(--accent-dark);
  font-weight: 700;
  word-break: break-all;
}

.generated-password.is-hidden {
  display: none;
}

.auth-note {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #d8eceb;
  border-radius: var(--radius-small);
  background: #f7fcfb;
}

.auth-note strong {
  font-size: 13px;
}

.auth-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.auth-upgrade-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #cfe1f1;
  border-radius: var(--radius-small);
  background: linear-gradient(180deg, #f3f9ff, #eef8ff);
}

.auth-upgrade-card strong,
.auth-upgrade-card span {
  display: block;
}

.auth-upgrade-card strong {
  font-size: 14px;
}

.auth-upgrade-card span {
  margin-top: 4px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
}

.auth-upgrade-points {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.auth-upgrade-disabled-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.auth-upgrade-actions,
.auth-register-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-register-actions > * {
  flex: 1 1 220px;
}

.auth-upgrade-button,
.secondary-link-button {
  min-height: 48px;
  border: 0;
  border-radius: var(--radius-small);
  background: linear-gradient(135deg, #215f89, #4b9fdc);
  color: #fff;
  font-size: 14px;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
}

.auth-upgrade-button:disabled {
  background: #d7e5ea;
  color: #6c858d;
  cursor: not-allowed;
}

.secondary-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--accent-dark);
}

.auth-upgrade-meta {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid #d8eceb;
  border-radius: var(--radius-small);
  background: #f7fcfb;
  color: #42636a;
  font-size: 12px;
}

.auth-upgrade-shell {
  display: grid;
  gap: 18px;
}

.auth-upgrade-card-page {
  margin-top: 4px;
}

.auth-paypal-box {
  padding: 16px;
  border: 1px solid #d8eceb;
  border-radius: var(--radius-small);
  background: #fff;
}

.auth-inline-form {
  margin-top: 12px;
}

.auth-inline-form.is-hidden {
  display: none;
}

.auth-inline-stack {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d8eceb;
  border-radius: var(--radius-small);
  background: #f7fcfb;
}

.auth-inline-copy {
  display: grid;
  gap: 4px;
}

.auth-inline-copy strong {
  font-size: 13px;
}

.auth-inline-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.auth-inline-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.auth-inline-grid label {
  display: grid;
  gap: 6px;
  color: #42636a;
  font-size: 13px;
  font-weight: 760;
}

.auth-inline-grid input {
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: #fff;
  color: var(--text);
  outline: none;
}

.auth-inline-grid input:focus {
  border-color: #8bdcc9;
  box-shadow: 0 0 0 3px rgba(29, 191, 155, 0.13);
}

.auth-inline-grid .secondary-link-button {
  min-width: 180px;
}

.auth-resend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #d8eceb;
  border-radius: var(--radius-small);
  background: #f7fcfb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.auth-form > button[type="submit"] {
  height: 48px;
  border: 0;
  border-radius: var(--radius-small);
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: #fff;
  font-size: 14px;
  font-weight: 850;
}

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

  .auth-shell-inner {
    width: 100%;
  }

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

  .auth-inline-grid .secondary-link-button {
    width: 100%;
  }

  .auth-register-actions {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .auth-captcha {
    min-height: 74px;
  }

  .auth-captcha .cf-turnstile {
    transform: scale(0.86);
    transform-origin: left top;
  }
}
