/**
 * Sarbon Proceedings — Login & Register pages
 * Appearance only. Form names, actions, and OJS behaviour unchanged.
 */

.sarbon-auth {
  --auth-primary: #1e3a5f;
  --auth-primary-dark: #0b1729;
  --auth-primary-mid: #102037;
  --auth-accent: #c9a84c;
  --auth-accent-dark: #a38639;
  --auth-bg: #f4f6f9;
  --auth-border: #e5e7eb;
  --auth-muted: #6b7280;
  --auth-text: #1f2937;
  position: relative;
  min-height: calc(100vh - 12rem);
  padding: 2.5rem 1rem 4rem;
  background:
    radial-gradient(circle at 1px 1px, rgba(30, 58, 95, 0.06) 1px, transparent 0),
    linear-gradient(180deg, #eef2f7 0%, var(--auth-bg) 40%, #fff 100%);
  background-size: 28px 28px, auto;
}

.sarbon-auth__shell {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  border-radius: 1.25rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 25px 50px -12px rgba(16, 32, 55, 0.14);
}

.sarbon-auth__shell--wide {
  max-width: 1120px;
}

@media (min-width: 900px) {
  .sarbon-auth__shell {
    grid-template-columns: minmax(280px, 0.95fr) 1.15fr;
  }

  .sarbon-auth__shell--wide {
    grid-template-columns: minmax(260px, 0.85fr) 1.25fr;
  }
}

/* Brand panel */
.sarbon-auth__brand {
  position: relative;
  overflow: hidden;
  padding: 2.25rem 1.75rem;
  color: #fff;
  background: linear-gradient(145deg, var(--auth-primary-dark) 0%, var(--auth-primary-mid) 42%, var(--auth-primary) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 220px;
}

@media (min-width: 900px) {
  .sarbon-auth__brand {
    padding: 2.75rem 2.25rem;
    min-height: 100%;
  }
}

.sarbon-auth__brand-glow {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.sarbon-auth__brand-glow--a {
  width: 280px;
  height: 280px;
  top: -80px;
  right: -60px;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.28), transparent 70%);
}

.sarbon-auth__brand-glow--b {
  width: 220px;
  height: 220px;
  bottom: -70px;
  left: -50px;
  background: radial-gradient(circle, rgba(85, 128, 189, 0.25), transparent 70%);
}

.sarbon-auth__brand-dots {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: radial-gradient(circle at 1px 1px, #fff 1px, transparent 0);
  background-size: 22px 22px;
  pointer-events: none;
}

.sarbon-auth__brand-inner {
  position: relative;
  z-index: 1;
}

.sarbon-auth__icon {
  width: 3.5rem;
  height: 3.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  margin-bottom: 1.25rem;
  background: rgba(201, 168, 76, 0.16);
  border: 1px solid rgba(201, 168, 76, 0.28);
  color: var(--auth-accent);
}

.sarbon-auth__icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.sarbon-auth__eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.65rem;
}

.sarbon-auth__title {
  font-family: Outfit, Inter, system-ui, sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

.sarbon-auth__subtitle {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.68);
  max-width: 28ch;
}

.sarbon-auth__meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sarbon-auth__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Form panel */
.sarbon-auth__panel {
  padding: 2rem 1.5rem 2.25rem;
}

@media (min-width: 640px) {
  .sarbon-auth__panel {
    padding: 2.5rem 2.5rem 2.75rem;
  }
}

.sarbon-auth__panel-head {
  margin-bottom: 1.5rem;
}

.sarbon-auth__panel-head h2 {
  font-family: Outfit, Inter, system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--auth-primary-mid);
  margin: 0 0 0.35rem;
}

.sarbon-auth__panel-head p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--auth-muted);
}

.sarbon-auth__required-note {
  font-size: 0.8rem;
  color: var(--auth-muted);
  margin: 0 0 1.25rem;
}

.sarbon-auth__alert {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.sarbon-auth__alert--error,
.sarbon-auth .pkp_form_error,
.sarbon-auth .pkp_form_error_list {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.sarbon-auth .pkp_form_error_list {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem 0.85rem 1.75rem;
  border-radius: 0.75rem;
}

.sarbon-auth__alert--info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a5f;
}

/* Fields */
.sarbon-auth fieldset {
  border: 0;
  margin: 0 0 1.5rem;
  padding: 0;
  min-width: 0;
}

.sarbon-auth fieldset > legend {
  font-family: Outfit, Inter, system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--auth-primary-mid);
  margin-bottom: 0.85rem;
  padding: 0;
  width: 100%;
}

.sarbon-auth .fields {
  display: grid;
  gap: 1rem;
}

.sarbon-auth .fields--2 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .sarbon-auth .fields--2 {
    grid-template-columns: 1fr 1fr;
  }
}

.sarbon-auth label {
  display: block;
}

.sarbon-auth .label,
.sarbon-auth label > .label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.4rem;
}

.sarbon-auth .required {
  color: #dc2626;
  margin-left: 0.15rem;
}

.sarbon-auth .pkp_screen_reader {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sarbon-auth input[type="text"],
.sarbon-auth input[type="email"],
.sarbon-auth input[type="password"],
.sarbon-auth select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--auth-border);
  border-radius: 0.75rem;
  background: #fafbfc;
  color: var(--auth-text);
  font-size: 0.95rem;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.sarbon-auth input:focus,
