.auth-shell {
  max-width: 480px;
  margin: 18px auto;
  padding: 16px;
}

body.auth-page {
  padding-bottom: 0 !important;
}

body.auth-page main#site-main.container {
  padding-bottom: 12px !important;
}

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

.auth-title {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.96);
}

.auth-copy {
  margin: 0;
  color: rgba(100, 116, 139, 0.96);
  font-size: 13px;
  line-height: 1.6;
}

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

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

.auth-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.75);
}

.auth-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.82);
  color: rgba(15, 23, 42, 0.96);
  font-size: 14px;
  font-weight: 700;
  outline: none;
  box-shadow: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.auth-input::placeholder {
  color: rgba(100, 116, 139, 0.92);
  font-weight: 600;
}

.auth-input:focus,
.auth-input:focus-visible {
  border-color: rgba(var(--brand-rgb), 0.35);
  box-shadow: 0 0 0 4px rgba(var(--brand-rgb), 0.12);
  background: rgba(255, 255, 255, 0.96);
}

.auth-input[aria-invalid="true"] {
  border-color: rgba(239, 68, 68, 0.38);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.auth-error {
  min-height: 16px;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: rgba(185, 28, 28, 0.96);
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.76);
  cursor: pointer;
}

.auth-check input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.auth-check--start {
  justify-content: flex-start;
}

.auth-link {
  color: #0b63ff;
  font-weight: 900;
  font-size: 13px;
  text-decoration: none;
}

.auth-link:hover,
.auth-link:focus-visible {
  text-decoration: underline;
}

.auth-btn {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border: 0;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 900;
}

.auth-btn[disabled] {
  opacity: 0.72;
  cursor: not-allowed;
}

.auth-alert {
  display: none;
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.auth-alert.is-visible {
  display: block;
}

.auth-alert--error {
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.20);
  color: rgba(185, 28, 28, 0.96);
}

.auth-alert--success {
  background: rgba(34, 197, 94, 0.10);
  border: 1px solid rgba(34, 197, 94, 0.18);
  color: rgba(21, 128, 61, 0.96);
}

.auth-divider {
  margin-top: 4px;
  text-align: center;
  font-size: 13px;
  color: rgba(100, 116, 139, 0.95);
}

.auth-social {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
}

.auth-provider,
.auth-provider-static {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.auth-provider:hover,
.auth-provider:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.auth-provider img,
.auth-provider-static img {
  width: 45px;
  height: 45px;
  display: block;
}

.auth-provider-static {
  opacity: 0.52;
}

.auth-footer {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
  font-size: 13px;
  color: rgba(100, 116, 139, 0.95);
  flex-wrap: wrap;
}

.auth-status {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.88);
  color: rgba(15, 23, 42, 0.84);
  font-size: 13px;
  line-height: 1.6;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.auth-status--success {
  background: rgba(34, 197, 94, 0.10);
  border-color: rgba(34, 197, 94, 0.18);
  color: rgba(21, 128, 61, 0.96);
}

.auth-status--error {
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.18);
  color: rgba(185, 28, 28, 0.96);
}

.auth-block {
  display: grid;
  gap: 14px;
}

.auth-actions {
  display: grid;
  gap: 12px;
}

.auth-actions-inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-actions-inline > * {
  flex: 1 1 160px;
}

.auth-actions.hidden,
.auth-form.hidden,
.auth-block.hidden,
.auth-field.hidden {
  display: none !important;
}

.auth-resend {
  display: none;
}

.auth-resend.is-visible {
  display: block;
}

.auth-card-frame {
  max-width: 480px;
  margin: 18px auto;
}

.auth-btn-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.82);
  color: rgba(15, 23, 42, 0.96);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.auth-btn-link:hover,
.auth-btn-link:focus-visible {
  text-decoration: none;
  border-color: rgba(var(--brand-rgb), 0.24);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

#recaptcha-container {
  min-height: 1px;
}

@media (max-width: 640px) {
  body.auth-page main#site-main.container {
    padding-bottom: 8px !important;
  }

  .auth-shell,
  .auth-card-frame {
    margin: 14px auto;
  }
}
