/* ============================================================
   auth.css — Login & Create Account pages
   JPSIM Journal  |  Colour scheme: --primary:#1a3c5e  --accent:#c9a227
   Loaded together with guidelines.css, which supplies the shared
   .gl-hero / .gl-hero__* base rules — this file only adds the
   hero illustration modifier for this page family, plus the
   auth form card itself.
   ============================================================ */

.gl-hero--auth::after {
  background:
    url("../images/illustrations/guidelines-auth.svg") no-repeat center 54% / 235px auto,
    radial-gradient(circle 150px at 26% 18%, rgba(201,162,39,.16) 0%, transparent 70%),
    radial-gradient(circle 170px at 78% 88%, rgba(255,255,255,.55) 0%, transparent 70%),
    linear-gradient(165deg, #eef4fb 0%, #eef4fb 55%, #dce9f6 100%);
}

/* ── Card ── */
.auth-section {
  padding: 3rem 0 4.5rem;
  background: var(--bg-section);
}
.auth-card-wrap {
  max-width: 480px;
  margin: 0 auto;
}
.auth-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2.25rem 2.25rem 2rem;
}
.auth-card__title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0 0 .3rem;
  letter-spacing: -.3px;
}
.auth-card__sub {
  font-size: .88rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

/* ── Alerts ── */
.auth-alert {
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.auth-alert--error   { background: var(--red-bg);   color: var(--red);   border: 1px solid #f5b8b8; }
.auth-alert--success { background: var(--green-bg); color: var(--green); border: 1px solid #b7e0b7; }
.auth-alert--info     { background: var(--blue-bg);  color: var(--primary); border: 1px solid #c7d9f5; }
.auth-alert ul { margin: 0; padding-left: 1.1rem; }
.auth-alert li { margin: .15rem 0; }

/* ── Form ── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.auth-field label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .35rem;
}
.auth-field label .req { color: var(--red); }
.auth-field label .opt { font-weight: 400; color: var(--text-light); }
.auth-field input,
.auth-field select {
  width: 100%;
  padding: .65rem .85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-family: var(--font-body);
  color: var(--text);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.auth-field input:focus,
.auth-field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,60,94,.1);
}
.auth-field small {
  display: block;
  margin-top: .3rem;
  font-size: .72rem;
  color: var(--text-light);
}

/* Mobile / WhatsApp number: country-code select + local number input */
.auth-phone-row {
  display: flex;
  gap: .5rem;
}
.auth-phone-row .auth-phone-code {
  flex: 0 0 auto;
  width: auto;
  max-width: 9.5rem;
}
.auth-phone-row input {
  flex: 1;
  min-width: 0;
}
@media (max-width: 480px) {
  .auth-phone-row { flex-wrap: wrap; }
  .auth-phone-row .auth-phone-code { flex: 1 1 100%; max-width: none; }
}

/* ── Consent checkboxes ── */
.auth-consent {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  padding: .9rem 1rem;
  background: var(--bg-section);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}
.auth-consent label {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  font-size: .8rem;
  color: var(--text);
  line-height: 1.5;
  cursor: pointer;
}
.auth-consent input[type=checkbox] {
  margin-top: .2rem;
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  flex-shrink: 0;
}
.auth-consent a { color: var(--primary); }
.auth-consent .req { color: var(--red); }

/* ── Submit / footer ── */
.auth-submit {
  width: 100%;
  justify-content: center;
  font-size: .92rem;
  padding: .8rem 1.5rem;
}
.auth-foot {
  text-align: center;
  margin-top: 1.5rem;
  font-size: .85rem;
  color: var(--text-muted);
}
.auth-foot a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.auth-foot a:hover { text-decoration: underline; }

.auth-forgot {
  font-size: .78rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
.auth-forgot:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .auth-row { grid-template-columns: 1fr; }
  .auth-card { padding: 1.75rem 1.5rem; }
}
