:root {
  --review-ink: #162133;
  --review-accent: #b18a32;
  --review-magenta: #c02d63;
  --review-lavender: #f4f7fb;
  --review-blue-soft: #e4eef8;
  --review-white: #ffffff;
  --review-text: #2b3342;
  --review-muted: #667182;
  --review-border: rgba(22, 33, 51, 0.16);
  --review-shadow: 0 28px 90px rgba(22, 33, 51, 0.18);
}

* {
  box-sizing: border-box;
}

body.auth-page {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--review-text);
  background:
    linear-gradient(rgba(22, 33, 51, .18), rgba(22, 33, 51, .10)),
    linear-gradient(135deg, #ffffff 0%, var(--review-lavender) 48%, var(--review-blue-soft) 100%);
  position: relative;
  overflow-x: hidden;
}

body.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--auth-logo-url);
  background-repeat: no-repeat;
  background-position: center;
  background-size: min(86vw, 980px);
  opacity: .085;
  pointer-events: none;
}

.auth-shell {
  position: relative;
  z-index: 2;
  width: min(620px, 100%);
}

.auth-card {
  width: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255,255,255,.58);
  box-shadow: var(--review-shadow);
  backdrop-filter: blur(18px);
}

.auth-card.compact {
  width: min(520px, 100%);
  margin: 0 auto;
}

.auth-header {
  padding: 34px 34px 16px;
  text-align: center;
}

.auth-logo {
  display: block;
  width: min(220px, 68%);
  height: auto;
  margin: 0 auto 18px;
}

.auth-title {
  margin: 0;
  color: var(--review-ink);
  font-size: clamp(1.55rem, 4vw, 2rem);
  line-height: 1.1;
  letter-spacing: -.035em;
  font-weight: 650;
}

.auth-subtitle {
  margin: 10px auto 0;
  color: var(--review-muted);
  font-size: .98rem;
  line-height: 1.55;
  max-width: 440px;
}

.auth-body {
  padding: 18px 34px 34px;
}

.auth-form label,
.auth-body label {
  color: var(--review-text);
  font-weight: 700;
  margin-bottom: 8px;
}

.auth-form input,
.auth-form textarea,
.auth-body input,
.auth-body textarea {
  width: 100%;
  display: block;
  border: 1px solid #d9d9e3;
  border-radius: 14px;
  min-height: 46px;
  padding: 10px 14px;
  font-size: 1rem;
  background: white;
  color: var(--review-text);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.auth-form textarea,
.auth-body textarea {
  min-height: 120px;
  resize: vertical;
}

.review-field-row {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  flex-wrap: wrap;
}

.review-field-row > .form-control,
.review-field-row > input,
.review-field-row > select,
.review-field-row > .review-field-control {
  flex: 1 1 260px;
  min-width: 0;
}

.review-field-row > .btn {
  flex: 0 0 auto;
}

.review-orcid-block {
  border: 1px solid rgba(22, 33, 51, .10);
  border-radius: 18px;
  padding: 1rem;
  background: rgba(255, 255, 255, .72);
}

.orcid-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.orcid-search-results,
.orcid-status {
  border-radius: 14px;
}

.orcid-candidate-card {
  border: 1px solid rgba(22, 33, 51, .10);
  border-radius: 14px;
  background: #fff;
  padding: .75rem;
}

.orcid-fill-button {
  align-self: flex-start;
}

@media (max-width: 576px) {
  .review-field-row > .btn {
    width: 100%;
  }
}

.auth-form input.is-invalid,
.auth-form textarea.is-invalid,
.auth-body input.is-invalid,
.auth-body textarea.is-invalid {
  border-color: #c12d63;
  box-shadow: 0 0 0 4px rgba(193, 45, 99, .10);
}

.auth-form input:focus,
.auth-form textarea:focus,
.auth-body input:focus,
.auth-body textarea:focus {
  border-color: var(--review-ink);
  box-shadow: 0 0 0 4px rgba(86, 59, 109, .10);
}

.auth-button {
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid var(--review-ink);
  background: var(--review-ink);
  color: white;
  font-weight: 850;
  letter-spacing: .01em;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.auth-button:hover {
  background: var(--review-magenta);
  border-color: var(--review-magenta);
  color: white;
  transform: translateY(-1px);
}

.auth-button-inline {
  width: auto;
  min-height: 48px;
  border-radius: 999px;
  padding-inline: 1.2rem;
  white-space: nowrap;
}

@media (max-width: 576px) {
  .auth-button-inline {
    width: 100%;
  }
}

.auth-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
  font-size: .94rem;
}

.auth-links.center {
  justify-content: center;
}

.auth-links a {
  color: var(--review-ink);
  font-weight: 750;
  text-decoration: none;
}

.auth-links a:hover {
  color: var(--review-magenta);
}

.auth-alert {
  border-radius: 16px;
  margin-bottom: 18px;
}

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

  .auth-header {
    padding: 28px 22px 12px;
  }

  .auth-body {
    padding: 16px 22px 28px;
  }

  .auth-links {
    flex-direction: column;
    gap: 10px;
  }

  .auth-logo {
    width: min(200px, 76%);
  }
}

.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
