* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;

  font-family: 'Argentum', sans-serif;
}

body {
  font-family: 'Argentum', sans-serif;
  background: #fdfdfd;
  color: #202020;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0,0,0,0);
  opacity: 0;
  pointer-events: none;

  transition: background .3s ease, opacity .3s ease;
}

.auth-overlay.active {
  background: rgba(0,0,0,.6);
  opacity: 1;
  pointer-events: all;
}

.auth-modal-box {
  background: #fdfdfd;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;

  opacity: 0;
  transform: translateY(20px) scale(.97);

  transition: transform .35s cubic-bezier(.16,1,.3,1),
  opacity .35s ease;
}

.auth-overlay.active .auth-modal-box {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.auth-modal-header {
  position: relative;
  padding: 32px 0;
  text-align: center;
}
.auth-modal-header h1 {
  font-weight: 900;
  font-size: 26px;
  line-height: 26px;
  letter-spacing: 7%;
  text-transform: uppercase;
}
.auth-close-btn {
  position: absolute;
  right: 16px;
  top: 13px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #202020;
  line-height: 1;
  transition: opacity .2s;
}

.auth-close-btn:hover { opacity: .5; }

.divider-thick {
  height: 1px;
  background: #202020;
}

.auth-body {
  padding: 40px 64px;
}
.auth-body h2 {
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  line-height: 14px;
  letter-spacing: 0.25%;
  text-transform: uppercase;
  margin-bottom: 32px;
}

.auth-error {
  margin: 0 auto 18px;
  max-width: 420px;
  text-align: center;
  color: #c62828;
  font-size: 13px;
  line-height: 16px;
  font-weight: 400;
}

.form-wrapper {
  overflow: hidden;
  transition: height 0.3s ease;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
  transform: translateY(0);
}
.auth-form.hiding {
  opacity: 0;
  transform: translateY(-10px);
}

.form-field {
  text-align: center;
}
.form-field label {
  display: block;
  margin-bottom: 8px;
  color: #202020;
  font-size: 14px;
  line-height: 18px;
  font-weight: 300;
}
.form-field label .auth-optional {
  font-size: 12px;
  color: #888;
  font-weight: 300;
}
.form-field input {
  width: 100%;
  text-align: center;
  background: transparent;
  border: none;
  border-bottom: 1px solid #ccc;
  padding-bottom: 8px;
  outline: none;
  transition: border-color .2s;
  color: #202020;
  font-size: 14px;
  line-height: 18px;
  font-weight: 200;
}
.form-field input:focus { border-color: #202020; }
.form-field input::placeholder { color: #858585; }

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #555;
  font-size: 14px;
  line-height: 18px;
  font-weight: 200;
}
.checkbox-label input {
  width: 15px;
  height: 15px;
  border-radius: 6px;
  border: 1px solid #555;
  appearance: none;
  cursor: pointer;
  transition: background .2s;
  position: relative;
  display: inline-block;
  background: #fff;
}

.checkbox-label input::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  background: #555;
  border-radius: 3px;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity .2s;
}

.checkbox-label input:checked::after {
  opacity: 1;
}

.forgot-link {
  color: #555;
  text-decoration: underline;
  transition: opacity .2s;
  font-size: 14px;
  line-height: 18px;
  font-weight: 200;
}
.forgot-link:hover { opacity: .5; }

.auth-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;

  font-family: 'Argentum', sans-serif;
  margin-top: 40px;
}
.btn-submit {
  background: #202020;
  color: #fdfdfd;
  font-weight: 900;
  font-size: 18px;
  line-height: 20px;
  letter-spacing: 0;
  text-transform: uppercase;
  padding: 16px 48px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: opacity .2s;
}
.btn-submit:hover { opacity: .85; }
.btn-switch {
  background: none;
  border: none;
  color: #858585;
  font-size: 11px;
  line-height: 14px;
  cursor: pointer;
  transition: color .2s;
}
.btn-switch:hover { color: #202020; }

@media (max-width: 640px) {
  .auth-body { padding: 32px 24px; }
}