@font-face {
  font-family: "Anton";
  src: url("../assets/fonts/anton/Anton-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --olive-brown: #6b6451;
  --chair-blue: #1f2a5a;
  --text-light: #f4efe8;
  --button-text: #4a4337;
  --muted-light: rgba(31, 42, 90, 0.72);
  --line: rgba(31, 42, 90, 0.22);
  --line-focus: #1f2a5a;
  --button: #1f2a5a;
  --button-text-strong: #f4efe8;
  --ok: #166b45;
  --error: #9b1f1f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Work Sans", "Segoe UI", sans-serif;
  color: var(--chair-blue);
  background: var(--text-light);
}

.close-page {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 20;
  display: inline-block;
  text-decoration: none;
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1;
  color: var(--chair-blue);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.auth-card {
  width: min(340px, 100%);
  text-align: center;
  padding: 0;
}

.brand-link {
  width: 96px;
  height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-link img {
  max-width: 86px;
  width: 100%;
  height: auto;
  display: block;
}

h1 {
  margin: 0;
  font-family: "Anton", "Arial Narrow", sans-serif;
  font-size: clamp(1.55rem, 2.2vw, 2rem);
  line-height: 1.15;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-copy {
  margin: 16px auto 22px;
  max-width: 32ch;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--muted-light);
}

.auth-form {
  display: grid;
  gap: 14px;
  text-align: left;
}

.is-hidden {
  display: none !important;
}

.field-wrap {
  position: relative;
}

.field-wrap label {
  position: absolute;
  left: 14px;
  top: 10px;
  font-size: 0.82rem;
  color: var(--muted-light);
  pointer-events: none;
}

.field-wrap input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--chair-blue);
  font-size: 1rem;
  padding: 28px 12px 10px;
  transition: border-color 0.2s ease;
}

.field-wrap input:focus {
  outline: none;
  border-color: var(--line-focus);
}

.field-wrap.with-icon input {
  padding-right: 42px;
}

.field-wrap.with-icon input::-ms-reveal,
.field-wrap.with-icon input::-ms-clear {
  display: none;
}

.field-icon {
  position: absolute;
  right: 10px;
  bottom: 8px;
  border: none;
  background: transparent;
  width: 28px;
  height: 28px;
  padding: 0;
  color: #787878;
  cursor: pointer;
}

.field-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  display: block;
}

.forgot-link {
  margin-top: -2px;
  margin-bottom: 4px;
  justify-self: center;
  color: var(--chair-blue);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: underline;
}

.auth-submit {
  width: 100%;
  margin-top: 2px;
  border: 0;
  border-radius: 999px;
  background: var(--button);
  color: var(--button-text-strong);
  padding: 15px 18px;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
}

.auth-submit-link {
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.auth-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.auth-message {
  min-height: 1.3em;
  margin: 12px 0 0;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: left;
}

.auth-message.is-success {
  color: var(--ok);
}

.auth-message.is-error {
  color: var(--error);
}

.auth-switch {
  margin: 16px 0 0;
  font-size: 0.93rem;
  color: var(--muted-light);
}

.auth-switch a {
  color: var(--chair-blue);
  font-weight: 700;
  text-decoration: underline;
}

.register-success {
  margin-top: 4px;
  text-align: center;
}

.register-success-title,
.register-success-email-label,
.register-success-note {
  margin: 0 auto;
}

.register-success-email-label {
  margin-top: 6px;
}

.register-success-email {
  margin: 6px 0 14px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: underline;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.register-success-note {
  margin-top: 0;
}

.register-success-home {
  margin-top: 16px;
}

@media (max-width: 420px) {
  .close-page {
    top: 10px;
    right: 10px;
    font-size: 2.2rem;
  }

  h1 {
    font-size: 1.42rem;
  }

  .auth-copy {
    font-size: 0.91rem;
  }
}
