.auth-wrapper {
  max-width: 520px;
  margin: 1.5em auto 3em;
  padding: 1.5em;
  background: #ffffff;
  border: 1px solid #d1d1d1;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.auth-page .title {
  margin: 0 0 0.4em 0;
}

.auth-form {
  display: block;
  width: 100%;
}

.auth-intro {
  margin: 0 0 1em 0;
  color: #555;
  font-size: 0.92em;
}

.auth-label {
  display: block;
  margin: 0.9em 0 0.3em;
  color: #2b2b2b;
  font-size: 0.85em;
  font-weight: 600;
}

.auth-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.6em 0.75em;
  font-size: 0.95em;
  line-height: 1.3;
  background: #f7f7f7;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  color: #1a1a1a;
  transition: border-color 0.15s, background 0.15s;
}

.auth-input:focus {
  outline: none;
  border-color: #2e7d32;
  background: #ffffff;
}

.auth-input:invalid:not(:placeholder-shown) {
  border-color: #c62828;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6em 1em;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.9em 0 0.3em;
  font-size: 0.85em;
}

.auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5em;
  margin: 0.7em 0;
  font-size: 0.85em;
  color: #2b2b2b;
  line-height: 1.35;
}

.auth-checkbox input {
  margin-top: 0.2em;
}

.auth-link,
.auth-checkbox a,
.auth-switch a {
  color: #2e7d32;
  text-decoration: none;
}

.auth-link:hover,
.auth-checkbox a:hover,
.auth-switch a:hover {
  text-decoration: underline;
}

.auth-submit {
  display: block;
  width: 100%;
  padding: 0.85em 1em;
  font-size: 1em;
  font-weight: 700;
  color: #ffffff;
  background: #2e7d32;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background 0.15s;
}

.auth-submit:hover {
  background: #1b5e20;
}

.auth-switch {
  margin: 1em 0 0;
  text-align: center;
  font-size: 0.88em;
  color: #555;
}

.otp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 1em;
  animation: otp-fade 0.15s ease-out;
}

@keyframes otp-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.otp-modal {
  background: #ffffff;
  border-radius: 8px;
  width: 100%;
  max-width: 420px;
  padding: 1.5em 1.5em 1.25em;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  position: relative;
  font-family: inherit;
  color: #1a1a1a;
}

.otp-close {
  position: absolute;
  top: 0.4em;
  right: 0.6em;
  background: transparent;
  border: none;
  font-size: 1.4em;
  line-height: 1;
  color: #777;
  cursor: pointer;
  padding: 0.25em 0.5em;
}

.otp-close:hover {
  color: #1a1a1a;
}

.otp-title {
  margin: 0 0 0.4em;
  font-size: 1.15em;
  color: #2e7d32;
}

.otp-desc {
  margin: 0 0 1em;
  font-size: 0.9em;
  color: #555;
  line-height: 1.4;
}

.otp-inputs {
  display: flex;
  justify-content: space-between;
  gap: 0.4em;
  margin: 0.6em 0 0.8em;
}

.otp-inputs input {
  width: 2.5em;
  height: 3em;
  font-size: 1.4em;
  text-align: center;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  background: #f7f7f7;
  color: #1a1a1a;
  font-variant-numeric: tabular-nums;
}

.otp-inputs input:focus {
  outline: none;
  border-color: #2e7d32;
  background: #ffffff;
}

.otp-error {
  display: none;
  margin: 0.4em 0 0.8em;
  padding: 0.55em 0.7em;
  background: #fdecea;
  border-left: 3px solid #c62828;
  color: #c62828;
  font-size: 0.88em;
  border-radius: 3px;
}

.otp-error.is-visible {
  display: block;
}

.otp-validate {
  display: block;
  width: 100%;
  margin: 0.4em 0 0.8em;
  padding: 0.8em 1em;
  font-size: 1em;
  font-weight: 700;
  color: #ffffff;
  background: #2e7d32;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
}

.otp-validate:hover {
  background: #1b5e20;
}

.otp-resend-row {
  text-align: center;
  font-size: 0.85em;
  color: #555;
}

.otp-resend {
  background: transparent;
  border: none;
  color: #2e7d32;
  font: inherit;
  cursor: pointer;
  padding: 0.2em 0.4em;
}

.otp-resend[disabled] {
  color: #999;
  cursor: not-allowed;
}

.otp-resend:not([disabled]):hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }

  .otp-inputs input {
    width: 2em;
    height: 2.6em;
    font-size: 1.2em;
  }
}