:root {
  --auth-accent: #38BDF8;
  --auth-accent-dark: #0284C7;
  --auth-accent-soft: rgba(56, 189, 248, 0.14);
  --auth-dark: #020617;
  --auth-panel: #0f172a;
  --auth-text: #020617;
  --auth-muted: #64748b;
  --auth-border: #dbe7f3;
  --auth-surface: #ffffff;
  --auth-page: #f8fafc;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
}

body {
  min-height: 100vh;
  color: var(--auth-text);
  background: var(--auth-page);
}

a {
  color: inherit;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(420px, 1fr);
  background:
    linear-gradient(90deg, var(--auth-panel) 0 43%, transparent 43%),
    var(--auth-page);
}

.login-shell--single {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(56, 189, 248, 0.28), transparent 26%),
    radial-gradient(circle at 82% 74%, rgba(34, 197, 94, 0.18), transparent 22%),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(135deg, #020617 0%, #0f172a 54%, #164e63 100%);
  background-size: auto, auto, 48px 48px, 48px 48px, auto;
}

.login-panel {
  min-width: 0;
}

.login-panel--brand {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 44px;
  padding: clamp(34px, 5vw, 64px);
  color: #fff;
  background:
    linear-gradient(145deg, rgba(56, 189, 248, 0.2), rgba(2, 6, 23, 0) 42%),
    linear-gradient(180deg, #020617 0%, #0f172a 100%);
}

.login-logo {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

.login-logo img {
  width: 190px;
  max-width: 52vw;
  height: auto;
  object-fit: contain;
}

.login-intro {
  max-width: 620px;
}

.login-intro > span,
.login-brand > span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: 16px;
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--auth-accent);
  background: rgba(56, 189, 248, 0.12);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.login-intro h1 {
  max-width: 680px;
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(2.35rem, 5vw, 4.6rem);
  line-height: 1.02;
}

.login-intro p {
  max-width: 560px;
  color: rgba(226, 232, 240, 0.82);
  font-size: 17px;
  line-height: 1.75;
}

.login-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.login-highlights div {
  min-height: 118px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.login-highlights strong,
.login-highlights span {
  display: block;
}

.login-highlights strong {
  margin-bottom: 8px;
  color: #fff;
  font-size: 15px;
}

.login-highlights span {
  color: rgba(226, 232, 240, 0.76);
  font-size: 13px;
  line-height: 1.55;
}

.login-panel--form,
.auth-wrapper {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vw, 56px);
}

.login-panel--center {
  position: relative;
  z-index: 1;
  width: 100%;
}

.login-card,
.auth-card {
  width: min(100%, 460px);
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid rgba(203, 213, 225, 0.78);
  border-radius: 22px;
  background: var(--auth-surface);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.1);
}

.login-card--single {
  width: min(100%, 430px);
  position: relative;
  border-color: rgba(125, 211, 252, 0.28);
  background:
    radial-gradient(circle at 18% 12%, rgba(56, 189, 248, 0.18), transparent 28%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.96));
  box-shadow:
    0 34px 90px rgba(2, 6, 23, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  transform: rotateX(2deg);
}

.login-logo--center {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 28px;
  border-color: transparent;
  background: transparent;
}

.login-logo--center img {
  width: 210px;
}

.auth-card {
  text-align: center;
}

.login-brand,
.auth-brand {
  margin-bottom: 28px;
  text-align: left;
}

.auth-brand {
  text-align: center;
}

.auth-brand img {
  width: 190px;
  max-width: 72%;
  height: auto;
  margin-bottom: 22px;
  object-fit: contain;
}

.login-brand h2,
.auth-brand h1 {
  margin: 0 0 10px;
  color: var(--auth-dark);
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  font-weight: 800;
  line-height: 1.08;
}

.login-brand p,
.auth-brand p {
  color: var(--auth-muted);
  font-size: 15px;
  line-height: 1.65;
}

.alert-error,
.alert-success {
  margin-bottom: 22px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}

.alert-error {
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #0369a1;
  background: rgba(56, 189, 248, 0.1);
}

.alert-success {
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: #166534;
  background: #f0fdf4;
}

.form-group {
  margin-bottom: 18px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--auth-dark);
  font-size: 13px;
  font-weight: 800;
}

.login-card--single .form-group label {
  color: rgba(226, 232, 240, 0.9);
}

