:root {
  color-scheme: light;
  --black: #080808;
  --ink: #111111;
  --muted: #707070;
  --line: #dedede;
  --field: #ffffff;
  --panel: rgba(255, 255, 255, 0.9);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: #f4f4f4;
}

button,
input,
select {
  font: inherit;
}

.login-page {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 42px 24px 54px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.9) 38%, rgba(255, 255, 255, 0.48) 64%, rgba(255, 255, 255, 0.18) 100%),
    url("assets/login-bg-people-bw.png") center / cover no-repeat;
}

.login-page::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 44% 42%, rgba(255, 255, 255, 0.82), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.48));
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(100%, 390px);
  min-height: 488px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: 48px 42px 40px;
  border: 1px solid rgba(210, 210, 210, 0.8);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 auto 42px;
}

.brand-mark {
  width: 78px;
  height: 56px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand strong {
  display: block;
  color: var(--black);
  font-size: 0.92rem;
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 800;
  text-transform: uppercase;
}

.login-form {
  display: grid;
  gap: 15px;
}

h1 {
  margin: 0 0 8px;
  color: var(--black);
  font-size: 1.26rem;
  line-height: 1.1;
  letter-spacing: 0;
}

label {
  display: grid;
  gap: 7px;
  color: var(--black);
  font-size: 0.78rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field);
  color: var(--ink);
  padding: 0 14px;
  outline: none;
  font-size: 0.86rem;
}

select {
  appearance: none;
}

input::placeholder {
  color: #aaa;
}

input:focus {
  border-color: #8d8d8d;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 46px;
}

.captcha-wrap {
  width: 304px;
  max-width: 100%;
  min-height: 78px;
  display: flex;
  justify-content: center;
  justify-self: center;
  margin: 2px 0 0;
}

.icon-button {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #5d5d5d;
  cursor: pointer;
}

.icon-button:hover {
  background: #f1f1f1;
  color: var(--black);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.icon-button path,
.icon-button circle {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.submit-button {
  height: 45px;
  margin-top: 8px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(180deg, #151515, #060606);
  color: #ffffff;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.14);
}

.submit-button:hover {
  background: #000000;
}

.forgot-link {
  justify-self: center;
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
}

.forgot-link:hover {
  color: var(--black);
}

.login-error {
  margin: 2px 0 0;
  color: #b42318;
  font-size: 0.86rem;
  font-weight: 800;
  text-align: center;
}

footer {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 48px);
  color: #8b8b8b;
  font-size: 0.78rem;
  text-align: center;
}

footer > span { display: block; }
footer .developer-credit { margin-top: 5px; font-size: .7rem; }
.developer-credit a { color: #666; font-weight: 800; text-decoration: none; }
.developer-credit a:hover { color: #9a691b; }
.public-developer-credit { width: min(100% - 36px, 760px); margin: 0 auto 24px; color: #888; text-align: center; font-size: .72rem; }
.public-developer-credit a { color: #666; font-weight: 800; text-decoration: none; }
.public-developer-credit a:hover { color: #9a691b; }

.pre-register-page {
  min-height: 100svh;
  display: grid;
  place-items: start center;
  padding: 36px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.82)),
    url("assets/login-bg-people-bw.png") center / cover no-repeat;
}

.pre-register-card {
  width: min(100%, 760px);
  padding: 34px;
  border: 1px solid rgba(210, 210, 210, 0.8);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.pre-register-brand {
  justify-content: center;
  margin-bottom: 28px;
}

.pre-register-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.pre-register-heading p,
.pre-register-success p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.pre-register-form {
  display: grid;
  gap: 18px;
}

.pre-register-form fieldset {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pre-register-form legend {
  padding: 0 6px;
  color: var(--black);
  font-size: 0.86rem;
  font-weight: 850;
}

.pre-register-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.public-check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.public-check input {
  width: 16px;
  height: 16px;
}

.conditional-field.is-hidden {
  display: none;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.pre-register-success {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

@media (max-width: 720px) {
  .login-page {
    padding: 28px 18px 48px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.78)),
      url("assets/login-bg-people-bw.png") center / cover no-repeat;
  }

  .login-card {
    min-height: auto;
    padding: 38px 28px 32px;
  }

  .brand {
    margin-bottom: 34px;
  }

  .pre-register-card {
    padding: 28px 20px;
  }

  .pre-register-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 390px) {
  .login-card {
    padding: 34px 22px 28px;
  }

  .brand strong {
    font-size: 0.82rem;
  }

  .captcha-wrap {
    transform: scale(0.88);
    transform-origin: center top;
    margin-bottom: -8px;
  }
}