.sarbon-auth select:focus {
  outline: none;
  background: #fff;
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.12);
}

.sarbon-auth .password a {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--auth-primary);
  text-decoration: none;
}

.sarbon-auth .password a:hover {
  color: var(--auth-accent-dark);
  text-decoration: underline;
}

.sarbon-auth .checkbox label,
.sarbon-auth .optin label,
.sarbon-auth .reviewer label,
.sarbon-auth .context_privacy label,
.sarbon-auth .roles label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #374151;
  cursor: pointer;
}

.sarbon-auth input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--auth-primary);
}

.sarbon-auth .consent,
.sarbon-auth .reviewer,
.sarbon-auth fieldset[name="contexts"] {
  padding: 1rem 1.1rem;
  border-radius: 0.9rem;
  background: #f8f9fc;
  border: 1px solid #eef1f6;
}

.sarbon-auth .reviewer_interests,
.sarbon-auth .reviewer_nocontext_interests {
  margin-top: 0.75rem;
}

.sarbon-auth .contexts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.sarbon-auth .contexts .context {
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  background: #fff;
  border: 1px solid var(--auth-border);
}

.sarbon-auth .contexts .name {
  font-weight: 700;
  color: var(--auth-primary-mid);
  margin-bottom: 0.65rem;
}

.sarbon-auth .roles {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.sarbon-auth .roles legend {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--auth-muted);
  margin-bottom: 0.35rem;
}

.sarbon-auth .recaptcha_wrapper {
  margin: 0.5rem 0 1rem;
}

/* Buttons */
.sarbon-auth .buttons {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

@media (min-width: 480px) {
  .sarbon-auth .buttons {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }
}

.sarbon-auth .buttons .submit,
.sarbon-auth button.submit {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 0.8rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--auth-primary-mid), var(--auth-primary));
  box-shadow: 0 10px 24px -12px rgba(30, 58, 95, 0.55);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.sarbon-auth .buttons .submit:hover,
.sarbon-auth button.submit:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -12px rgba(30, 58, 95, 0.6);
}

.sarbon-auth .buttons .register,
.sarbon-auth .buttons .login,
.sarbon-auth .buttons a.register,
.sarbon-auth .buttons a.login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.1rem;
  border-radius: 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--auth-primary);
  text-decoration: none;
  background: rgba(30, 58, 95, 0.06);
  border: 1px solid rgba(30, 58, 95, 0.1);
  transition: background 0.15s ease, color 0.15s ease;
}

.sarbon-auth .buttons .register:hover,
.sarbon-auth .buttons .login:hover,
.sarbon-auth .buttons a.register:hover,
.sarbon-auth .buttons a.login:hover {
  background: rgba(201, 168, 76, 0.14);
  color: var(--auth-accent-dark);
}

.sarbon-auth__footer-link {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--auth-muted);
}

.sarbon-auth__footer-link a {
  color: var(--auth-primary);
  font-weight: 600;
  text-decoration: none;
}

.sarbon-auth__footer-link a:hover {
  color: var(--auth-accent-dark);
  text-decoration: underline;
}

/* ── Message / error pages (authorizationDenied, etc.) ── */
.sarbon-msg {
  min-height: calc(100vh - 16rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem 4rem;
  background:
    radial-gradient(circle at 1px 1px, rgba(30, 58, 95, 0.06) 1px, transparent 0),
    linear-gradient(180deg, #eef2f7 0%, #f4f6f9 50%, #fff 100%);
  background-size: 28px 28px, auto;
}

.sarbon-msg__card {
  max-width: 34rem;
  width: 100%;
  text-align: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1.25rem;
  padding: 3rem 2rem 2.5rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 25px 50px -12px rgba(16,32,55,0.14);
}

.sarbon-msg__icon {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1.25rem;
  color: #1e3a5f;
  background: rgba(30, 58, 95, 0.08);
  border: 1px solid rgba(30, 58, 95, 0.12);
}

.sarbon-msg__icon svg {
  width: 2.25rem;
  height: 2.25rem;
}

.sarbon-msg__icon--warn {
  color: #b45309;
  background: rgba(201, 168, 76, 0.14);
  border-color: rgba(201, 168, 76, 0.3);
}

.sarbon-msg__title {
  font-family: Outfit, Inter, system-ui, sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #102037;
  margin: 0 0 0.85rem;
}

.sarbon-msg__desc {
  font-size: 0.98rem;
  line-height: 1.65;
  color: #6b7280;
  margin: 0 0 1.75rem;
}

.sarbon-msg__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.sarbon-msg__btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.4rem;
  border-radius: 0.8rem;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.sarbon-msg__btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #102037, #1e3a5f);
  box-shadow: 0 10px 24px -12px rgba(30, 58, 95, 0.55);
}

.sarbon-msg__btn--primary:hover {
  transform: translateY(-1px);
}

.sarbon-msg__btn--ghost {
  color: #1e3a5f;
  background: rgba(30, 58, 95, 0.06);
  border: 1px solid rgba(30, 58, 95, 0.1);
}

.sarbon-msg__btn--ghost:hover {
  background: rgba(201, 168, 76, 0.14);
  color: #a38639;
}