.form-control {
  width: 100%;
  min-height: 52px;
  padding: 14px 15px;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  color: var(--auth-text);
  background: #fff;
  font-size: 15px;
  line-height: 1.4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-card--single .form-control {
  border-color: rgba(148, 163, 184, 0.24);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.login-card--single .form-control::placeholder {
  color: rgba(226, 232, 240, 0.52);
}

.login-card--single .form-control:focus {
  border-color: rgba(56, 189, 248, 0.8);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

.password-field {
  position: relative;
}

.password-field .form-control {
  padding-right: 78px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-width: 42px;
  min-height: 38px;
  border: 1px solid rgba(129, 104, 255, 0.42);
  border-radius: 10px;
  color: #ffffff;
  background: rgba(80, 56, 255, 0.14);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  transform: translateY(-50%);
}

.password-toggle:hover {
  background: rgba(80, 56, 255, 0.26);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.password-toggle svg.is-visible circle {
  fill: currentColor;
}

.form-control:focus {
  outline: none;
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 4px var(--auth-accent-soft);
}

.form-control::placeholder {
  color: #94a3b8;
}

.form-control[readonly] {
  color: var(--auth-muted);
  background: #f8fafc;
}

.field-error {
  display: block;
  margin-top: 8px;
  color: var(--auth-accent);
  font-size: 13px;
  font-weight: 700;
}

.is-invalid {
  border-color: var(--auth-accent) !important;
  box-shadow: 0 0 0 3px var(--auth-accent-soft);
}

.auth-heading {
  color: #ffffff;
  font-size: 25px;
  margin: 4px 0 12px;
  text-align: center;
}

.auth-copy {
  color: rgba(226, 232, 240, 0.78);
  font-size: 14px;
  line-height: 1.65;
  margin: 0 0 22px;
  text-align: center;
}

.auth-copy strong {
  color: #ffffff;
}

.ajax-spinner {
  animation: auth-spin 0.7s linear infinite;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  border-top-color: #fff;
  display: inline-block;
  height: 16px;
  margin-right: 9px;
  vertical-align: -3px;
  width: 16px;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

.ajax-feedback-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  padding: 20px;
  pointer-events: none;
  position: fixed;
  transition: opacity 0.24s ease, visibility 0.24s ease;
  visibility: hidden;
  z-index: 99999;
}

.ajax-feedback-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.ajax-feedback-modal__backdrop {
  backdrop-filter: blur(6px);
  background: rgba(2, 8, 23, 0.63);
  inset: 0;
  position: absolute;
}

.ajax-feedback-modal__card {
  background:
    radial-gradient(circle at 50% 0%, rgba(80, 56, 255, 0.2), transparent 46%),
    linear-gradient(180deg, #111a34 0%, #070e1f 100%);
  border: 1px solid rgba(129, 104, 255, 0.36);
  border-radius: 26px;
  box-shadow: 0 30px 80px rgba(2, 8, 23, 0.64);
  max-width: 420px;
  padding: 34px 28px 26px;
  position: relative;
  text-align: center;
  transform: translateY(18px) scale(0.96);
  transition: transform 0.26s ease;
  width: 100%;
}

.ajax-feedback-modal.is-visible .ajax-feedback-modal__card {
  transform: translateY(0) scale(1);
}

.ajax-feedback-modal__close {
  align-items: center;
  background: rgba(129, 104, 255, 0.12);
  border: 0;
  border-radius: 50%;
  color: #b6adff;
  cursor: pointer;
  display: inline-flex;
  font-size: 22px;
  height: 34px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 16px;
  top: 16px;
  width: 34px;
}

.ajax-feedback-modal__icon {
  align-items: center;
  background: linear-gradient(135deg, #5038ff, #6d28d9);
  border-radius: 50%;
  box-shadow: 0 13px 28px rgba(79, 70, 229, 0.4);
  color: #ffffff;
  display: flex;
  font-size: 38px;
  font-weight: 800;
  height: 72px;
  justify-content: center;
  line-height: 1;
  margin: 0 auto 18px;
  width: 72px;
}

.ajax-feedback-modal__eyebrow {
  color: #978aff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.ajax-feedback-modal__title {
  color: #ffffff;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 10px;
}

.ajax-feedback-modal__message {
  color: #aebbd3;
  font-size: 15px;
  line-height: 1.58;
  margin: 0 auto 25px;
}

.ajax-feedback-modal__action {
  background: linear-gradient(135deg, #5038ff, #6d28d9);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 11px 22px rgba(79, 70, 229, 0.32);
  color: #ffffff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  min-height: 48px;
  width: 100%;
}

.ajax-feedback-modal.is-error .ajax-feedback-modal__card {
  background:
    radial-gradient(circle at 50% 0%, rgba(80, 56, 255, 0.2), transparent 46%),
    linear-gradient(180deg, #111a34 0%, #070e1f 100%);
  border-color: rgba(129, 104, 255, 0.36);
}

.ajax-feedback-modal.is-error .ajax-feedback-modal__icon,
.ajax-feedback-modal.is-error .ajax-feedback-modal__action {
  background: linear-gradient(135deg, var(--auth-accent), #5c2dff);
  box-shadow: 0 13px 28px rgba(37, 99, 235, 0.27);
}

.ajax-feedback-modal.is-error .ajax-feedback-modal__eyebrow {
  color: #978aff;
}

.ajax-feedback-modal.is-passive-success .ajax-feedback-modal__close,
.ajax-feedback-modal.is-passive-success .ajax-feedback-modal__action {
  display: none;
}

.ajax-feedback-modal.is-passive-success .ajax-feedback-modal__card {
  max-width: 390px;
  padding-bottom: 30px;
}

.ajax-feedback-modal.is-passive-success .ajax-feedback-modal__message {
  margin-bottom: 0;
}

.form-footer {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 18px;
}

.form-footer a,
.login-back a,
.auth-back a {
  color: var(--auth-accent-dark);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.login-card--single .form-footer a,
.login-card--single .login-back a {
  color: #38BDF8;
}

.form-footer a:hover,
.login-back a:hover,
.auth-back a:hover {
  color: #7dd3fc;
}

.btn {
  width: 100%;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--auth-accent), var(--auth-accent-dark));
  box-shadow: 0 14px 28px rgba(2, 132, 199, 0.2);
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(2, 132, 199, 0.28);
}

.btn:active {
  transform: translateY(0);
}

.login-card--single .btn {
  background: linear-gradient(135deg, #5038ff, #6d28d9);
  box-shadow: 0 14px 28px rgba(79, 70, 229, 0.34);
}

.login-card--single .btn:hover {
  box-shadow: 0 18px 34px rgba(79, 70, 229, 0.44);
}

.login-card--single .btn:disabled {
  background: linear-gradient(135deg, #5038ff, #6d28d9);
  cursor: wait;
  opacity: 0.94;
}

.login-card--single .ajax-spinner {
  border-color: rgba(255, 255, 255, 0.32);
  border-top-color: #ffffff;
  box-shadow: 0 0 8px rgba(196, 186, 255, 0.45);
}

.login-back,
.auth-back {
  margin-top: 24px;
  text-align: center;
}

.login-back a,
.auth-back a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

@media (max-width: 1100px) {
  .login-shell {
    grid-template-columns: 1fr;
    background: var(--auth-page);
  }

  .login-panel--brand {
    min-height: auto;
    padding-bottom: 34px;
  }

  .login-panel--form {
    min-height: auto;
    padding-top: 34px;
  }
}

@media (max-width: 720px) {
  body {
    background: var(--auth-page);
  }

  .login-panel--brand {
    padding: 28px 20px;
  }

  .login-intro h1 {
    font-size: clamp(2rem, 11vw, 2.75rem);
  }

  .login-intro p {
    font-size: 15px;
  }

  .login-highlights {
    grid-template-columns: 1fr;
  }

  .login-highlights div {
    min-height: auto;
  }

  .login-panel--form,
  .auth-wrapper {
    padding: 24px 16px;
  }

  .login-card,
  .auth-card {
    border-radius: 18px;
  }

}

/* Keep auth inputs aligned with the dark website theme, including autofill states. */
.login-card--single .form-control,
.login-card--single input[type="text"],
.login-card--single input[type="email"],
.login-card--single input[type="password"],
.login-card--single .password-field .form-control {
  border-color: rgba(129, 104, 255, 0.42) !important;
  color: #eaf4ff !important;
  background: rgba(7, 14, 31, 0.94) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

.login-card--single .form-control:focus,
.login-card--single input[type="text"]:focus,
.login-card--single input[type="email"]:focus,
.login-card--single input[type="password"]:focus,
.login-card--single .password-field .form-control:focus {
  border-color: rgba(154, 140, 255, 0.92) !important;
  color: #ffffff !important;
  background: rgba(10, 20, 42, 0.98) !important;
  box-shadow:
    0 0 0 4px rgba(80, 56, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.login-card--single .form-control::placeholder,
.login-card--single .password-field .form-control::placeholder {
  color: rgba(180, 198, 225, 0.68) !important;
}

.login-card--single .form-control[readonly] {
  color: rgba(234, 244, 255, 0.8) !important;
  background: rgba(7, 14, 31, 0.78) !important;
}

.login-card--single input:-webkit-autofill,
.login-card--single input:-webkit-autofill:hover,
.login-card--single input:-webkit-autofill:focus {
  -webkit-text-fill-color: #eaf4ff !important;
  caret-color: #eaf4ff;
  box-shadow:
    0 0 0 1000px #070e1f inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  transition: background-color 9999s ease-in-out 0s;
}

/* Keep secondary auth actions aligned with the violet website theme. */
.login-card--single .form-footer a {
  color: #b6adff;
  display: inline-flex;
  font-size: 0.82rem;
  gap: 6px;
  letter-spacing: 0.01em;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.login-card--single .form-footer a:hover,
.login-card--single .form-footer a:focus-visible {
  color: #ffffff;
  outline: 0;
  text-shadow: 0 0 14px rgba(154, 140, 255, 0.66);
}

.login-card--single .login-back {
  margin-top: 20px;
}

.login-card--single .login-back a {
  color: #c3bbff !important;
  font-size: 0.86rem;
  transition:
    color 0.2s ease,
    text-shadow 0.2s ease;
}

.login-card--single .login-back a:hover,
.login-card--single .login-back a:focus-visible {
  color: #ffffff !important;
  outline: 0;
  text-shadow: 0 0 14px rgba(154, 140, 255, 0.66);
}

/* Use one violet input border language across every authentication screen. */
.login-card--single .form-control,
.auth-card .form-control {
  border-color: rgba(129, 104, 255, 0.42) !important;
}

.login-card--single .form-control:focus,
.auth-card .form-control:focus {
  border-color: rgba(154, 140, 255, 0.92) !important;
  box-shadow:
    0 0 0 4px rgba(80, 56, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}
