@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --auth-bg: #0a0a0a;
  --auth-panel: #171717;
  --auth-line: rgba(255, 255, 255, 0.1);
  --auth-copy: #9ca3af;
  --auth-muted: #6b7280;
  --auth-dim: #4b5563;
  --auth-text: #ffffff;
  --auth-accent: #1994cf;
  --auth-accent-hover: #27a6e2;
  --auth-danger: #f87171;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body.login-page {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--auth-bg) !important;
  color: var(--auth-text);
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.auth-shell {
  display: flex;
  min-height: 100vh;
  background: var(--auth-bg);
}

.auth-story,
.auth-panel {
  width: 50%;
  min-height: 100vh;
}

.auth-story {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #082f49 0%, #0f0a1a 54%, #0a0a0a 100%);
}

.auth-story::after {
  position: absolute;
  inset: auto -10% -28% 15%;
  height: 58%;
  content: "";
  pointer-events: none;
  background: radial-gradient(circle, rgba(25, 148, 207, 0.09) 0%, rgba(25, 148, 207, 0) 68%);
  filter: blur(8px);
}

.auth-story__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 352px;
}

.brand-lockup {
  display: flex;
  align-items: center;
}

.erplynk-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  white-space: nowrap;
}

.erplynk-brand__mark {
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.2);
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.erplynk-brand__name {
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  letter-spacing: -0.5px;
}

.erplynk-brand__name span {
  color: #7dd3fc;
  font-weight: 600;
}

.auth-story h2 {
  margin: 44px 0 16px;
  color: var(--auth-text);
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.auth-story h2 span {
  color: #38bdf8;
}

.auth-story__copy {
  max-width: 410px;
  margin: 0 0 40px;
  color: var(--auth-copy);
  font-size: 16px;
  line-height: 1.625;
}

.auth-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.auth-stat strong,
.auth-stat span {
  display: block;
}

.auth-stat strong {
  margin-bottom: 6px;
  color: var(--auth-text);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.2;
}

.auth-stat span {
  color: var(--auth-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.auth-card {
  width: 100%;
  max-width: 448px;
}

.brand-lockup--mobile {
  display: none;
}

.auth-card__header {
  margin-bottom: 28px;
}

.auth-card__header h1 {
  margin: 0 0 8px;
  color: var(--auth-text);
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.auth-card__header p {
  margin: 0;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 20px;
}

.auth-field {
  margin-bottom: 16px;
}

.auth-field label {
  display: block;
  margin: 0 0 8px;
  color: var(--auth-copy);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-input {
  display: block;
  width: 100%;
  height: 50px;
  padding: 14px 16px;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  outline: 0;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
  color: var(--auth-text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.auth-input::placeholder {
  color: var(--auth-muted);
  opacity: 1;
}

.auth-input:hover {
  border-color: rgba(255, 255, 255, 0.17);
}

.auth-input:focus {
  border-color: rgba(56, 189, 248, 0.7);
  background: rgba(255, 255, 255, 0.065);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.auth-password {
  position: relative;
}

.auth-password .auth-input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  width: 44px;
  height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--auth-muted);
  cursor: pointer;
  transition: color 160ms ease;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: #d1d5db;
}

.password-toggle:focus-visible {
  border-radius: 0 8px 8px 0;
  box-shadow: inset 0 0 0 2px rgba(56, 189, 248, 0.65);
}

.auth-error {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 2px 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(248, 113, 113, 0.22);
  border-radius: 8px;
  background: rgba(127, 29, 29, 0.16);
  color: var(--auth-danger);
  font-size: 12px;
  line-height: 18px;
}

.auth-error i {
  margin-top: 2px;
}

.auth-error p {
  margin: 0;
}

.auth-submit {
  display: block;
  width: 100%;
  min-height: 40px;
  margin-top: 20px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  outline: 0;
  background: var(--auth-accent);
  box-shadow: 0 10px 15px -3px rgba(2, 132, 199, 0.2), 0 4px 6px -4px rgba(2, 132, 199, 0.2);
  color: var(--auth-text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  cursor: pointer;
  transition: transform 140ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.auth-submit:hover,
.auth-submit:focus-visible {
  background: var(--auth-accent-hover);
  box-shadow: 0 12px 22px -5px rgba(2, 132, 199, 0.32);
}

.auth-submit:focus-visible {
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.24), 0 12px 22px -5px rgba(2, 132, 199, 0.32);
}

.auth-submit:active {
  transform: translateY(1px);
}

.auth-footer {
  margin: 40px 0 0;
  color: var(--auth-dim);
  font-size: 12px;
  line-height: 16px;
  text-align: center;
}

.auth-footer a {
  color: #657081;
  text-decoration: none;
  transition: color 160ms ease;
}

.auth-footer a:hover,
.auth-footer a:focus-visible {
  color: var(--auth-copy);
  text-decoration: underline;
}

@media (max-width: 991px) {
  .auth-story {
    display: none;
  }

  .auth-panel {
    width: 100%;
    padding: 24px;
  }

  .brand-lockup--mobile {
    display: flex;
    margin-bottom: 40px;
  }

}

@media (max-width: 480px) {
  .auth-panel {
    align-items: center;
    padding: 24px;
  }

  .auth-card {
    max-width: none;
  }

  .brand-lockup--mobile {
    margin-bottom: 40px;
  }
}

@media (max-height: 650px) and (min-width: 992px) {
  .auth-story,
  .auth-panel {
    padding-top: 32px;
    padding-bottom: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
